1SET DEFAULT_STORAGE_ENGINE='TokuDB'; 2DROP TABLE IF EXISTS t1, t2; 3CREATE TABLE t1 (a int); 4begin; 5insert into t1 values(1); 6delete from t1 where a=1; 7rollback; 8select * from t1; 9a 10DROP table t1; 11create table t1 (a int, b int, primary key (a)); 12begin; 13insert into t1 values (1,10); 14select * From t1; 15a b 161 10 17rollback; 18select * From t1; 19a b 20begin; 21insert into t1 values (1,10); 22select * From t1; 23a b 241 10 25update t1 set b=b+5; 26select * From t1; 27a b 281 15 29update t1 set b=b+5 where a=1; 30select * from t1; 31a b 321 20 33rollback; 34select * from t1; 35a b 36begin; 37insert into t1 values (1,10),(2,20); 38select * From t1; 39a b 401 10 412 20 42delete from t1 where a > 1; 43select * from t1; 44a b 451 10 46rollback; 47select * from t1; 48a b 49insert into t1 values (1,10),(2,20),(3,30); 50select * from t1; 51a b 521 10 532 20 543 30 55rollback; 56select * From t1; 57a b 581 10 592 20 603 30 61begin; 62insert into t1 values (4,40),(5,50),(6,60); 63select * from t1; 64a b 651 10 662 20 673 30 684 40 695 50 706 60 71commit; 72select * from t1; 73a b 741 10 752 20 763 30 774 40 785 50 796 60 80begin; 81insert into t1 values (7,70); 82insert into t1 values (8,80), (9,90), (1,10), (10,100); 83ERROR 23000: Duplicate entry '1' for key 'PRIMARY' 84insert into t1 values (11,110); 85rollback; 86select * From t1; 87a b 881 10 892 20 903 30 914 40 925 50 936 60 94begin; 95insert into t1 values (7,70); 96insert into t1 values (8,80), (9,90), (1,10), (10,100); 97ERROR 23000: Duplicate entry '1' for key 'PRIMARY' 98insert into t1 values (11,110); 99commit; 100select * From t1; 101a b 1021 10 1032 20 1043 30 1054 40 1065 50 1076 60 1087 70 10911 110 110delete from t1; 111alter table t1 add index (b); 112insert ignore into t1 values (1,10),(2,20),(3,30),(1,10),(4,40); 113Warnings: 114Warning 1062 Duplicate entry '1' for key 'PRIMARY' 115select * From t1; 116a b 1171 10 1182 20 1193 30 1204 40 121begin; 122insert ignore into t1 values (5,50),(3,30),(6,60),(7,70); 123Warnings: 124Warning 1062 Duplicate entry '3' for key 'PRIMARY' 125select * From t1; 126a b 1271 10 1282 20 1293 30 1304 40 1315 50 1326 60 1337 70 134rollback; 135select * from t1; 136a b 1371 10 1382 20 1393 30 1404 40 141begin; 142insert ignore into t1 values (5,50),(3,30),(6,60),(7,70); 143Warnings: 144Warning 1062 Duplicate entry '3' for key 'PRIMARY' 145select * From t1; 146a b 1471 10 1482 20 1493 30 1504 40 1515 50 1526 60 1537 70 154commit; 155select * From t1; 156a b 1571 10 1582 20 1593 30 1604 40 1615 50 1626 60 1637 70 164drop table t1; 165