1 # This test runs with old-style locking, as:
2 # --innodb-autoinc-lock-mode=0
4 -- source include/have_innodb_plugin.inc
7 drop table if exists t1;
12 # Search on unique key
16 id int(11) NOT NULL auto_increment,
17 ggid varchar(32) binary DEFAULT '' NOT NULL,
18 email varchar(64) DEFAULT '' NOT NULL,
19 passwd varchar(32) binary DEFAULT '' NOT NULL,
24 insert into t1 (ggid,passwd) values ('test1','xxx');
25 insert into t1 (ggid,passwd) values ('test2','yyy');
27 insert into t1 (ggid,passwd) values ('test2','this will fail');
29 insert into t1 (ggid,id) values ('this will fail',1);
31 select * from t1 where ggid='test1';
32 select * from t1 where passwd='xxx';
33 select * from t1 where id=2;
35 replace into t1 (ggid,id) values ('this will work',1);
36 replace into t1 (ggid,passwd) values ('test2','this will work');
38 update t1 set id=100,ggid='test2' where id=1;
40 select * from t1 where id=1;
41 select * from t1 where id=999;