mirror of
https://github.com/MariaDB/server.git
synced 2025-02-02 03:51:50 +01:00
54470e2ed0
git-svn-id: file:///svn/mysql/tests/mysql-test@55035 c7de825b-a66e-492c-adef-691d508d4ae1
152 lines
1.9 KiB
Text
Executable file
152 lines
1.9 KiB
Text
Executable file
SET DEFAULT_STORAGE_ENGINE='TokuDB';
|
|
DROP TABLE IF EXISTS t1, t2;
|
|
SET @@autocommit=0;
|
|
CREATE TABLE t1 (a int);
|
|
insert into t1 values(1);
|
|
delete from t1 where a=1;
|
|
rollback;
|
|
select * from t1;
|
|
a
|
|
DROP table t1;
|
|
create table t1 (a int, b int, primary key (a));
|
|
insert into t1 values (1,10);
|
|
select * From t1;
|
|
a b
|
|
1 10
|
|
rollback;
|
|
select * From t1;
|
|
a b
|
|
insert into t1 values (1,10);
|
|
select * From t1;
|
|
a b
|
|
1 10
|
|
update t1 set b=b+5;
|
|
select * From t1;
|
|
a b
|
|
1 15
|
|
update t1 set b=b+5 where a=1;
|
|
select * from t1;
|
|
a b
|
|
1 20
|
|
rollback;
|
|
select * from t1;
|
|
a b
|
|
insert into t1 values (1,10),(2,20);
|
|
select * From t1;
|
|
a b
|
|
1 10
|
|
2 20
|
|
delete from t1 where a > 1;
|
|
select * from t1;
|
|
a b
|
|
1 10
|
|
rollback;
|
|
select * from t1;
|
|
a b
|
|
insert into t1 values (1,10),(2,20),(3,30);
|
|
select * from t1;
|
|
a b
|
|
1 10
|
|
2 20
|
|
3 30
|
|
commit;
|
|
select * From t1;
|
|
a b
|
|
1 10
|
|
2 20
|
|
3 30
|
|
insert into t1 values (4,40),(5,50),(6,60);
|
|
select * from t1;
|
|
a b
|
|
1 10
|
|
2 20
|
|
3 30
|
|
4 40
|
|
5 50
|
|
6 60
|
|
commit;
|
|
select * from t1;
|
|
a b
|
|
1 10
|
|
2 20
|
|
3 30
|
|
4 40
|
|
5 50
|
|
6 60
|
|
insert into t1 values (7,70);
|
|
insert into t1 values (8,80), (9,90), (1,10), (10,100);
|
|
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
|
|
insert into t1 values (11,110);
|
|
rollback;
|
|
select * From t1;
|
|
a b
|
|
1 10
|
|
2 20
|
|
3 30
|
|
4 40
|
|
5 50
|
|
6 60
|
|
insert into t1 values (7,70);
|
|
insert into t1 values (8,80), (9,90), (1,10), (10,100);
|
|
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
|
|
insert into t1 values (11,110);
|
|
commit;
|
|
select * From t1;
|
|
a b
|
|
1 10
|
|
2 20
|
|
3 30
|
|
4 40
|
|
5 50
|
|
6 60
|
|
7 70
|
|
11 110
|
|
delete from t1;
|
|
alter table t1 add index (b);
|
|
insert ignore into t1 values (1,10),(2,20),(3,30),(1,10),(4,40);
|
|
select * From t1;
|
|
a b
|
|
1 10
|
|
2 20
|
|
3 30
|
|
4 40
|
|
commit;
|
|
insert ignore into t1 values (5,50),(3,30),(6,60),(7,70);
|
|
select * From t1;
|
|
a b
|
|
1 10
|
|
2 20
|
|
3 30
|
|
4 40
|
|
5 50
|
|
6 60
|
|
7 70
|
|
rollback;
|
|
select * from t1;
|
|
a b
|
|
1 10
|
|
2 20
|
|
3 30
|
|
4 40
|
|
insert ignore into t1 values (5,50),(3,30),(6,60),(7,70);
|
|
select * From t1;
|
|
a b
|
|
1 10
|
|
2 20
|
|
3 30
|
|
4 40
|
|
5 50
|
|
6 60
|
|
7 70
|
|
commit;
|
|
select * From t1;
|
|
a b
|
|
1 10
|
|
2 20
|
|
3 30
|
|
4 40
|
|
5 50
|
|
6 60
|
|
7 70
|
|
SET @@autocommit=1;
|
|
drop table t1;
|