488
create table t1 (id int NOT NULL,id2 int NOT NULL,id3 int NOT NULL,dummy1 char(30),primary key (id,id2),index index_id3 (id3)) engine=innodb;
489
insert into t1 values (0,0,0,'ABCDEFGHIJ'),(2,2,2,'BCDEFGHIJK'),(1,1,1,'CDEFGHIJKL');
490
LOCK TABLES t1 WRITE;
492
insert into t1 values (99,1,2,'D'),(1,1,2,'D');
498
create table t1 (id int NOT NULL,id2 int NOT NULL,id3 int NOT NULL,dummy1 char(30),primary key (id,id2),index index_id3 (id3)) engine=innodb;
499
insert into t1 values (0,0,0,'ABCDEFGHIJ'),(2,2,2,'BCDEFGHIJK'),(1,1,1,'CDEFGHIJKL');
500
LOCK TABLES t1 WRITE;
503
insert into t1 values (99,1,2,'D'),(1,1,2,'D');
505
insert ignore into t1 values (100,1,2,'D'),(1,1,99,'D');
507
select id,id3 from t1;
512
485
# Test prefix key
514
487
create table t1 (a char(20), unique (a(5))) engine=innodb;