Commit 89069377 authored by ingo@mysql.com's avatar ingo@mysql.com

Merge mysql.com:/home/mydev/mysql-5.1

into  mysql.com:/home/mydev/mysql-5.1-wl1563-msg
parents c6881fb9 b6e28c99
......@@ -145,12 +145,12 @@ id select_type table type possible_keys key key_len ref rows Extra
Warnings:
Note 1003 select sql_no_cache last_insert_id() AS `last_insert_id()`
insert into t1 set i = 254;
ERROR 23000: Duplicate entry '254' for key 1
ERROR 23000: Duplicate entry '254' for key 'PRIMARY'
select last_insert_id();
last_insert_id()
255
insert into t1 set i = null;
ERROR 23000: Duplicate entry '255' for key 1
ERROR 23000: Duplicate entry '255' for key 'PRIMARY'
select last_insert_id();
last_insert_id()
0
......@@ -178,7 +178,7 @@ select last_insert_id();
last_insert_id()
2
insert into t1 values (NULL, 10);
ERROR 23000: Duplicate entry '10' for key 2
ERROR 23000: Duplicate entry '10' for key 'b'
select last_insert_id();
last_insert_id()
0
......@@ -379,7 +379,7 @@ key (rowid), unique(val));
replace into t1 (val) values ('1'),('2');
replace into t1 (val) values ('1'),('2');
insert into t1 (val) values ('1'),('2');
ERROR 23000: Duplicate entry '1' for key 2
ERROR 23000: Duplicate entry '1' for key 'val'
select * from t1;
rowid val
3 1
......
......@@ -48,7 +48,7 @@ id parent_id level
15 102 2
update t1 set id=id+1000;
update t1 set id=1024 where id=1009;
ERROR 23000: Duplicate entry '1024' for key 1
ERROR 23000: Duplicate entry '1024' for key 'PRIMARY'
select * from t1;
id parent_id level
1001 100 0
......@@ -270,7 +270,7 @@ n after commit
commit;
insert into t1 values (5);
insert into t1 values (4);
ERROR 23000: Duplicate entry '4' for key 1
ERROR 23000: Duplicate entry '4' for key 'PRIMARY'
commit;
select n, "after commit" from t1;
n after commit
......@@ -279,7 +279,7 @@ n after commit
set autocommit=1;
insert into t1 values (6);
insert into t1 values (4);
ERROR 23000: Duplicate entry '4' for key 1
ERROR 23000: Duplicate entry '4' for key 'PRIMARY'
select n from t1;
n
4
......@@ -343,7 +343,7 @@ drop table t1;
CREATE TABLE t1 (id char(8) not null primary key, val int not null) engine=bdb;
insert into t1 values ('pippo', 12);
insert into t1 values ('pippo', 12);
ERROR 23000: Duplicate entry 'pippo' for key 1
ERROR 23000: Duplicate entry 'pippo' for key 'PRIMARY'
delete from t1;
delete from t1 where id = 'pippo';
select * from t1;
......@@ -498,9 +498,9 @@ UNIQUE ggid (ggid)
insert into t1 (ggid,passwd) values ('test1','xxx');
insert into t1 (ggid,passwd) values ('test2','yyy');
insert into t1 (ggid,passwd) values ('test2','this will fail');
ERROR 23000: Duplicate entry 'test2' for key 2
ERROR 23000: Duplicate entry 'test2' for key 'ggid'
insert into t1 (ggid,id) values ('this will fail',1);
ERROR 23000: Duplicate entry '1' for key 1
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
select * from t1 where ggid='test1';
id ggid email passwd
1 test1 xxx
......@@ -513,7 +513,7 @@ id ggid email passwd
replace into t1 (ggid,id) values ('this will work',1);
replace into t1 (ggid,passwd) values ('test2','this will work');
update t1 set id=100,ggid='test2' where id=1;
ERROR 23000: Duplicate entry 'test2' for key 2
ERROR 23000: Duplicate entry 'test2' for key 'ggid'
select * from t1;
id ggid email passwd
1 this will work
......@@ -1047,7 +1047,7 @@ create table t1 (id int NOT NULL,id2 int NOT NULL,id3 int NOT NULL,dummy1 char(3
insert into t1 values (0,0,0,'ABCDEFGHIJ'),(2,2,2,'BCDEFGHIJK'),(1,1,1,'CDEFGHIJKL');
LOCK TABLES t1 WRITE;
insert into t1 values (99,1,2,'D'),(1,1,2,'D');
ERROR 23000: Duplicate entry '1-1' for key 1
ERROR 23000: Duplicate entry '1-1' for key 'PRIMARY'
select id from t1;
id
0
......@@ -1065,7 +1065,7 @@ insert into t1 values (0,0,0,'ABCDEFGHIJ'),(2,2,2,'BCDEFGHIJK'),(1,1,1,'CDEFGHIJ
LOCK TABLES t1 WRITE;
begin;
insert into t1 values (99,1,2,'D'),(1,1,2,'D');
ERROR 23000: Duplicate entry '1-1' for key 1
ERROR 23000: Duplicate entry '1-1' for key 'PRIMARY'
select id from t1;
id
0
......@@ -1487,7 +1487,7 @@ explain select count(*) from t1 where v between 'a' and 'a ' and v between 'a '
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref v v 13 const # Using where
alter table t1 add unique(v);
ERROR 23000: Duplicate entry '{ ' for key 1
ERROR 23000: Duplicate entry '{ ' for key 'v_2'
alter table t1 add key(v);
select concat('*',v,'*',c,'*',t,'*') as qq from t1 where v='a';
qq
......@@ -1847,16 +1847,16 @@ drop table t1;
create table t1 (a char(10), unique (a));
insert into t1 values ('a ');
insert into t1 values ('a ');
ERROR 23000: Duplicate entry 'a' for key 1
ERROR 23000: Duplicate entry 'a' for key 'a'
alter table t1 modify a varchar(10);
insert into t1 values ('a '),('a '),('a '),('a ');
ERROR 23000: Duplicate entry 'a ' for key 1
ERROR 23000: Duplicate entry 'a ' for key 'a'
insert into t1 values ('a ');
ERROR 23000: Duplicate entry 'a ' for key 1
ERROR 23000: Duplicate entry 'a ' for key 'a'
insert into t1 values ('a ');
ERROR 23000: Duplicate entry 'a ' for key 1
ERROR 23000: Duplicate entry 'a ' for key 'a'
insert into t1 values ('a ');
ERROR 23000: Duplicate entry 'a ' for key 1
ERROR 23000: Duplicate entry 'a ' for key 'a'
update t1 set a='a ' where a like 'a%';
select concat(a,'.') from t1;
concat(a,'.')
......
......@@ -4,7 +4,7 @@ create table t2(a int);
insert into t2 values(1),(2);
reset master;
insert into t1 select * from t2;
ERROR 23000: Duplicate entry '2' for key 1
ERROR 23000: Duplicate entry '2' for key 'a'
show binlog events;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 4 Format_desc 1 102 Server ver: VERSION, Binlog ver: 4
......@@ -18,7 +18,7 @@ create table t1(a int);
insert into t1 values(1),(1);
reset master;
create table t2(unique(a)) select a from t1;
ERROR 23000: Duplicate entry '1' for key 1
ERROR 23000: Duplicate entry '1' for key 'a'
show binlog events;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 4 Format_desc 1 102 Server ver: VERSION, Binlog ver: 4
......
......@@ -162,7 +162,7 @@ Note 1051 Unknown table 't2'
CREATE TABLE t1 (a int not null);
INSERT INTO t1 values (1),(2),(1);
CREATE TABLE t2 (primary key(a)) SELECT * FROM t1;
ERROR 23000: Duplicate entry '1' for key 1
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
SELECT * from t2;
ERROR 42S02: Table 'test.t2' doesn't exist
DROP TABLE t1;
......@@ -280,7 +280,7 @@ create table if not exists t1 select 3 as 'a',4 as 'b';
Warnings:
Note 1050 Table 't1' already exists
create table if not exists t1 select 3 as 'a',3 as 'b';
ERROR 23000: Duplicate entry '3' for key 1
ERROR 23000: Duplicate entry '3' for key 'PRIMARY'
select * from t1;
a b
1 1
......
......@@ -2,18 +2,18 @@ drop table if exists t1, t2;
CREATE TABLE t1 ( a int );
INSERT INTO t1 VALUES (1),(2),(1);
CREATE TABLE t2 ( PRIMARY KEY (a) ) ENGINE=INNODB SELECT a FROM t1;
ERROR 23000: Duplicate entry '1' for key 1
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
select * from t2;
ERROR 42S02: Table 'test.t2' doesn't exist
CREATE TEMPORARY TABLE t2 ( PRIMARY KEY (a) ) ENGINE=INNODB SELECT a FROM t1;
ERROR 23000: Duplicate entry '1' for key 1
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
select * from t2;
ERROR 42S02: Table 'test.t2' doesn't exist
CREATE TABLE t2 ( PRIMARY KEY (a) ) ENGINE=MYISAM SELECT a FROM t1;
ERROR 23000: Duplicate entry '1' for key 1
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
select * from t2;
ERROR 42S02: Table 'test.t2' doesn't exist
CREATE TEMPORARY TABLE t2 ( PRIMARY KEY (a) ) ENGINE=MYISAM SELECT a FROM t1;
ERROR 23000: Duplicate entry '1' for key 1
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
select * from t2;
ERROR 42S02: Table 'test.t2' doesn't exist
......@@ -296,9 +296,9 @@ create table t1 (c varchar(30) character set utf8, unique(c(10)));
insert into t1 values ('1'),('2'),('3'),('x'),('y'),('z');
insert into t1 values ('aaaaaaaaaa');
insert into t1 values ('aaaaaaaaaaa');
ERROR 23000: Duplicate entry 'aaaaaaaaaaa' for key 1
ERROR 23000: Duplicate entry 'aaaaaaaaaaa' for key 'c'
insert into t1 values ('aaaaaaaaaaaa');
ERROR 23000: Duplicate entry 'aaaaaaaaaaaa' for key 1
ERROR 23000: Duplicate entry 'aaaaaaaaaaaa' for key 'c'
insert into t1 values (repeat('b',20));
select c c1 from t1 where c='1';
c1
......@@ -329,9 +329,9 @@ create table t1 (c varchar(30) character set utf8, unique(c(10))) engine=innodb;
insert into t1 values ('1'),('2'),('3'),('x'),('y'),('z');
insert into t1 values ('aaaaaaaaaa');
insert into t1 values ('aaaaaaaaaaa');
ERROR 23000: Duplicate entry 'aaaaaaaaaaa' for key 1
ERROR 23000: Duplicate entry 'aaaaaaaaaaa' for key 'c'
insert into t1 values ('aaaaaaaaaaaa');
ERROR 23000: Duplicate entry 'aaaaaaaaaaaa' for key 1
ERROR 23000: Duplicate entry 'aaaaaaaaaaaa' for key 'c'
insert into t1 values (repeat('b',20));
select c c1 from t1 where c='1';
c1
......@@ -363,46 +363,46 @@ insert into t1 values ('1'),('2'),('3'),('4'),('x'),('y'),('z');
insert into t1 values ('a');
insert into t1 values ('aa');
insert into t1 values ('aaa');
ERROR 23000: Duplicate entry 'aaa' for key 1
ERROR 23000: Duplicate entry 'aaa' for key 'c'
insert into t1 values ('b');
insert into t1 values ('bb');
insert into t1 values ('bbb');
ERROR 23000: Duplicate entry 'bbb' for key 1
ERROR 23000: Duplicate entry 'bbb' for key 'c'
insert into t1 values ('а');
insert into t1 values ('аа');
insert into t1 values ('ааа');
ERROR 23000: Duplicate entry 'ааа' for key 1
ERROR 23000: Duplicate entry 'ааа' for key 'c'
insert into t1 values ('б');
insert into t1 values ('бб');
insert into t1 values ('ббб');
ERROR 23000: Duplicate entry 'ббб' for key 1
ERROR 23000: Duplicate entry 'ббб' for key 'c'
insert into t1 values ('ꪪ');
insert into t1 values ('ꪪꪪ');
insert into t1 values ('ꪪꪪꪪ');
ERROR 23000: Duplicate entry 'ꪪꪪ' for key 1
ERROR 23000: Duplicate entry 'ꪪꪪ' for key 'c'
drop table t1;
create table t1 (c char(3) character set utf8, unique (c(2))) engine=innodb;
insert into t1 values ('1'),('2'),('3'),('4'),('x'),('y'),('z');
insert into t1 values ('a');
insert into t1 values ('aa');
insert into t1 values ('aaa');
ERROR 23000: Duplicate entry 'aaa' for key 1
ERROR 23000: Duplicate entry 'aaa' for key 'c'
insert into t1 values ('b');
insert into t1 values ('bb');
insert into t1 values ('bbb');
ERROR 23000: Duplicate entry 'bbb' for key 1
ERROR 23000: Duplicate entry 'bbb' for key 'c'
insert into t1 values ('а');
insert into t1 values ('аа');
insert into t1 values ('ааа');
ERROR 23000: Duplicate entry 'ааа' for key 1
ERROR 23000: Duplicate entry 'ааа' for key 'c'
insert into t1 values ('б');
insert into t1 values ('бб');
insert into t1 values ('ббб');
ERROR 23000: Duplicate entry 'ббб' for key 1
ERROR 23000: Duplicate entry 'ббб' for key 'c'
insert into t1 values ('ꪪ');
insert into t1 values ('ꪪꪪ');
insert into t1 values ('ꪪꪪꪪ');
ERROR 23000: Duplicate entry 'ꪪꪪ' for key 1
ERROR 23000: Duplicate entry 'ꪪꪪ' for key 'c'
drop table t1;
create table t1 (
c char(10) character set utf8,
......@@ -416,14 +416,14 @@ t1 CREATE TABLE `t1` (
) ENGINE=MEMORY DEFAULT CHARSET=latin1
insert into t1 values ('a'),('b'),('c'),('d'),('e'),('f');
insert into t1 values ('aa');
ERROR 23000: Duplicate entry 'aa' for key 1
ERROR 23000: Duplicate entry 'aa' for key 'a'
insert into t1 values ('aaa');
ERROR 23000: Duplicate entry 'aaa' for key 1
ERROR 23000: Duplicate entry 'aaa' for key 'a'
insert into t1 values ('б');
insert into t1 values ('бб');
ERROR 23000: Duplicate entry 'б' for key 1
ERROR 23000: Duplicate entry 'б' for key 'a'
insert into t1 values ('ббб');
ERROR 23000: Duplicate entry 'б' for key 1
ERROR 23000: Duplicate entry 'б' for key 'a'
select c as c_all from t1 order by c;
c_all
a
......@@ -452,14 +452,14 @@ t1 CREATE TABLE `t1` (
) ENGINE=MEMORY DEFAULT CHARSET=latin1
insert into t1 values ('a'),('b'),('c'),('d'),('e'),('f');
insert into t1 values ('aa');
ERROR 23000: Duplicate entry 'aa' for key 1
ERROR 23000: Duplicate entry 'aa' for key 'a'
insert into t1 values ('aaa');
ERROR 23000: Duplicate entry 'aaa' for key 1
ERROR 23000: Duplicate entry 'aaa' for key 'a'
insert into t1 values ('б');
insert into t1 values ('бб');
ERROR 23000: Duplicate entry 'б' for key 1
ERROR 23000: Duplicate entry 'б' for key 'a'
insert into t1 values ('ббб');
ERROR 23000: Duplicate entry 'б' for key 1
ERROR 23000: Duplicate entry 'б' for key 'a'
select c as c_all from t1 order by c;
c_all
a
......@@ -482,14 +482,14 @@ unique key a (c(1))
) engine=bdb;
insert into t1 values ('a'),('b'),('c'),('d'),('e'),('f');
insert into t1 values ('aa');
ERROR 23000: Duplicate entry 'aa' for key 1
ERROR 23000: Duplicate entry 'aa' for key 'a'
insert into t1 values ('aaa');
ERROR 23000: Duplicate entry 'aaa' for key 1
ERROR 23000: Duplicate entry 'aaa' for key 'a'
insert into t1 values ('б');
insert into t1 values ('бб');
ERROR 23000: Duplicate entry 'б' for key 1
ERROR 23000: Duplicate entry 'б' for key 'a'
insert into t1 values ('ббб');
ERROR 23000: Duplicate entry 'б' for key 1
ERROR 23000: Duplicate entry 'б' for key 'a'
select c as c_all from t1 order by c;
c_all
a
......@@ -510,9 +510,9 @@ create table t1 (c varchar(30) character set utf8 collate utf8_bin, unique(c(10)
insert into t1 values ('1'),('2'),('3'),('x'),('y'),('z');
insert into t1 values ('aaaaaaaaaa');
insert into t1 values ('aaaaaaaaaaa');
ERROR 23000: Duplicate entry 'aaaaaaaaaaa' for key 1
ERROR 23000: Duplicate entry 'aaaaaaaaaaa' for key 'c'
insert into t1 values ('aaaaaaaaaaaa');
ERROR 23000: Duplicate entry 'aaaaaaaaaaaa' for key 1
ERROR 23000: Duplicate entry 'aaaaaaaaaaaa' for key 'c'
insert into t1 values (repeat('b',20));
select c c1 from t1 where c='1';
c1
......@@ -544,23 +544,23 @@ insert into t1 values ('1'),('2'),('3'),('4'),('x'),('y'),('z');
insert into t1 values ('a');
insert into t1 values ('aa');
insert into t1 values ('aaa');
ERROR 23000: Duplicate entry 'aaa' for key 1
ERROR 23000: Duplicate entry 'aaa' for key 'c'
insert into t1 values ('b');
insert into t1 values ('bb');
insert into t1 values ('bbb');
ERROR 23000: Duplicate entry 'bbb' for key 1
ERROR 23000: Duplicate entry 'bbb' for key 'c'
insert into t1 values ('а');
insert into t1 values ('аа');
insert into t1 values ('ааа');
ERROR 23000: Duplicate entry 'ааа' for key 1
ERROR 23000: Duplicate entry 'ааа' for key 'c'
insert into t1 values ('б');
insert into t1 values ('бб');
insert into t1 values ('ббб');
ERROR 23000: Duplicate entry 'ббб' for key 1
ERROR 23000: Duplicate entry 'ббб' for key 'c'
insert into t1 values ('ꪪ');
insert into t1 values ('ꪪꪪ');
insert into t1 values ('ꪪꪪꪪ');
ERROR 23000: Duplicate entry 'ꪪꪪ' for key 1
ERROR 23000: Duplicate entry 'ꪪꪪ' for key 'c'
drop table t1;
create table t1 (
c char(10) character set utf8 collate utf8_bin,
......@@ -574,14 +574,14 @@ t1 CREATE TABLE `t1` (
) ENGINE=MEMORY DEFAULT CHARSET=latin1
insert into t1 values ('a'),('b'),('c'),('d'),('e'),('f');
insert into t1 values ('aa');
ERROR 23000: Duplicate entry 'aa' for key 1
ERROR 23000: Duplicate entry 'aa' for key 'a'
insert into t1 values ('aaa');
ERROR 23000: Duplicate entry 'aaa' for key 1
ERROR 23000: Duplicate entry 'aaa' for key 'a'
insert into t1 values ('б');
insert into t1 values ('бб');
ERROR 23000: Duplicate entry 'б' for key 1
ERROR 23000: Duplicate entry 'б' for key 'a'
insert into t1 values ('ббб');
ERROR 23000: Duplicate entry 'б' for key 1
ERROR 23000: Duplicate entry 'б' for key 'a'
select c as c_all from t1 order by c;
c_all
a
......@@ -610,14 +610,14 @@ t1 CREATE TABLE `t1` (
) ENGINE=MEMORY DEFAULT CHARSET=latin1
insert into t1 values ('a'),('b'),('c'),('d'),('e'),('f');
insert into t1 values ('aa');
ERROR 23000: Duplicate entry 'aa' for key 1
ERROR 23000: Duplicate entry 'aa' for key 'a'
insert into t1 values ('aaa');
ERROR 23000: Duplicate entry 'aaa' for key 1
ERROR 23000: Duplicate entry 'aaa' for key 'a'
insert into t1 values ('б');
insert into t1 values ('бб');
ERROR 23000: Duplicate entry 'б' for key 1
ERROR 23000: Duplicate entry 'б' for key 'a'
insert into t1 values ('ббб');
ERROR 23000: Duplicate entry 'б' for key 1
ERROR 23000: Duplicate entry 'б' for key 'a'
select c as c_all from t1 order by c;
c_all
a
......@@ -640,14 +640,14 @@ unique key a (c(1))
) engine=bdb;
insert into t1 values ('a'),('b'),('c'),('d'),('e'),('f');
insert into t1 values ('aa');
ERROR 23000: Duplicate entry 'aa' for key 1
ERROR 23000: Duplicate entry 'aa' for key 'a'
insert into t1 values ('aaa');
ERROR 23000: Duplicate entry 'aaa' for key 1
ERROR 23000: Duplicate entry 'aaa' for key 'a'
insert into t1 values ('б');
insert into t1 values ('бб');
ERROR 23000: Duplicate entry 'б' for key 1
ERROR 23000: Duplicate entry 'б' for key 'a'
insert into t1 values ('ббб');
ERROR 23000: Duplicate entry 'б' for key 1
ERROR 23000: Duplicate entry 'б' for key 'a'
select c as c_all from t1 order by c;
c_all
a
......
......@@ -195,7 +195,7 @@ SELECT * FROM t1 WHERE b<=>NULL;
a b
99 NULL
INSERT INTO t1 VALUES (1,3);
ERROR 23000: Duplicate entry '3' for key 1
ERROR 23000: Duplicate entry '3' for key 'b'
DROP TABLE t1;
CREATE TABLE t1 (
a int default NULL,
......@@ -384,7 +384,7 @@ explain select count(*) from t1 where v between 'a' and 'a ' and v between 'a '
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref v v 13 const 10 Using where
alter table t1 add unique(v);
ERROR 23000: Duplicate entry '{ ' for key 1
ERROR 23000: Duplicate entry '{ ' for key 'v_2'
select concat('*',v,'*',c,'*',t,'*') as qq from t1 where v='a' order by length(concat('*',v,'*',c,'*',t,'*'));
qq
*a*a*a*
......@@ -536,16 +536,16 @@ drop table t1;
create table t1 (a char(10), unique (a));
insert into t1 values ('a');
insert into t1 values ('a ');
ERROR 23000: Duplicate entry 'a' for key 1
ERROR 23000: Duplicate entry 'a' for key 'a'
alter table t1 modify a varchar(10);
insert into t1 values ('a '),('a '),('a '),('a ');
ERROR 23000: Duplicate entry 'a ' for key 1
ERROR 23000: Duplicate entry 'a ' for key 'a'
insert into t1 values ('a ');
ERROR 23000: Duplicate entry 'a ' for key 1
ERROR 23000: Duplicate entry 'a ' for key 'a'
insert into t1 values ('a ');
ERROR 23000: Duplicate entry 'a ' for key 1
ERROR 23000: Duplicate entry 'a ' for key 'a'
insert into t1 values ('a ');
ERROR 23000: Duplicate entry 'a ' for key 1
ERROR 23000: Duplicate entry 'a ' for key 'a'
update t1 set a='a ' where a like 'a ';
update t1 set a='a ' where a like 'a ';
drop table t1;
......@@ -607,7 +607,7 @@ explain select count(*) from t1 where v between 'a' and 'a ' and v between 'a '
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref v v 13 const # Using where
alter table t1 add unique(v);
ERROR 23000: Duplicate entry '{ ' for key 1
ERROR 23000: Duplicate entry '{ ' for key 'v_2'
select concat('*',v,'*',c,'*',t,'*') as qq from t1 where v='a' order by length(concat('*',v,'*',c,'*',t,'*'));
qq
*a*a*a*
......@@ -627,16 +627,16 @@ drop table t1;
create table t1 (a char(10), unique using btree (a)) engine=heap;
insert into t1 values ('a');
insert into t1 values ('a ');
ERROR 23000: Duplicate entry 'a' for key 1
ERROR 23000: Duplicate entry 'a' for key 'a'
alter table t1 modify a varchar(10);
insert into t1 values ('a '),('a '),('a '),('a ');
ERROR 23000: Duplicate entry 'a ' for key 1
ERROR 23000: Duplicate entry 'a ' for key 'a'
insert into t1 values ('a ');
ERROR 23000: Duplicate entry 'a ' for key 1
ERROR 23000: Duplicate entry 'a ' for key 'a'
insert into t1 values ('a ');
ERROR 23000: Duplicate entry 'a ' for key 1
ERROR 23000: Duplicate entry 'a ' for key 'a'
insert into t1 values ('a ');
ERROR 23000: Duplicate entry 'a ' for key 1
ERROR 23000: Duplicate entry 'a ' for key 'a'
update t1 set a='a ' where a like 'a ';
update t1 set a='a ' where a like 'a ';
drop table t1;
......@@ -699,7 +699,7 @@ ERROR 42000: Incorrect table definition; there can be only one auto column and i
create table t1 (c char(255), primary key(c(90)));
insert into t1 values ("abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz");
insert into t1 values ("abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz");
ERROR 23000: Duplicate entry 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijkl' for key 1
ERROR 23000: Duplicate entry 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijkl' for key 'PRIMARY'
drop table t1;
create table t1 (c char(10)) engine=memory;
create table t2 (c varchar(10)) engine=memory;
......
......@@ -224,7 +224,7 @@ SELECT * FROM t1 WHERE b<=>NULL;
a b
99 NULL
INSERT INTO t1 VALUES (1,3);
ERROR 23000: Duplicate entry '3' for key 1
ERROR 23000: Duplicate entry '3' for key 'b'
DROP TABLE t1;
CREATE TABLE t1 (a int, b int, c int, key using BTREE (a, b, c)) engine=heap;
INSERT INTO t1 VALUES (1, NULL, NULL), (1, 1, NULL), (1, NULL, 1);
......
......@@ -195,7 +195,7 @@ SELECT * FROM t1 WHERE b<=>NULL;
a b
99 NULL
INSERT INTO t1 VALUES (1,3);
ERROR 23000: Duplicate entry '3' for key 1
ERROR 23000: Duplicate entry '3' for key 'b'
DROP TABLE t1;
CREATE TABLE t1 (a int not null, primary key using HASH (a)) engine=heap;
INSERT into t1 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(11);
......
......@@ -234,7 +234,7 @@ n after commit
commit;
insert into t1 values (5);
insert into t1 values (4);
ERROR 23000: Duplicate entry '4' for key 1
ERROR 23000: Duplicate entry '4' for key 'PRIMARY'
commit;
select n, "after commit" from t1;
n after commit
......@@ -243,7 +243,7 @@ n after commit
set autocommit=1;
insert into t1 values (6);
insert into t1 values (4);
ERROR 23000: Duplicate entry '4' for key 1
ERROR 23000: Duplicate entry '4' for key 'PRIMARY'
select n from t1;
n
4
......@@ -318,7 +318,7 @@ drop table t1;
CREATE TABLE t1 (id char(8) not null primary key, val int not null) engine=innodb;
insert into t1 values ('pippo', 12);
insert into t1 values ('pippo', 12);
ERROR 23000: Duplicate entry 'pippo' for key 1
ERROR 23000: Duplicate entry 'pippo' for key 'PRIMARY'
delete from t1;
delete from t1 where id = 'pippo';
select * from t1;
......@@ -482,9 +482,9 @@ UNIQUE ggid (ggid)
insert into t1 (ggid,passwd) values ('test1','xxx');
insert into t1 (ggid,passwd) values ('test2','yyy');
insert into t1 (ggid,passwd) values ('test2','this will fail');
ERROR 23000: Duplicate entry 'test2' for key 2
ERROR 23000: Duplicate entry 'test2' for key 'ggid'
insert into t1 (ggid,id) values ('this will fail',1);
ERROR 23000: Duplicate entry '1' for key 1
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
select * from t1 where ggid='test1';
id ggid email passwd
1 test1 xxx
......@@ -497,7 +497,7 @@ id ggid email passwd
replace into t1 (ggid,id) values ('this will work',1);
replace into t1 (ggid,passwd) values ('test2','this will work');
update t1 set id=100,ggid='test2' where id=1;
ERROR 23000: Duplicate entry 'test2' for key 2
ERROR 23000: Duplicate entry 'test2' for key 'ggid'
select * from t1;
id ggid email passwd
1 this will work
......@@ -816,7 +816,7 @@ create table t1 (id int NOT NULL,id2 int NOT NULL,id3 int NOT NULL,dummy1 char(3
insert into t1 values (0,0,0,'ABCDEFGHIJ'),(2,2,2,'BCDEFGHIJK'),(1,1,1,'CDEFGHIJKL');
LOCK TABLES t1 WRITE;
insert into t1 values (99,1,2,'D'),(1,1,2,'D');
ERROR 23000: Duplicate entry '1-1' for key 1
ERROR 23000: Duplicate entry '1-1' for key 'PRIMARY'
select id from t1;
id
0
......@@ -834,7 +834,7 @@ insert into t1 values (0,0,0,'ABCDEFGHIJ'),(2,2,2,'BCDEFGHIJK'),(1,1,1,'CDEFGHIJ
LOCK TABLES t1 WRITE;
begin;
insert into t1 values (99,1,2,'D'),(1,1,2,'D');
ERROR 23000: Duplicate entry '1-1' for key 1
ERROR 23000: Duplicate entry '1-1' for key 'PRIMARY'
select id from t1;
id
0
......@@ -1964,7 +1964,7 @@ explain select count(*) from t1 where v between 'a' and 'a ' and v between 'a '
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref v v 13 const # Using where; Using index
alter table t1 add unique(v);
ERROR 23000: Duplicate entry '{ ' for key 1
ERROR 23000: Duplicate entry '{ ' for key 'v_2'
alter table t1 add key(v);
select concat('*',v,'*',c,'*',t,'*') as qq from t1 where v='a';
qq
......@@ -2324,16 +2324,16 @@ drop table t1;
create table t1 (a char(10), unique (a));
insert into t1 values ('a ');
insert into t1 values ('a ');
ERROR 23000: Duplicate entry 'a' for key 1
ERROR 23000: Duplicate entry 'a' for key 'a'
alter table t1 modify a varchar(10);
insert into t1 values ('a '),('a '),('a '),('a ');
ERROR 23000: Duplicate entry 'a ' for key 1
ERROR 23000: Duplicate entry 'a ' for key 'a'
insert into t1 values ('a ');
ERROR 23000: Duplicate entry 'a ' for key 1
ERROR 23000: Duplicate entry 'a ' for key 'a'
insert into t1 values ('a ');
ERROR 23000: Duplicate entry 'a ' for key 1
ERROR 23000: Duplicate entry 'a ' for key 'a'
insert into t1 values ('a ');
ERROR 23000: Duplicate entry 'a ' for key 1
ERROR 23000: Duplicate entry 'a ' for key 'a'
update t1 set a='a ' where a like 'a%';
select concat(a,'.') from t1;
concat(a,'.')
......@@ -2456,7 +2456,7 @@ key (rowid), unique(val)) engine=innodb;
replace into t1 (val) values ('1'),('2');
replace into t1 (val) values ('1'),('2');
insert into t1 (val) values ('1'),('2');
ERROR 23000: Duplicate entry '1' for key 2
ERROR 23000: Duplicate entry '1' for key 'val'
select * from t1;
rowid val
3 1
......@@ -2466,7 +2466,7 @@ create table t1 (a int not null auto_increment primary key, val int) engine=Inno
insert into t1 (val) values (1);
update t1 set a=2 where a=1;
insert into t1 (val) values (1);
ERROR 23000: Duplicate entry '2' for key 1
ERROR 23000: Duplicate entry '2' for key 'PRIMARY'
select * from t1;
a val
2 1
......
......@@ -121,7 +121,7 @@ id a
begin;
insert into t3 VALUES ( NULL, 1, 1, 2 );
insert into t3 VALUES ( NULL, 1, 1, 2 );
ERROR 23000: Duplicate entry '1-1' for key 2
ERROR 23000: Duplicate entry '1-1' for key 't1_id'
commit;
select t1.* from t1, t2, t3 where t3.state & 1 = 0 and t3.t1_id = t1.id and t3.t2_id = t2.id and t1.id = 1 order by t1.a asc;
id a
......
......@@ -4,7 +4,7 @@ insert into t1 (bandID,payoutID) VALUES (1,6),(2,6),(3,4),(4,9),(5,10),(6,1),(7,
create table t2 (payoutID SMALLINT UNSIGNED NOT NULL PRIMARY KEY);
insert into t2 (payoutID) SELECT DISTINCT payoutID FROM t1;
insert into t2 (payoutID) SELECT payoutID+10 FROM t1;
ERROR 23000: Duplicate entry '16' for key 1
ERROR 23000: Duplicate entry '16' for key 'PRIMARY'
insert ignore into t2 (payoutID) SELECT payoutID+10 FROM t1;
select * from t2;
payoutID
......@@ -561,7 +561,7 @@ create table t2 (a int not null, b char(10));
insert into t1 values (1,"t1:1"),(3,"t1:3");
insert into t2 values (2,"t2:2"), (3,"t2:3");
insert into t1 select * from t2;
ERROR 23000: Duplicate entry '3' for key 1
ERROR 23000: Duplicate entry '3' for key 'PRIMARY'
select * from t1;
a b
1 t1:1
......
......@@ -26,7 +26,7 @@ a b c
3 4 1020
5 6 130
INSERT t1 VALUES (1,9,70) ON DUPLICATE KEY UPDATE c=c+100000, b=4;
ERROR 23000: Duplicate entry '4' for key 2
ERROR 23000: Duplicate entry '4' for key 'b'
SELECT * FROM t1;
a b c
1 2 10010
......@@ -132,7 +132,7 @@ a b c
3 4 1020
5 6 130
INSERT t1 SELECT 1,9,70 FROM DUAL ON DUPLICATE KEY UPDATE c=c+100000, b=4;
ERROR 23000: Duplicate entry '4' for key 2
ERROR 23000: Duplicate entry '4' for key 'b'
SELECT * FROM t1;
a b c
1 2 10010
......
......@@ -169,7 +169,7 @@ usr_id uniq_id increment usr2_id c_amount max
3 4 84676 NULL NULL NULL
INSERT INTO t2 VALUES (2,3,3000,6000,0,0,746584,837484,'yes');
INSERT INTO t2 VALUES (2,3,3000,6000,0,0,746584,837484,'yes');
ERROR 23000: Duplicate entry '2-3' for key 1
ERROR 23000: Duplicate entry '2-3' for key 'PRIMARY'
INSERT INTO t2 VALUES (7,3,1000,2000,0,0,746294,937484,'yes');
SELECT t1.usr_id,t1.uniq_id,t1.increment,t2.usr2_id,t2.c_amount,t2.max FROM t1 LEFT JOIN t2 ON t2.id = t1.uniq_id WHERE t1.uniq_id = 4 ORDER BY t2.c_amount;
usr_id uniq_id increment usr2_id c_amount max
......
......@@ -127,7 +127,7 @@ primary key (SEQNO, MOTYPEID, MOINSTANCEID, ATTRID, VALUE )
INSERT INTO t1 VALUES (1, 1, 1, 1, 'a');
INSERT INTO t1 VALUES (1, 1, 1, 1, 'b');
INSERT INTO t1 VALUES (1, 1, 1, 1, 'a');
ERROR 23000: Duplicate entry '1-1-1-1-a' for key 1
ERROR 23000: Duplicate entry '1-1-1-1-a' for key 'PRIMARY'
drop table t1;
CREATE TABLE t1 (
a tinytext NOT NULL,
......@@ -251,13 +251,13 @@ insert t1 values ('cccc', 'tttt'),
(0xD0B1212223D0B1D0B1D0B1D0B1D0B1, 0xD0B1D0B1212223D0B1D0B1D0B1D0B1),
(0xD0B1222123D0B1D0B1D0B1D0B1D0B1, 0xD0B1D0B1222123D0B1D0B1D0B1D0B1);
insert t1 (c) values ('cc22');
ERROR 23000: Duplicate entry 'cc22' for key 1
ERROR 23000: Duplicate entry 'cc22' for key 'c'
insert t1 (t) values ('ttt22');
ERROR 23000: Duplicate entry 'ttt22' for key 2
ERROR 23000: Duplicate entry 'ttt22' for key 't'
insert t1 (c) values (0xD0B1212322D0B1D0B1D0B1D0B1D0B1);
ERROR 23000: Duplicate entry 'б!#"' for key 1
ERROR 23000: Duplicate entry 'б!#"' for key 'c'
insert t1 (t) values (0xD0B1D0B1212322D0B1D0B1D0B1D0B1);
ERROR 23000: Duplicate entry 'бб!#"б' for key 2
ERROR 23000: Duplicate entry 'бб!#"б' for key 't'
select c from t1 where c='cccc';
c
cccc
......@@ -462,5 +462,5 @@ insert into t1 values(1, 'a', 'a', NULL);
insert into t1 values(1, 'b', 'b', NULL);
alter table t1 drop index i3, drop index i2, drop index i1;
alter table t1 add index i3 (c3), add index i2 (c2), add unique index i1 (c1);
ERROR 23000: Duplicate entry '1' for key 1
ERROR 23000: Duplicate entry '1' for key 'i1'
drop table t1;
......@@ -548,9 +548,9 @@ select * from t4 where a+0 > 90;
a b
99 1
insert t5 values (1,1);
ERROR 23000: Duplicate entry '1-1' for key 1
ERROR 23000: Duplicate entry '1-1' for key 'PRIMARY'
insert t6 values (2,1);
ERROR 23000: Duplicate entry '2-1' for key 1
ERROR 23000: Duplicate entry '2-1' for key 'PRIMARY'
insert t5 values (1,1) on duplicate key update b=b+10;
insert t6 values (2,1) on duplicate key update b=b+20;
select * from t5 where a < 3;
......
......@@ -469,9 +469,9 @@ b.
c.
update t1 set b='b ' where a=2;
update t1 set b='b ' where a > 1;
ERROR 23000: Duplicate entry 'b ' for key 2
ERROR 23000: Duplicate entry 'b ' for key 'b'
insert into t1 (b) values ('b');
ERROR 23000: Duplicate entry 'b' for key 2
ERROR 23000: Duplicate entry 'b' for key 'b'
select * from t1;
a b
1 a
......@@ -867,7 +867,7 @@ explain select count(*) from t1 where v between 'a' and 'a ' and v between 'a '
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref v v 13 const # Using where; Using index
alter table t1 add unique(v);
ERROR 23000: Duplicate entry '{ ' for key 1
ERROR 23000: Duplicate entry '{ ' for key 'v_2'
alter table t1 add key(v);
select concat('*',v,'*',c,'*',t,'*') as qq from t1 where v='a';
qq
......@@ -1227,16 +1227,16 @@ drop table t1;
create table t1 (a char(10), unique (a));
insert into t1 values ('a ');
insert into t1 values ('a ');
ERROR 23000: Duplicate entry 'a' for key 1
ERROR 23000: Duplicate entry 'a' for key 'a'
alter table t1 modify a varchar(10);
insert into t1 values ('a '),('a '),('a '),('a ');
ERROR 23000: Duplicate entry 'a ' for key 1
ERROR 23000: Duplicate entry 'a ' for key 'a'
insert into t1 values ('a ');
ERROR 23000: Duplicate entry 'a ' for key 1
ERROR 23000: Duplicate entry 'a ' for key 'a'
insert into t1 values ('a ');
ERROR 23000: Duplicate entry 'a ' for key 1
ERROR 23000: Duplicate entry 'a ' for key 'a'
insert into t1 values ('a ');
ERROR 23000: Duplicate entry 'a ' for key 1
ERROR 23000: Duplicate entry 'a ' for key 'a'
update t1 set a='a ' where a like 'a%';
select concat(a,'.') from t1;
concat(a,'.')
......
......@@ -27,9 +27,9 @@ a char(3) character set latin1 collate latin1_swedish_ci primary key
) engine=ndb;
insert into t1 values('aAa');
insert into t1 values('aaa');
ERROR 23000: Duplicate entry 'aaa' for key 1
ERROR 23000: Duplicate entry 'aaa' for key 'PRIMARY'
insert into t1 values('AAA');
ERROR 23000: Duplicate entry 'AAA' for key 1
ERROR 23000: Duplicate entry 'AAA' for key 'PRIMARY'
select * from t1 order by a;
a
aAa
......@@ -51,9 +51,9 @@ a varchar(20) character set latin1 collate latin1_swedish_ci primary key
) engine=ndb;
insert into t1 values ('A'),('b '),('C '),('d '),('E'),('f');
insert into t1 values('b');
ERROR 23000: Duplicate entry 'b' for key 1
ERROR 23000: Duplicate entry 'b' for key 'PRIMARY'
insert into t1 values('a ');
ERROR 23000: Duplicate entry 'a ' for key 1
ERROR 23000: Duplicate entry 'a ' for key 'PRIMARY'
select a,length(a) from t1 order by a;
a length(a)
A 1
......@@ -112,9 +112,9 @@ unique key(a)
) engine=ndb;
insert into t1 values(1, 'aAa');
insert into t1 values(2, 'aaa');
ERROR 23000: Duplicate entry '2' for key 1
ERROR 23000: Duplicate entry '2' for key 'PRIMARY'
insert into t1 values(3, 'AAA');
ERROR 23000: Duplicate entry '3' for key 1
ERROR 23000: Duplicate entry '3' for key 'PRIMARY'
select * from t1 order by p;
p a
1 aAa
......@@ -138,9 +138,9 @@ unique key(a)
) engine=ndb;
insert into t1 values (1,'A'),(2,'b '),(3,'C '),(4,'d '),(5,'E'),(6,'f');
insert into t1 values(99,'b');
ERROR 23000: Duplicate entry '99' for key 1
ERROR 23000: Duplicate entry '99' for key 'PRIMARY'
insert into t1 values(99,'a ');
ERROR 23000: Duplicate entry '99' for key 1
ERROR 23000: Duplicate entry '99' for key 'PRIMARY'
select a,length(a) from t1 order by a;
a length(a)
A 1
......
......@@ -22,7 +22,7 @@ select * from t1 where b = 4 order by a;
a b c
3 4 6
insert into t1 values(8, 2, 3);
ERROR 23000: Duplicate entry '8' for key 1
ERROR 23000: Duplicate entry '8' for key 'PRIMARY'
select * from t1 order by a;
a b c
1 2 3
......@@ -89,7 +89,7 @@ a b c
1 1 1
4 4 NULL
insert into t1 values(5,1,1);
ERROR 23000: Duplicate entry '5' for key 1
ERROR 23000: Duplicate entry '5' for key 'PRIMARY'
drop table t1;
CREATE TABLE t2 (
a int unsigned NOT NULL PRIMARY KEY,
......@@ -112,7 +112,7 @@ select * from t2 where b = 4 order by a;
a b c
3 4 6
insert into t2 values(8, 2, 3);
ERROR 23000: Duplicate entry '8' for key 1
ERROR 23000: Duplicate entry '8' for key 'PRIMARY'
select * from t2 order by a;
a b c
1 2 3
......@@ -177,7 +177,7 @@ pk a
3 NULL
4 4
insert into t1 values (5,0);
ERROR 23000: Duplicate entry '5' for key 1
ERROR 23000: Duplicate entry '5' for key 'PRIMARY'
select * from t1 order by pk;
pk a
-1 NULL
......@@ -210,7 +210,7 @@ pk a b c
0 NULL 18 NULL
1 3 19 abc
insert into t2 values(2,3,19,'abc');
ERROR 23000: Duplicate entry '2' for key 1
ERROR 23000: Duplicate entry '2' for key 'PRIMARY'
select * from t2 order by pk;
pk a b c
-1 1 17 NULL
......
......@@ -417,7 +417,7 @@ SELECT COUNT(*) FROM t1;
COUNT(*)
2000
INSERT INTO t1 VALUES (1,1,1);
ERROR 23000: Duplicate entry '1' for key 1
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
INSERT INTO t1 VALUES
(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5),
(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10);
......
......@@ -11,7 +11,7 @@ insert into t1 (gesuchnr, benutzer_id) value (3,2);
replace into t1 (gesuchnr,benutzer_id) values (1,1);
replace into t1 (gesuchnr,benutzer_id) values (1,1);
insert into t1 (gesuchnr,benutzer_id) values (1,1);
ERROR 23000: Duplicate entry '1-1' for key 1
ERROR 23000: Duplicate entry '1-1' for key 'PRIMARY'
replace into t1 (gesuchnr,benutzer_id) values (1,1);
select * from t1 order by gesuchnr;
gesuchnr benutzer_id
......
......@@ -18,7 +18,7 @@ pk1 b c
2 2 2
4 1 1
UPDATE t1 set pk1 = 1, c = 2 where pk1 = 4;
ERROR 23000: Duplicate entry '1' for key 1
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
select * from t1 order by pk1;
pk1 b c
0 0 0
......
......@@ -1426,7 +1426,7 @@ select a,b from t1 where b = @arg00;
a b
6 six
execute stmt1 using @arg00;
ERROR 23000: Duplicate entry '6' for key 1
ERROR 23000: Duplicate entry '6' for key 'PRIMARY'
set @arg00=NULL ;
prepare stmt1 from 'insert into t1 values(0, ? )';
execute stmt1 using @arg00;
......@@ -1539,7 +1539,7 @@ a b
set @arg00=81 ;
set @arg01=1 ;
execute stmt1 using @arg00, @arg01;
ERROR 23000: Duplicate entry '82' for key 1
ERROR 23000: Duplicate entry '82' for key 'PRIMARY'
drop table if exists t2 ;
create table t2 (id int auto_increment primary key)
ENGINE= 'MYISAM' ;
......
......@@ -1409,7 +1409,7 @@ select a,b from t1 where b = @arg00;
a b
6 six
execute stmt1 using @arg00;
ERROR 23000: Duplicate entry '6' for key 1
ERROR 23000: Duplicate entry '6' for key 'PRIMARY'
set @arg00=NULL ;
prepare stmt1 from 'insert into t1 values(0, ? )';
execute stmt1 using @arg00;
......@@ -1522,7 +1522,7 @@ a b
set @arg00=81 ;
set @arg01=1 ;
execute stmt1 using @arg00, @arg01;
ERROR 23000: Duplicate entry '82' for key 1
ERROR 23000: Duplicate entry '82' for key 'PRIMARY'
drop table if exists t2 ;
create table t2 (id int auto_increment primary key)
ENGINE= 'InnoDB' ;
......
......@@ -1410,7 +1410,7 @@ select a,b from t1 where b = @arg00;
a b
6 six
execute stmt1 using @arg00;
ERROR 23000: Duplicate entry '6' for key 1
ERROR 23000: Duplicate entry '6' for key 'PRIMARY'
set @arg00=NULL ;
prepare stmt1 from 'insert into t1 values(0, ? )';
execute stmt1 using @arg00;
......@@ -1523,7 +1523,7 @@ a b
set @arg00=81 ;
set @arg01=1 ;
execute stmt1 using @arg00, @arg01;
ERROR 23000: Duplicate entry '82' for key 1
ERROR 23000: Duplicate entry '82' for key 'PRIMARY'
drop table if exists t2 ;
create table t2 (id int auto_increment primary key)
ENGINE= 'HEAP' ;
......
......@@ -1452,7 +1452,7 @@ select a,b from t1 where b = @arg00;
a b
6 six
execute stmt1 using @arg00;
ERROR 23000: Duplicate entry '6' for key 1
ERROR 23000: Duplicate entry '6' for key 'PRIMARY'
set @arg00=NULL ;
prepare stmt1 from 'insert into t1 values(0, ? )';
execute stmt1 using @arg00;
......@@ -1565,7 +1565,7 @@ a b
set @arg00=81 ;
set @arg01=1 ;
execute stmt1 using @arg00, @arg01;
ERROR 23000: Duplicate entry '82' for key 1
ERROR 23000: Duplicate entry '82' for key 'PRIMARY'
drop table if exists t2 ;
create table t2 (id int auto_increment primary key)
ENGINE= 'MYISAM' ;
......@@ -4466,7 +4466,7 @@ select a,b from t1 where b = @arg00;
a b
6 six
execute stmt1 using @arg00;
ERROR 23000: Duplicate entry '6' for key 1
ERROR 23000: Duplicate entry '6' for key 'PRIMARY'
set @arg00=NULL ;
prepare stmt1 from 'insert into t1 values(0, ? )';
execute stmt1 using @arg00;
......@@ -4579,7 +4579,7 @@ a b
set @arg00=81 ;
set @arg01=1 ;
execute stmt1 using @arg00, @arg01;
ERROR 23000: Duplicate entry '82' for key 1
ERROR 23000: Duplicate entry '82' for key 'PRIMARY'
drop table if exists t2 ;
create table t2 (id int auto_increment primary key)
ENGINE= 'MYISAM' ;
......
......@@ -1409,7 +1409,7 @@ select a,b from t1 where b = @arg00;
a b
6 six
execute stmt1 using @arg00;
ERROR 23000: Duplicate entry '6' for key 1
ERROR 23000: Duplicate entry '6' for key 'PRIMARY'
set @arg00=NULL ;
prepare stmt1 from 'insert into t1 values(0, ? )';
execute stmt1 using @arg00;
......@@ -1522,7 +1522,7 @@ a b
set @arg00=81 ;
set @arg01=1 ;
execute stmt1 using @arg00, @arg01;
ERROR 23000: Duplicate entry '82' for key 1
ERROR 23000: Duplicate entry '82' for key 'PRIMARY'
drop table if exists t2 ;
create table t2 (id int auto_increment primary key)
ENGINE= 'BDB' ;
......
......@@ -13,9 +13,9 @@ drop table t1;
create table t1 (a tinyint not null auto_increment primary key, b char(20) default "default_value");
insert into t1 values (126,"first"),(63, "middle"),(0,"last");
insert into t1 values (0,"error");
ERROR 23000: Duplicate entry '127' for key 1
ERROR 23000: Duplicate entry '127' for key 'PRIMARY'
replace into t1 values (0,"error");
ERROR 23000: Duplicate entry '127' for key 1
ERROR 23000: Duplicate entry '127' for key 'PRIMARY'
replace into t1 values (126,"first updated");
replace into t1 values (63,default);
select * from t1;
......
......@@ -126,7 +126,7 @@ a
504
set @@insert_id=600;
insert into t1 values(600),(NULL),(NULL);
ERROR 23000: Duplicate entry '600' for key 1
ERROR 23000: Duplicate entry '600' for key 'PRIMARY'
set @@insert_id=600;
insert ignore into t1 values(600),(NULL),(NULL),(610),(NULL);
select * from t1;
......
......@@ -7,7 +7,7 @@ start slave;
create table t1 (a int primary key);
create table t4 (a int primary key);
insert into t1 values (1),(1);
ERROR 23000: Duplicate entry '1' for key 1
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
insert into t4 values (1),(2);
show tables like 't1';
Tables_in_test (t1)
......
......@@ -72,4 +72,4 @@ SET TIMESTAMP=1000000000;
CREATE TABLE t1 ( a INT UNIQUE );
SET FOREIGN_KEY_CHECKS=0;
INSERT INTO t1 VALUES (1),(1);
ERROR 23000: Duplicate entry '1' for key 1
ERROR 23000: Duplicate entry '1' for key 'a'
......@@ -61,7 +61,7 @@ unique(day)) engine=MyISAM;
load data infile '../../std_data/rpl_loaddata2.dat' into table t2 fields
terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by
'\n##\n' starting by '>' ignore 1 lines;
ERROR 23000: Duplicate entry '2003-03-22' for key 1
ERROR 23000: Duplicate entry '2003-03-22' for key 'day'
select * from t2;
day id category name
2003-02-22 2461 b a a a @ %  ' " a
......@@ -76,6 +76,6 @@ delete from t2;
load data infile '../../std_data/rpl_loaddata2.dat' into table t2 fields
terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by
'\n##\n' starting by '>' ignore 1 lines;
ERROR 23000: Duplicate entry '2003-03-22' for key 1
ERROR 23000: Duplicate entry '2003-03-22' for key 'day'
drop table t2;
drop table t2;
......@@ -392,11 +392,11 @@ DROP TABLE t7;
CREATE TABLE t7 (a INT PRIMARY KEY, b INT UNIQUE, c INT UNIQUE) ENGINE = 'NDB' ;
INSERT INTO t7 VALUES (99,99,99);
INSERT INTO t7 VALUES (99,22,33);
ERROR 23000: Duplicate entry '99' for key 1
ERROR 23000: Duplicate entry '99' for key 'PRIMARY'
INSERT INTO t7 VALUES (11,99,33);
ERROR 23000: Duplicate entry '11' for key 1
ERROR 23000: Duplicate entry '11' for key 'PRIMARY'
INSERT INTO t7 VALUES (11,22,99);
ERROR 23000: Duplicate entry '11' for key 1
ERROR 23000: Duplicate entry '11' for key 'PRIMARY'
SELECT * FROM t7 ORDER BY a;
a b c
99 99 99
......
......@@ -9,5 +9,5 @@ set sql_log_bin=0;
insert into t1 values(2);
set sql_log_bin=1;
insert into t1 values(1),(2);
ERROR 23000: Duplicate entry '2' for key 1
ERROR 23000: Duplicate entry '2' for key 'a'
drop table t1;
......@@ -32,7 +32,7 @@ t1 0 PRIMARY 1 a A 5 NULL NULL BTREE
t1 1 b 1 b A 1 NULL NULL BTREE
t1 1 b 2 c A 5 NULL NULL BTREE
insert into t1 values (5,5,5);
ERROR 23000: Duplicate entry '5' for key 1
ERROR 23000: Duplicate entry '5' for key 'PRIMARY'
optimize table t1;
Table Op Msg_type Msg_text
test.t1 optimize status OK
......
......@@ -425,7 +425,7 @@ set y = x;
end|
set @x = 0|
call bug3279(@x)|
ERROR 23000: Duplicate entry '6' for key 1
ERROR 23000: Duplicate entry '6' for key 'PRIMARY'
select @x|
@x
0
......
......@@ -3420,7 +3420,7 @@ begin
select bug12379();
end|
select bug12379()|
ERROR 23000: Duplicate entry 'X' for key 1
ERROR 23000: Duplicate entry 'X' for key 'PRIMARY'
select 1|
1
1
......@@ -3437,7 +3437,7 @@ select 3|
3
3
call bug12379_3()|
ERROR 23000: Duplicate entry 'X' for key 1
ERROR 23000: Duplicate entry 'X' for key 'PRIMARY'
select 4|
4
4
......@@ -3492,7 +3492,7 @@ s1
0
1
call bug6127()|
ERROR 23000: Duplicate entry '0' for key 1
ERROR 23000: Duplicate entry '0' for key 's1'
select * from t3|
s1
0
......
......@@ -82,7 +82,7 @@ end if;
return i;
end|
insert into t1 values (bug10015_5(4)), (bug10015_5(5))|
ERROR 23000: Duplicate entry '1' for key 1
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
select * from t1|
id
1
......
......@@ -77,7 +77,7 @@ drop table t1,t2;
create temporary table t1 (a int not null);
insert into t1 values (1),(1);
alter table t1 add primary key (a);
ERROR 23000: Duplicate entry '1' for key 1
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
drop table t1;
CREATE TABLE t1 (
d datetime default NULL
......
......@@ -47,7 +47,7 @@ create table t1 (s1 binary(2) primary key);
insert into t1 values (0x01);
insert into t1 values (0x0120);
insert into t1 values (0x0100);
ERROR 23000: Duplicate entry '' for key 1
ERROR 23000: Duplicate entry '' for key 'PRIMARY'
select hex(s1) from t1 order by s1;
hex(s1)
0100
......
......@@ -71,7 +71,7 @@ hex(a)
1
1
alter table t1 add unique (a);
ERROR 23000: Duplicate entry '' for key 1
ERROR 23000: Duplicate entry '' for key 'a'
drop table t1;
create table t1 (a bit(2));
insert into t1 values (b'00'), (b'01'), (b'10'), (b'100');
......
......@@ -71,7 +71,7 @@ hex(a)
1
1
alter table t1 add unique (a);
ERROR 23000: Duplicate entry '' for key 1
ERROR 23000: Duplicate entry '' for key 'a'
drop table t1;
create table t1 (a bit(2)) engine=innodb;
insert into t1 values (b'00'), (b'01'), (b'10'), (b'100');
......
......@@ -530,9 +530,9 @@ l longblob NULL YES NULL #
drop table t1;
create table t1 (id integer primary key auto_increment, txt text not null, unique index txt_index (txt (20)));
insert into t1 (txt) values ('Chevy'), ('Chevy ');
ERROR 23000: Duplicate entry 'Chevy ' for key 2
ERROR 23000: Duplicate entry 'Chevy ' for key 'txt_index'
insert into t1 (txt) values ('Chevy'), ('CHEVY');
ERROR 23000: Duplicate entry 'Chevy' for key 2
ERROR 23000: Duplicate entry 'Chevy' for key 'txt_index'
alter table t1 drop index txt_index, add index txt_index (txt(20));
insert into t1 (txt) values ('Chevy ');
select * from t1 where txt='Chevy';
......
......@@ -62,7 +62,7 @@ binary v='a '
1
insert into t1 values('a');
alter table t1 add primary key (v);
ERROR 23000: Duplicate entry 'a' for key 1
ERROR 23000: Duplicate entry 'a' for key 'PRIMARY'
drop table t1;
create table t1 (v varbinary(20));
insert into t1 values('a');
......
......@@ -1857,12 +1857,7 @@ void handler::print_error(int error, myf errflag)
str.length(max_length-4);
str.append(STRING_WITH_LEN("..."));
}
#ifdef XXX_TO_BE_DONE_BY_A_FOLLOWUP_OF_WL1563
my_printf_error(ER_DUP_ENTRY, "Duplicate entry '%s' for key '%s'",
MYF(0), str.c_ptr(), table->key_info[key_nr].name);
#else
my_error(ER_DUP_ENTRY, MYF(0), str.c_ptr(), key_nr+1);
#endif
my_error(ER_DUP_ENTRY, MYF(0), str.c_ptr(), table->key_info[key_nr].name);
DBUG_VOID_RETURN;
}
textno=ER_DUP_KEY;
......
......@@ -1479,30 +1479,30 @@ ER_DUP_KEYNAME 42000 S1009
swe "Nyckelnamn '%-.64s' finns flera gnger"
ukr " ' '%-.64s'"
ER_DUP_ENTRY 23000 S1009
cze "Zvojen-B kl '%-.64s' (slo kle %d)"
dan "Ens vrdier '%-.64s' for indeks %d"
nla "Dubbele ingang '%-.64s' voor zoeksleutel %d"
eng "Duplicate entry '%-.64s' for key %d"
jps "'%-.64s' key %d ɂďdĂ܂",
est "Kattuv vrtus '%-.64s' vtmele %d"
fre "Duplicata du champ '%-.64s' pour la clef %d"
ger "Doppelter Eintrag '%-.64s' fr Schlssel %d"
greek " '%-.64s' %d"
hun "Duplikalt bejegyzes '%-.64s' a %d kulcs szerint."
ita "Valore duplicato '%-.64s' per la chiave %d"
jpn "'%-.64s' key %d ˤƽʣƤޤ"
kor "ߺ Է '%-.64s': key %d"
nor "Like verdier '%-.64s' for nkkel %d"
norwegian-ny "Like verdiar '%-.64s' for nykkel %d"
pol "Powtrzone wyst?pienie '%-.64s' dla klucza %d"
por "Entrada '%-.64s' duplicada para a chave %d"
rum "Cimpul '%-.64s' e duplicat pentru cheia %d"
rus " '%-.64s' %d"
serbian "Dupliran unos '%-.64s' za klju '%d'"
slo "Opakovan k '%-.64s' (slo ka %d)"
spa "Entrada duplicada '%-.64s' para la clave %d"
swe "Dubbel nyckel '%-.64s' fr nyckel %d"
ukr " '%-.64s' %d"
cze "Zvojen-B kl '%-.64s' (slo kle '%-.64s')"
dan "Ens vrdier '%-.64s' for indeks '%-.64s'"
nla "Dubbele ingang '%-.64s' voor zoeksleutel '%-.64s'"
eng "Duplicate entry '%-.64s' for key '%-.64s'"
jps "'%-.64s' key '%-.64s' ɂďdĂ܂",
est "Kattuv vrtus '%-.64s' vtmele '%-.64s'"
fre "Duplicata du champ '%-.64s' pour la clef '%-.64s'"
ger "Doppelter Eintrag '%-.64s' fr Schlssel '%-.64s'"
greek " '%-.64s' '%-.64s'"
hun "Duplikalt bejegyzes '%-.64s' a '%-.64s' kulcs szerint."
ita "Valore duplicato '%-.64s' per la chiave '%-.64s'"
jpn "'%-.64s' key '%-.64s' ˤƽʣƤޤ"
kor "ߺ Է '%-.64s': key '%-.64s'"
nor "Like verdier '%-.64s' for nkkel '%-.64s'"
norwegian-ny "Like verdiar '%-.64s' for nykkel '%-.64s'"
pol "Powtrzone wyst?pienie '%-.64s' dla klucza '%-.64s'"
por "Entrada '%-.64s' duplicada para a chave '%-.64s'"
rum "Cimpul '%-.64s' e duplicat pentru cheia '%-.64s'"
rus " '%-.64s' '%-.64s'"
serbian "Dupliran unos '%-.64s' za klju '%-.64s'"
slo "Opakovan k '%-.64s' (slo ka '%-.64s')"
spa "Entrada duplicada '%-.64s' para la clave '%-.64s'"
swe "Dubbel nyckel '%-.64s' fr nyckel '%-.64s'"
ukr " '%-.64s' '%-.64s'"
ER_WRONG_FIELD_SPEC 42000 S1009
cze "Chybn-B specifikace sloupce '%-.64s'"
dan "Forkert kolonnespecifikaton for felt '%-.64s'"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment