669
669
id select_type table type possible_keys key key_len ref rows Extra
670
670
1 SIMPLE t1 system PRIMARY NULL NULL NULL #
672
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=MyISAM;
673
insert into t1 values (0,0,0,'ABCDEFGHIJ'),(2,2,2,'BCDEFGHIJK'),(1,1,1,'CDEFGHIJKL');
674
LOCK TABLES t1 WRITE;
675
insert into t1 values (99,1,2,'D'),(1,1,2,'D');
676
ERROR 23000: Duplicate entry '1-1' for key 'PRIMARY'
691
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=MyISAM;
692
insert into t1 values (0,0,0,'ABCDEFGHIJ'),(2,2,2,'BCDEFGHIJK'),(1,1,1,'CDEFGHIJKL');
693
LOCK TABLES t1 WRITE;
695
insert into t1 values (99,1,2,'D'),(1,1,2,'D');
696
ERROR 23000: Duplicate entry '1-1' for key 'PRIMARY'
703
insert ignore into t1 values (100,1,2,'D'),(1,1,99,'D');
705
select id,id3 from t1;
714
672
create table t1 (a char(20), unique (a(5))) engine=MyISAM;
716
674
create table t1 (a char(20), index (a(5))) engine=MyISAM;