Merge bk-internal.mysql.com:/data0/bk/mysql-5.1

into  bk-internal.mysql.com:/data0/bk/mysql-5.1-marvel


mysql-test/t/myisam.test:
  Auto merged
mysql-test/t/ndb_basic.test:
  Auto merged
This commit is contained in:
unknown 2007-01-25 12:28:00 +01:00
commit a0a847fd45
61 changed files with 293 additions and 261 deletions

View file

@ -92,9 +92,9 @@ if [ "x$warning_mode" != "xpedantic" ]; then
# Both C and C++ warnings
warnings="-Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W"
warnings="$warnings -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare"
warnings="$warnings -Wwrite-strings"
warnings="$warnings -Wwrite-strings -Wunused-function -Wunused-label -Wunused-value -Wunused-variable -Wshadow"
# C warnings
c_warnings="$warnings -Wunused"
c_warnings="$warnings -Wunused-parameter"
# C++ warnings
cxx_warnings="$warnings -Woverloaded-virtual -Wsign-promo -Wreorder"
cxx_warnings="$warnings -Wctor-dtor-privacy -Wnon-virtual-dtor"

View file

@ -13,7 +13,7 @@ insert into t1 values(2);
create table t2(a int);
insert into t2 values(1),(2);
reset master;
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 select * from t2;
# The above should produce an error, but still be in the binlog;
# verify the binlog :
@ -29,7 +29,7 @@ drop table t1, t2;
create table t1(a int);
insert into t1 values(1),(1);
reset master;
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
create table t2(unique(a)) select a from t1;
# The above should produce an error, *and* not appear in the binlog
let $VERSION=`select version()`;

View file

@ -273,12 +273,12 @@ set autocommit=0;
CREATE TABLE t1 (a int, b int) engine=myisam;
reset master;
INSERT INTO t1 values (1,1),(1,2);
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
CREATE TABLE t2 (primary key (a)) engine=innodb select * from t1;
# This should give warning
DROP TABLE if exists t2;
INSERT INTO t1 values (3,3);
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
CREATE TEMPORARY TABLE t2 (primary key (a)) engine=innodb select * from t1;
ROLLBACK;
# This should give warning
@ -286,12 +286,12 @@ DROP TABLE IF EXISTS t2;
CREATE TABLE t2 (a int, b int, primary key (a)) engine=innodb;
INSERT INTO t1 VALUES (4,4);
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
CREATE TABLE IF NOT EXISTS t2 (primary key (a)) engine=innodb select * from t1;
SELECT * from t2;
TRUNCATE table t2;
INSERT INTO t1 VALUES (5,5);
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
INSERT INTO t2 select * from t1;
SELECT * FROM t2;
DROP TABLE t2;
@ -301,25 +301,25 @@ CREATE TEMPORARY TABLE t2 (a int, b int, primary key (a)) engine=innodb ;
INSERT INTO t1 values (7,7);
ROLLBACK;
INSERT INTO t1 values (8,8);
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
CREATE TEMPORARY TABLE IF NOT EXISTS t2 (primary key (a)) engine=innodb select * from t1;
COMMIT;
INSERT INTO t1 values (9,9);
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
CREATE TEMPORARY TABLE IF NOT EXISTS t2 (primary key (a)) engine=innodb select * from t1;
ROLLBACK;
SELECT * from t2;
TRUNCATE table t2;
INSERT INTO t1 values (10,10);
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
INSERT INTO t2 select * from t1;
SELECT * from t1;
INSERT INTO t2 values (100,100);
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
CREATE TEMPORARY TABLE IF NOT EXISTS t2 (primary key (a)) engine=innodb select * from t1;
COMMIT;
INSERT INTO t2 values (101,101);
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
CREATE TEMPORARY TABLE IF NOT EXISTS t2 (primary key (a)) engine=innodb select * from t1;
ROLLBACK;
SELECT * from t2;

View file

@ -76,7 +76,7 @@ insert into t1 values (NULL),(5),(NULL),(NULL);
insert into t1 values (500),(NULL),(502),(NULL),(NULL);
select * from t1;
set @@insert_id=600;
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values(600),(NULL),(NULL);
set @@insert_id=600;
insert ignore into t1 values(600),(NULL),(NULL),(610),(NULL);
@ -119,7 +119,7 @@ set auto_increment_increment=11;
set auto_increment_offset=4;
insert into t1 values(null);
insert into t1 values(null);
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values(null);
select a, mod(a-@@auto_increment_offset,@@auto_increment_increment) from t1 order by a;

View file

@ -22,8 +22,8 @@ SET TIMESTAMP=1000000000;
CREATE TABLE t3 ( a INT UNIQUE );
SET FOREIGN_KEY_CHECKS=0;
# Had to add 1022 for run with ndb as ndb uses different
# error and error code for 1062. Bug 16677
--error 1022, 1062
# error and error code for error ER_DUP_ENTRY_WITH_KEY_NAME. Bug 16677
--error 1022, ER_DUP_ENTRY_WITH_KEY_NAME
INSERT INTO t3 VALUES (1),(1);
sync_slave_with_master;

View file

@ -97,7 +97,7 @@ SET TIMESTAMP=1000000000;
CREATE TABLE t1 ( a INT UNIQUE );
SET FOREIGN_KEY_CHECKS=0;
# Duplicate Key Errors
--error 1022, 1062
--error 1022, ER_DUP_ENTRY_WITH_KEY_NAME
INSERT INTO t1 VALUES (1),(1);
sync_slave_with_master;
connection master;

View file

@ -80,7 +80,7 @@ SET TIMESTAMP=1000000000;
CREATE TABLE t1 ( a INT UNIQUE );
SET FOREIGN_KEY_CHECKS=0;
# Duplicate Key Errors codes
--error 1022, 1062
--error 1022, ER_DUP_ENTRY_WITH_KEY_NAME
INSERT INTO t1 VALUES (1),(1);
sync_slave_with_master;
connection master;

View file

@ -130,7 +130,7 @@ connection master;
reset master;
eval create table t2 (day date,id int(9),category enum('a','b','c'),name varchar(60),
unique(day)) engine=$engine_type; # no transactions
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
load data infile '../std_data_ln/rpl_loaddata2.dat' into table t2 fields
terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by
'\n##\n' starting by '>' ignore 1 lines;
@ -146,7 +146,7 @@ select * from t2;
alter table t2 drop key day;
connection master;
delete from t2;
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
load data infile '../std_data_ln/rpl_loaddata2.dat' into table t2 fields
terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by
'\n##\n' starting by '>' ignore 1 lines;

View file

@ -195,11 +195,11 @@ eval CREATE TABLE t8 (a INT PRIMARY KEY, b INT UNIQUE, c INT UNIQUE) ENGINE = $t
# First we make sure that the constraints are correctly set.
INSERT INTO t8 VALUES (99,99,99);
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
INSERT INTO t8 VALUES (99,22,33);
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
INSERT INTO t8 VALUES (11,99,33);
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
INSERT INTO t8 VALUES (11,22,99);
SELECT * FROM t8 ORDER BY a;

View file

@ -19,7 +19,7 @@ set sql_log_bin=0;
insert into t1 values(2);
set sql_log_bin=1;
save_master_pos;
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values(1),(2);
drop table t1;
save_master_pos;

View file

@ -29,7 +29,7 @@ delimiter ;//
INSERT INTO test.t2 VALUES (1, 0.0);
# Expect duplicate error 1022 == ndb
--error 1022,1062
--error 1022, ER_DUP_ENTRY_WITH_KEY_NAME
INSERT INTO test.t2 VALUES (1, 0.0);
#show binlog events;

View file

@ -393,24 +393,24 @@ DROP TABLE t1;
CREATE TABLE t1 (a int, b int);
insert into t1 values (1,1),(1,2);
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
CREATE TABLE t2 (primary key (a)) select * from t1;
# This should give warning
drop table if exists t2;
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
CREATE TEMPORARY TABLE t2 (primary key (a)) select * from t1;
# This should give warning
drop table if exists t2;
CREATE TABLE t2 (a int, b int, primary key (a));
BEGIN;
INSERT INTO t2 values(100,100);
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
CREATE TABLE IF NOT EXISTS t2 (primary key (a)) select * from t1;
SELECT * from t2;
ROLLBACK;
SELECT * from t2;
TRUNCATE table t2;
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
INSERT INTO t2 select * from t1;
SELECT * from t2;
drop table t2;
@ -418,19 +418,19 @@ drop table t2;
CREATE TEMPORARY TABLE t2 (a int, b int, primary key (a));
BEGIN;
INSERT INTO t2 values(100,100);
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
CREATE TEMPORARY TABLE IF NOT EXISTS t2 (primary key (a)) select * from t1;
SELECT * from t2;
COMMIT;
BEGIN;
INSERT INTO t2 values(101,101);
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
CREATE TEMPORARY TABLE IF NOT EXISTS t2 (primary key (a)) select * from t1;
SELECT * from t2;
ROLLBACK;
SELECT * from t2;
TRUNCATE table t2;
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
INSERT INTO t2 select * from t1;
SELECT * from t2;
drop table t1,t2;

View file

@ -96,7 +96,7 @@ INSERT INTO t1 VALUES (1,0,0),(3,1,1),(4,1,1),(8,2,2),(9,2,2),(17,3,2),(22,4,2),
update t1 set parent_id=parent_id+100;
select * from t1 where parent_id=102;
update t1 set id=id+1000;
-- error 1062,1022
-- error ER_DUP_ENTRY_WITH_KEY_NAME,1022
update t1 set id=1024 where id=1009;
select * from t1;
update ignore t1 set id=id+1; # This will change all rows
@ -179,13 +179,13 @@ commit;
select n, "after commit" from t1;
commit;
insert into t1 values (5);
-- error 1062
-- error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values (4);
commit;
select n, "after commit" from t1;
set autocommit=1;
insert into t1 values (6);
-- error 1062
-- error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values (4);
select n from t1;
set autocommit=0;
@ -259,7 +259,7 @@ drop table t1;
eval CREATE TABLE t1 (id char(8) not null primary key, val int not null) engine=$engine_type;
insert into t1 values ('pippo', 12);
-- error 1062
-- error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values ('pippo', 12); # Gives error
delete from t1;
delete from t1 where id = 'pippo';
@ -390,9 +390,9 @@ eval CREATE TABLE t1 (
insert into t1 (ggid,passwd) values ('test1','xxx');
insert into t1 (ggid,passwd) values ('test2','yyy');
-- error 1062
-- error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 (ggid,passwd) values ('test2','this will fail');
-- error 1062
-- error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 (ggid,id) values ('this will fail',1);
select * from t1 where ggid='test1';
@ -401,7 +401,7 @@ select * from t1 where id=2;
replace into t1 (ggid,id) values ('this will work',1);
replace into t1 (ggid,passwd) values ('test2','this will work');
-- error 1062
-- error ER_DUP_ENTRY_WITH_KEY_NAME
update t1 set id=100,ggid='test2' where id=1;
select * from t1;
select * from t1 where id=1;
@ -572,7 +572,7 @@ drop table t1;
eval 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=$engine_type;
insert into t1 values (0,0,0,'ABCDEFGHIJ'),(2,2,2,'BCDEFGHIJK'),(1,1,1,'CDEFGHIJKL');
LOCK TABLES t1 WRITE;
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values (99,1,2,'D'),(1,1,2,'D');
select id from t1;
select id from t1;
@ -583,7 +583,7 @@ eval create table t1 (id int NOT NULL,id2 int NOT NULL,id3 int NOT NULL,dummy1 c
insert into t1 values (0,0,0,'ABCDEFGHIJ'),(2,2,2,'BCDEFGHIJK'),(1,1,1,'CDEFGHIJKL');
LOCK TABLES t1 WRITE;
begin;
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values (99,1,2,'D'),(1,1,2,'D');
select id from t1;
insert ignore into t1 values (100,1,2,'D'),(1,1,99,'D');
@ -1513,7 +1513,7 @@ eval create table t1 (rowid int not null auto_increment, val int not null,primar
key (rowid), unique(val)) engine=$engine_type;
replace into t1 (val) values ('1'),('2');
replace into t1 (val) values ('1'),('2');
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 (val) values ('1'),('2');
select * from t1;
drop table t1;
@ -1528,7 +1528,7 @@ eval create table t1 (a int not null auto_increment primary key, val int) engine
insert into t1 (val) values (1);
update t1 set a=2 where a=1;
# We should get the following error because InnoDB does not update the counter
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 (val) values (1);
select * from t1;
drop table t1;
@ -2027,13 +2027,13 @@ eval create table t3 (s1 varchar(2) binary,primary key (s1)) engine=$engine_type
eval create table t4 (s1 char(2) binary,primary key (s1)) engine=$engine_type;
insert into t1 values (0x41),(0x4120),(0x4100);
-- error 1062
-- error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t2 values (0x41),(0x4120),(0x4100);
insert into t2 values (0x41),(0x4120);
-- error 1062
-- error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t3 values (0x41),(0x4120),(0x4100);
insert into t3 values (0x41),(0x4100);
-- error 1062
-- error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t4 values (0x41),(0x4120),(0x4100);
insert into t4 values (0x41),(0x4100);
select hex(s1) from t1;

View file

@ -193,7 +193,7 @@ prepare stmt1 from 'insert into t1 values(6, ? )';
execute stmt1 using @arg00;
select a,b from t1 where b = @arg00;
# the second insert fails, because the first column is primary key
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
execute stmt1 using @arg00;
set @arg00=NULL ;
prepare stmt1 from 'insert into t1 values(0, ? )';
@ -272,7 +272,7 @@ execute stmt1 using @arg00, @arg01;
select * from t1 order by a;
set @arg00=81 ;
set @arg01=1 ;
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
execute stmt1 using @arg00, @arg01;
## insert, autoincrement column and ' SELECT LAST_INSERT_ID() '

View file

@ -90,7 +90,7 @@ delete from t3 where t1_id = 1 and t2_id = 1;
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;
begin;
insert into t3 VALUES ( NULL, 1, 1, 2 );
-- error 1062
-- error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t3 VALUES ( NULL, 1, 1, 2 );
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;

View file

@ -81,7 +81,7 @@ explain select count(*) from t1 where v between 'a' and 'a ';
--replace_column 9 #
explain select count(*) from t1 where v between 'a' and 'a ' and v between 'a ' and 'b\n';
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
alter table t1 add unique(v);
alter table t1 add key(v);
select concat('*',v,'*',c,'*',t,'*') as qq from t1 where v='a';
@ -179,17 +179,17 @@ drop table t1;
create table t1 (a char(10), unique (a));
insert into t1 values ('a ');
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values ('a ');
alter table t1 modify a varchar(10);
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values ('a '),('a '),('a '),('a ');
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values ('a ');
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values ('a ');
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values ('a ');
update t1 set a='a ' where a like 'a%';
select concat(a,'.') from t1;

View file

@ -285,7 +285,7 @@ ERROR 23000: Duplicate entry '3' for key 'PRIMARY'
show warnings;
Level Code Message
Note 1050 Table 't1' already exists
Error 1062 Duplicate entry '3' for key 'PRIMARY'
Error 1582 Duplicate entry '3' for key 'PRIMARY'
show status like "Opened_tables";
Variable_name Value
Opened_tables 2

View file

@ -107,7 +107,7 @@ call foo4();
ERROR 23000: Duplicate entry '20' for key 'a'
show warnings;
Level Code Message
Error 1062 Duplicate entry '20' for key 'a'
Error 1582 Duplicate entry '20' for key 'a'
select * from t2;
a
20
@ -241,7 +241,7 @@ return 10;
end|
do fn1(100);
Warnings:
Error 1062 Duplicate entry '100' for key 'a'
Error 1582 Duplicate entry '100' for key 'a'
select fn1(20);
ERROR 23000: Duplicate entry '20' for key 'a'
select * from t2;

View file

@ -1493,10 +1493,10 @@ insert into t3 (a) values (1)|
create procedure h_ee()
deterministic
begin
declare continue handler for 1062 -- ER_DUP_ENTRY
declare continue handler for 1582 -- ER_DUP_ENTRY_WITH_KEY_NAME
select 'Outer (bad)' as 'h_ee';
begin
declare continue handler for 1062 -- ER_DUP_ENTRY
declare continue handler for 1582 -- ER_DUP_ENTRY_WITH_KEY_NAME
select 'Inner (good)' as 'h_ee';
insert into t3 values (1);
end;
@ -1504,7 +1504,7 @@ end|
create procedure h_es()
deterministic
begin
declare continue handler for 1062 -- ER_DUP_ENTRY
declare continue handler for 1582 -- ER_DUP_ENTRY_WITH_KEY_NAME
select 'Outer (good)' as 'h_es';
begin
-- integrity constraint violation
@ -1541,7 +1541,7 @@ end|
create procedure h_ex()
deterministic
begin
declare continue handler for 1062 -- ER_DUP_ENTRY
declare continue handler for 1582 -- ER_DUP_ENTRY_WITH_KEY_NAME
select 'Outer (good)' as 'h_ex';
begin
declare continue handler for sqlexception
@ -1556,7 +1556,7 @@ begin
declare continue handler for sqlstate '23000'
select 'Outer (bad)' as 'h_se';
begin
declare continue handler for 1062 -- ER_DUP_ENTRY
declare continue handler for 1582 -- ER_DUP_ENTRY_WITH_KEY_NAME
select 'Inner (good)' as 'h_se';
insert into t3 values (1);
end;
@ -1696,7 +1696,7 @@ begin
declare continue handler for sqlexception
select 'Outer (bad)' as 'h_xe';
begin
declare continue handler for 1062 -- ER_DUP_ENTRY
declare continue handler for 1582 -- ER_DUP_ENTRY_WITH_KEY_NAME
select 'Inner (good)' as 'h_xe';
insert into t3 values (1);
end;
@ -4701,10 +4701,10 @@ insert into t3 values (1)|
create procedure bug15011()
deterministic
begin
declare continue handler for 1062
declare continue handler for 1582
select 'Outer' as 'Handler';
begin
declare continue handler for 1062
declare continue handler for 1582
select 'Inner' as 'Handler';
insert into t3 values (1);
end;

View file

@ -2675,19 +2675,21 @@ lName varchar(25) NOT NULL,
DOB date NOT NULL,
uID int unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY);
INSERT INTO t1(fName, lName, DOB) VALUES
('Alice', 'Hill', date_sub(curdate(), interval 15271 day)),
('Bob', 'Adams', date_sub(curdate(), interval 33600 day)),
('Carol', 'Simpson', date_sub(curdate(), interval 13700 day));
('Hank', 'Hill', '1964-09-29'),
('Tom', 'Adams', '1908-02-14'),
('Homer', 'Simpson', '1968-03-05');
CREATE VIEW v1 AS
SELECT (year(now())-year(DOB)) AS Age
FROM t1 HAVING Age < 75;
SHOW CREATE VIEW v1;
View Create View
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select (year(now()) - year(`t1`.`DOB`)) AS `Age` from `t1` having (`Age` < 75)
set timestamp=1136066400;
SELECT (year(now())-year(DOB)) AS Age FROM t1 HAVING Age < 75;
Age
42
38
set timestamp=1136066400;
SELECT * FROM v1;
Age
42

View file

@ -101,10 +101,10 @@ insert into t1 set i = 254;
insert into t1 set i = null;
select last_insert_id();
explain extended select last_insert_id();
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 set i = 254;
select last_insert_id();
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 set i = null;
select last_insert_id();
drop table t1;
@ -122,7 +122,7 @@ insert into t1 values (NULL, 10);
select last_insert_id();
insert into t1 values (NULL, 15);
select last_insert_id();
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values (NULL, 10);
select last_insert_id();
@ -277,7 +277,7 @@ create table t1 (rowid int not null auto_increment, val int not null,primary
key (rowid), unique(val));
replace into t1 (val) values ('1'),('2');
replace into t1 (val) values ('1'),('2');
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 (val) values ('1'),('2');
select * from t1;
drop table t1;
@ -300,7 +300,7 @@ drop table t1;
CREATE TABLE t1 (t1 INT(10) PRIMARY KEY, t2 INT(10));
INSERT INTO t1 VALUES(0, 0);
INSERT INTO t1 VALUES(1, 1);
--error ER_DUP_ENTRY
--error ER_DUP_ENTRY_WITH_KEY_NAME
ALTER TABLE t1 CHANGE t1 t1 INT(10) auto_increment;
DROP TABLE t1;

View file

@ -153,7 +153,7 @@ drop table if exists t1,t2;
CREATE TABLE t1 (a int not null);
INSERT INTO t1 values (1),(2),(1);
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
CREATE TABLE t2 (primary key(a)) SELECT * FROM t1;
--error 1146
SELECT * from t2;
@ -232,7 +232,7 @@ insert into t1 values (1,1);
create table if not exists t1 select 2;
select * from t1;
create table if not exists t1 select 3 as 'a',4 as 'b';
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
create table if not exists t1 select 3 as 'a',3 as 'b';
show warnings;
show status like "Opened_tables";
@ -684,30 +684,30 @@ drop table t1;
CREATE TABLE t1 (a int, b int);
insert into t1 values (1,1),(1,2);
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
CREATE TABLE t2 (primary key (a)) select * from t1;
# This should give warning
drop table if exists t2;
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
CREATE TEMPORARY TABLE t2 (primary key (a)) select * from t1;
# This should give warning
drop table if exists t2;
CREATE TABLE t2 (a int, b int, primary key (a));
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
CREATE TABLE IF NOT EXISTS t2 (primary key (a)) select * from t1;
SELECT * from t2;
TRUNCATE table t2;
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
INSERT INTO t2 select * from t1;
SELECT * from t2;
drop table t2;
CREATE TEMPORARY TABLE t2 (a int, b int, primary key (a));
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
CREATE TEMPORARY TABLE IF NOT EXISTS t2 (primary key (a)) select * from t1;
SELECT * from t2;
TRUNCATE table t2;
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
INSERT INTO t2 select * from t1;
SELECT * from t2;
drop table t1,t2;

View file

@ -14,19 +14,19 @@ drop table if exists t1, t2;
--enable_warnings
CREATE TABLE t1 ( a int );
INSERT INTO t1 VALUES (1),(2),(1);
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
CREATE TABLE t2 ( PRIMARY KEY (a) ) ENGINE=INNODB SELECT a FROM t1;
--error 1146
select * from t2;
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
CREATE TEMPORARY TABLE t2 ( PRIMARY KEY (a) ) ENGINE=INNODB SELECT a FROM t1;
--error 1146
select * from t2;
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
CREATE TABLE t2 ( PRIMARY KEY (a) ) ENGINE=MYISAM SELECT a FROM t1;
--error 1146
select * from t2;
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
CREATE TEMPORARY TABLE t2 ( PRIMARY KEY (a) ) ENGINE=MYISAM SELECT a FROM t1;
--error 1146
select * from t2;

View file

@ -230,9 +230,9 @@ drop table t2;
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');
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values ('aaaaaaaaaaa');
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values ('aaaaaaaaaaaa');
insert into t1 values (repeat('b',20));
select c c1 from t1 where c='1';
@ -254,9 +254,9 @@ create table t1 (c varchar(30) character set utf8, unique(c(10))) engine=innodb;
--enable_warnings
insert into t1 values ('1'),('2'),('3'),('x'),('y'),('z');
insert into t1 values ('aaaaaaaaaa');
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values ('aaaaaaaaaaa');
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values ('aaaaaaaaaaaa');
insert into t1 values (repeat('b',20));
select c c1 from t1 where c='1';
@ -276,23 +276,23 @@ create table t1 (c char(3) character set utf8, unique (c(2)));
insert into t1 values ('1'),('2'),('3'),('4'),('x'),('y'),('z');
insert into t1 values ('a');
insert into t1 values ('aa');
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values ('aaa');
insert into t1 values ('b');
insert into t1 values ('bb');
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values ('bbb');
insert into t1 values ('а');
insert into t1 values ('аа');
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values ('ааа');
insert into t1 values ('б');
insert into t1 values ('бб');
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values ('ббб');
insert into t1 values ('ꪪ');
insert into t1 values ('ꪪꪪ');
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values ('ꪪꪪꪪ');
drop table t1;
#
@ -305,23 +305,23 @@ 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');
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values ('aaa');
insert into t1 values ('b');
insert into t1 values ('bb');
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values ('bbb');
insert into t1 values ('а');
insert into t1 values ('аа');
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values ('ааа');
insert into t1 values ('б');
insert into t1 values ('бб');
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values ('ббб');
insert into t1 values ('ꪪ');
insert into t1 values ('ꪪꪪ');
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values ('ꪪꪪꪪ');
drop table t1;
#
@ -334,14 +334,14 @@ unique key a using hash (c(1))
) engine=heap;
show create table t1;
insert into t1 values ('a'),('b'),('c'),('d'),('e'),('f');
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values ('aa');
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values ('aaa');
insert into t1 values ('б');
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values ('бб');
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values ('ббб');
select c as c_all from t1 order by c;
select c as c_a from t1 where c='a';
@ -358,14 +358,14 @@ unique key a using btree (c(1))
) engine=heap;
show create table t1;
insert into t1 values ('a'),('b'),('c'),('d'),('e'),('f');
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values ('aa');
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values ('aaa');
insert into t1 values ('б');
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values ('бб');
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values ('ббб');
select c as c_all from t1 order by c;
select c as c_a from t1 where c='a';
@ -383,14 +383,14 @@ unique key a (c(1))
) engine=innodb;
--enable_warnings
insert into t1 values ('a'),('b'),('c'),('d'),('e'),('f');
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values ('aa');
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values ('aaa');
insert into t1 values ('б');
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values ('бб');
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values ('ббб');
select c as c_all from t1 order by c;
select c as c_a from t1 where c='a';
@ -404,9 +404,9 @@ drop table t1;
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');
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values ('aaaaaaaaaaa');
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values ('aaaaaaaaaaaa');
insert into t1 values (repeat('b',20));
select c c1 from t1 where c='1';
@ -427,23 +427,23 @@ create table t1 (c char(3) character set utf8 collate utf8_bin, unique (c(2)));
insert into t1 values ('1'),('2'),('3'),('4'),('x'),('y'),('z');
insert into t1 values ('a');
insert into t1 values ('aa');
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values ('aaa');
insert into t1 values ('b');
insert into t1 values ('bb');
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values ('bbb');
insert into t1 values ('а');
insert into t1 values ('аа');
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values ('ааа');
insert into t1 values ('б');
insert into t1 values ('бб');
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values ('ббб');
insert into t1 values ('ꪪ');
insert into t1 values ('ꪪꪪ');
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values ('ꪪꪪꪪ');
drop table t1;
@ -457,14 +457,14 @@ unique key a using hash (c(1))
) engine=heap;
show create table t1;
insert into t1 values ('a'),('b'),('c'),('d'),('e'),('f');
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values ('aa');
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values ('aaa');
insert into t1 values ('б');
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values ('бб');
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values ('ббб');
select c as c_all from t1 order by c;
select c as c_a from t1 where c='a';
@ -481,14 +481,14 @@ unique key a using btree (c(1))
) engine=heap;
show create table t1;
insert into t1 values ('a'),('b'),('c'),('d'),('e'),('f');
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values ('aa');
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values ('aaa');
insert into t1 values ('б');
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values ('бб');
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values ('ббб');
select c as c_all from t1 order by c;
select c as c_a from t1 where c='a';
@ -506,14 +506,14 @@ unique key a (c(1))
) engine=innodb;
--enable_warnings
insert into t1 values ('a'),('b'),('c'),('d'),('e'),('f');
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values ('aa');
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values ('aaa');
insert into t1 values ('б');
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values ('бб');
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values ('ббб');
select c as c_all from t1 order by c;
select c as c_a from t1 where c='a';

View file

@ -184,7 +184,7 @@ INSERT INTO t1 VALUES( 49, 71), (NULL, 72), (NULL, 73);
INSERT INTO t1 VALUES(NULL, 81), (NULL, 82), (NULL, 83);
# Create a duplicate value.
SET insert_id= 114;
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
INSERT INTO t1 VALUES(NULL, 91);
INSERT INTO t1 VALUES (NULL, 92), (NULL, 93);
# Check what we have now

View file

@ -128,7 +128,7 @@ SELECT * FROM t1 WHERE b=NULL;
explain SELECT * FROM t1 WHERE b IS NULL;
SELECT * FROM t1 WHERE b<=>NULL;
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
INSERT INTO t1 VALUES (1,3);
DROP TABLE t1;
@ -270,7 +270,7 @@ explain select count(*) from t1 where v like 'a%';
explain select count(*) from t1 where v between 'a' and 'a ';
explain select count(*) from t1 where v between 'a' and 'a ' and v between 'a ' and 'b\n';
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
alter table t1 add unique(v);
select concat('*',v,'*',c,'*',t,'*') as qq from t1 where v='a' order by length(concat('*',v,'*',c,'*',t,'*'));
explain select * from t1 where v='a';
@ -296,17 +296,17 @@ drop table t1;
create table t1 (a char(10), unique (a));
insert into t1 values ('a');
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values ('a ');
alter table t1 modify a varchar(10);
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values ('a '),('a '),('a '),('a ');
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values ('a ');
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values ('a ');
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values ('a ');
update t1 set a='a ' where a like 'a ';
update t1 set a='a ' where a like 'a ';
@ -357,7 +357,7 @@ explain select count(*) from t1 where v between 'a' and 'a ';
--replace_column 9 #
explain select count(*) from t1 where v between 'a' and 'a ' and v between 'a ' and 'b\n';
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
alter table t1 add unique(v);
select concat('*',v,'*',c,'*',t,'*') as qq from t1 where v='a' order by length(concat('*',v,'*',c,'*',t,'*'));
# Number of rows is not constant for b-trees keys
@ -372,17 +372,17 @@ drop table t1;
create table t1 (a char(10), unique using btree (a)) engine=heap;
insert into t1 values ('a');
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values ('a ');
alter table t1 modify a varchar(10);
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values ('a '),('a '),('a '),('a ');
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values ('a ');
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values ('a ');
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values ('a ');
update t1 set a='a ' where a like 'a ';
update t1 set a='a ' where a like 'a ';
@ -432,7 +432,7 @@ create table t1 (a int not null, b int not null auto_increment,
#
create table t1 (c char(255), primary key(c(90)));
insert into t1 values ("abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz");
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values ("abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz");
drop table t1;

View file

@ -143,7 +143,7 @@ SELECT * FROM t1 WHERE b=NULL;
explain SELECT * FROM t1 WHERE b IS NULL;
SELECT * FROM t1 WHERE b<=>NULL;
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
INSERT INTO t1 VALUES (1,3);
DROP TABLE t1;

View file

@ -128,7 +128,7 @@ SELECT * FROM t1 WHERE b=NULL;
explain SELECT * FROM t1 WHERE b IS NULL;
SELECT * FROM t1 WHERE b<=>NULL;
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
INSERT INTO t1 VALUES (1,3);
DROP TABLE t1;

View file

@ -53,7 +53,7 @@ INSERT INTO t1 VALUES (1,0,0),(3,1,1),(4,1,1),(8,2,2),(9,2,2),(17,3,2),(22,4,2),
update t1 set parent_id=parent_id+100;
select * from t1 where parent_id=102;
update t1 set id=id+1000;
-- error 1062,1022
-- error ER_DUP_ENTRY_WITH_KEY_NAME,1022
update t1 set id=1024 where id=1009;
select * from t1;
update ignore t1 set id=id+1; # This will change all rows
@ -134,13 +134,13 @@ commit;
select n, "after commit" from t1;
commit;
insert into t1 values (5);
-- error 1062
-- error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values (4);
commit;
select n, "after commit" from t1;
set autocommit=1;
insert into t1 values (6);
-- error 1062
-- error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values (4);
select n from t1;
set autocommit=0;
@ -214,7 +214,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);
-- error 1062
-- error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values ('pippo', 12); # Gives error
delete from t1;
delete from t1 where id = 'pippo';
@ -342,9 +342,9 @@ CREATE TABLE t1 (
insert into t1 (ggid,passwd) values ('test1','xxx');
insert into t1 (ggid,passwd) values ('test2','yyy');
-- error 1062
-- error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 (ggid,passwd) values ('test2','this will fail');
-- error 1062
-- error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 (ggid,id) values ('this will fail',1);
select * from t1 where ggid='test1';
@ -353,7 +353,7 @@ select * from t1 where id=2;
replace into t1 (ggid,id) values ('this will work',1);
replace into t1 (ggid,passwd) values ('test2','this will work');
-- error 1062
-- error ER_DUP_ENTRY_WITH_KEY_NAME
update t1 set id=100,ggid='test2' where id=1;
select * from t1;
select * from t1 where id=1;
@ -524,7 +524,7 @@ drop table t1;
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;
insert into t1 values (0,0,0,'ABCDEFGHIJ'),(2,2,2,'BCDEFGHIJK'),(1,1,1,'CDEFGHIJKL');
LOCK TABLES t1 WRITE;
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values (99,1,2,'D'),(1,1,2,'D');
select id from t1;
select id from t1;
@ -535,7 +535,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;
begin;
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values (99,1,2,'D'),(1,1,2,'D');
select id from t1;
insert ignore into t1 values (100,1,2,'D'),(1,1,99,'D');
@ -1408,7 +1408,7 @@ create table t1 (rowid int not null auto_increment, val int not null,primary
key (rowid), unique(val)) engine=innodb;
replace into t1 (val) values ('1'),('2');
replace into t1 (val) values ('1'),('2');
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 (val) values ('1'),('2');
select * from t1;
drop table t1;
@ -1421,7 +1421,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;
# We should get the following error because InnoDB does not update the counter
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 (val) values (1);
select * from t1;
drop table t1;
@ -1877,13 +1877,13 @@ create table t3 (s1 varchar(2) binary,primary key (s1)) engine=innodb;
create table t4 (s1 char(2) binary,primary key (s1)) engine=innodb;
insert into t1 values (0x41),(0x4120),(0x4100);
-- error 1062
-- error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t2 values (0x41),(0x4120),(0x4100);
insert into t2 values (0x41),(0x4120);
-- error 1062
-- error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t3 values (0x41),(0x4120),(0x4100);
insert into t3 values (0x41),(0x4100);
-- error 1062
-- error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t4 values (0x41),(0x4120),(0x4100);
insert into t4 values (0x41),(0x4100);
select hex(s1) from t1;

View file

@ -10,7 +10,7 @@ create table t1 (bandID MEDIUMINT UNSIGNED NOT NULL PRIMARY KEY, payoutID SMALLI
insert into t1 (bandID,payoutID) VALUES (1,6),(2,6),(3,4),(4,9),(5,10),(6,1),(7,12),(8,12);
create table t2 (payoutID SMALLINT UNSIGNED NOT NULL PRIMARY KEY);
insert into t2 (payoutID) SELECT DISTINCT payoutID FROM t1;
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t2 (payoutID) SELECT payoutID+10 FROM t1;
insert ignore into t2 (payoutID) SELECT payoutID+10 FROM t1;
select * from t2;
@ -101,7 +101,7 @@ create table t1 (a int not null primary key, b char(10));
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");
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 select * from t2;
select * from t1;
# REPLACE .. SELECT is not yet supported by PS

View file

@ -12,7 +12,7 @@ INSERT t1 VALUES (8,4,50) ON DUPLICATE KEY UPDATE c=c+1000;
SELECT * FROM t1;
INSERT t1 VALUES (1,4,60) ON DUPLICATE KEY UPDATE c=c+10000;
SELECT * FROM t1;
-- error 1062
-- error ER_DUP_ENTRY_WITH_KEY_NAME
INSERT t1 VALUES (1,9,70) ON DUPLICATE KEY UPDATE c=c+100000, b=4;
SELECT * FROM t1;
TRUNCATE TABLE t1;
@ -63,7 +63,7 @@ INSERT t1 SELECT 8,4,50 FROM DUAL ON DUPLICATE KEY UPDATE c=c+1000;
SELECT * FROM t1;
INSERT t1 SELECT 1,4,60 FROM DUAL ON DUPLICATE KEY UPDATE c=c+10000;
SELECT * FROM t1;
-- error 1062
-- error ER_DUP_ENTRY_WITH_KEY_NAME
INSERT t1 SELECT 1,9,70 FROM DUAL ON DUPLICATE KEY UPDATE c=c+100000, b=4;
SELECT * FROM t1;
TRUNCATE TABLE t1;

View file

@ -97,7 +97,7 @@ WHERE t1.uniq_id = 4
ORDER BY t2.c_amount;
INSERT INTO t2 VALUES (2,3,3000,6000,0,0,746584,837484,'yes');
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
INSERT INTO t2 VALUES (2,3,3000,6000,0,0,746584,837484,'yes');
INSERT INTO t2 VALUES (7,3,1000,2000,0,0,746294,937484,'yes');

View file

@ -150,7 +150,7 @@ create table t1
);
INSERT INTO t1 VALUES (1, 1, 1, 1, 'a');
INSERT INTO t1 VALUES (1, 1, 1, 1, 'b');
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
INSERT INTO t1 VALUES (1, 1, 1, 1, 'a');
drop table t1;
@ -243,13 +243,13 @@ show create table t1;
insert t1 values ('cccc', 'tttt'),
(0xD0B1212223D0B1D0B1D0B1D0B1D0B1, 0xD0B1D0B1212223D0B1D0B1D0B1D0B1),
(0xD0B1222123D0B1D0B1D0B1D0B1D0B1, 0xD0B1D0B1222123D0B1D0B1D0B1D0B1);
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert t1 (c) values ('cc22');
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert t1 (t) values ('ttt22');
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert t1 (c) values (0xD0B1212322D0B1D0B1D0B1D0B1D0B1);
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert t1 (t) values (0xD0B1D0B1212322D0B1D0B1D0B1D0B1);
select c from t1 where c='cccc';
select t from t1 where t='tttt';
@ -438,7 +438,7 @@ insert into t1 values(1, 'b', 'b', NULL);
# Drop some indexes for new adds.
alter table t1 drop index i3, drop index i2, drop index i1;
# Add indexes, one is unique on non-unique values.
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
alter table t1 add index i3 (c3), add index i2 (c2), add unique index i1 (c1);
drop table t1;

View file

@ -195,9 +195,9 @@ select * from t6 order by a,b;
insert into t1 values (99,NULL);
select * from t4 where a+0 > 90;
# bug#4008 - cannot determine a unique key that caused "dupl. key error"
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert t5 values (1,1);
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert t6 values (2,1);
insert t5 values (1,1) on duplicate key update b=b+10;
insert t6 values (2,1) on duplicate key update b=b+20;

View file

@ -453,9 +453,9 @@ create table t1 (a int not null auto_increment primary key, b text not null, uni
insert into t1 (b) values ('a'),('b'),('c');
select concat(b,'.') from t1;
update t1 set b='b ' where a=2;
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
update t1 set b='b ' where a > 1;
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 (b) values ('b');
select * from t1;
delete from t1 where b='b';

View file

@ -792,7 +792,7 @@ drop table t1,t2;
# insert ignore
create table t1 (a int not null primary key, b int not null) engine=ndb;
insert into t1 values (1,10), (2,20), (3,30);
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 set a=1, b=100;
insert ignore into t1 set a=1, b=100;
select * from t1 order by a;
@ -805,12 +805,12 @@ create table t1 (a int not null primary key, b int not null) engine=ndb;
create table t2 (c int not null primary key, d int not null) engine=ndb;
insert into t1 values (1,10), (2,10), (3,30), (4, 30);
insert into t2 values (1,10), (2,10), (3,30), (4, 30);
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
update t1 set a = 1 where a = 3;
select * from t1 order by a;
update t1 set b = 1 where a > 1 order by a desc limit 1;
select * from t1 order by a;
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
update t1,t2 set a = 1, c = 1 where a = 3 and c = 3;
select * from t1 order by a;
update ignore t1,t2 set a = 1, c = 1 where a = 3 and c = 3;

View file

@ -38,9 +38,9 @@ create table t1 (
# ok
insert into t1 values('aAa');
# fail
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values('aaa');
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values('AAA');
# 1
select * from t1 order by a;
@ -61,9 +61,9 @@ create table t1 (
) engine=ndb;
#
insert into t1 values ('A'),('b '),('C '),('d '),('E'),('f');
-- error 1062
-- error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values('b');
-- error 1062
-- error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values('a ');
#
select a,length(a) from t1 order by a;
@ -106,9 +106,9 @@ create table t1 (
# ok
insert into t1 values(1, 'aAa');
# fail
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values(2, 'aaa');
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values(3, 'AAA');
# 1
select * from t1 order by p;
@ -131,9 +131,9 @@ create table t1 (
) engine=ndb;
#
insert into t1 values (1,'A'),(2,'b '),(3,'C '),(4,'d '),(5,'E'),(6,'f');
-- error 1062
-- error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values(99,'b');
-- error 1062
-- error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values(99,'a ');
#
select a,length(a) from t1 order by a;
@ -231,7 +231,7 @@ drop table t1;
# ('a','A '),('B ','b'),('c','C '),('D','d'),('e ','E'),('F','f '),
# ('A','b '),('b ','C'),('C','d '),('d','E'),('E ','f'),
# ('a','C '),('B ','d'),('c','E '),('D','f');
#-- error 1062
#-- error ER_DUP_ENTRY_WITH_KEY_NAME
#insert into t1 values('d','f');
#
#select a,b,length(a),length(b) from t1 order by a,b limit 3;

View file

@ -22,7 +22,7 @@ select * from t1 where b = 4 order by b;
insert into t1 values(7,8,3);
select * from t1 where b = 4 order by a;
-- error 1062
-- error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values(8, 2, 3);
select * from t1 order by a;
delete from t1 where a = 1;
@ -59,7 +59,7 @@ select * from t1 use index (bc) where b IS NULL and c IS NULL order by a;
select * from t1 use index (bc) where b IS NULL and c = 2 order by a;
select * from t1 use index (bc) where b < 4 order by a;
select * from t1 use index (bc) where b IS NOT NULL order by a;
-- error 1062
-- error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values(5,1,1);
drop table t1;
@ -82,7 +82,7 @@ select * from t2 where c = 6;
insert into t2 values(7,8,3);
select * from t2 where b = 4 order by a;
-- error 1062
-- error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t2 values(8, 2, 3);
select * from t2 order by a;
delete from t2 where a = 1;
@ -91,7 +91,7 @@ select * from t2 order by a;
# Bug #24818 CREATE UNIQUE INDEX (...) USING HASH on a NDB table crashes mysqld
create unique index bi using hash on t2(b);
-- error 1062
-- error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t2 values(9, 3, 1);
alter table t2 drop index bi;
insert into t2 values(9, 3, 1);
@ -154,7 +154,7 @@ insert into t1 values (-1,NULL), (0,0), (1,NULL),(2,2),(3,NULL),(4,4);
select * from t1 order by pk;
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values (5,0);
select * from t1 order by pk;
delete from t1 where a = 0;
@ -173,7 +173,7 @@ insert into t2 values (-1,1,17,NULL),(0,NULL,18,NULL),(1,3,19,'abc');
select * from t2 order by pk;
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t2 values(2,3,19,'abc');
select * from t2 order by pk;
delete from t2 where c IS NOT NULL;
@ -342,7 +342,7 @@ create table t1 (a int primary key, b varchar(1000) not null, unique key (b))
engine=ndb charset=utf8;
insert into t1 values (1, repeat(_utf8 0xe288ab6474, 200));
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values (2, repeat(_utf8 0xe288ab6474, 200));
select a, sha1(b) from t1;

View file

@ -433,7 +433,7 @@ SELECT COUNT(*) FROM t1;
#
# Insert duplicate rows
#
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
INSERT INTO t1 VALUES (1,1,1);
--error 1022

View file

@ -21,7 +21,7 @@ replace into t1 (gesuchnr,benutzer_id) values (1,1);
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);
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 (gesuchnr,benutzer_id) values (1,1);
replace into t1 (gesuchnr,benutzer_id) values (1,1);
select * from t1 order by gesuchnr;

View file

@ -23,11 +23,11 @@ UPDATE t1 set b = c;
select * from t1 order by pk1;
UPDATE t1 set pk1 = 4 where pk1 = 1;
select * from t1 order by pk1;
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
UPDATE t1 set pk1 = 4 where pk1 = 2;
UPDATE IGNORE t1 set pk1 = 4 where pk1 = 2;
select * from t1 order by pk1;
-- error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
UPDATE t1 set pk1 = 1, c = 2 where pk1 = 4;
UPDATE IGNORE t1 set pk1 = 1, c = 2 where pk1 = 4;
select * from t1 order by pk1;

View file

@ -25,9 +25,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");
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values (0,"error");
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
replace into t1 values (0,"error");
replace into t1 values (126,"first updated");
replace into t1 values (63,default);

View file

@ -11,7 +11,7 @@ connection master;
create table t1 (a int primary key);
create table t4 (a int primary key);
# generate an error that goes to the binlog
--error 1022, 1062
--error 1022, ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values (1),(1);
insert into t4 values (1),(2);
save_master_pos;

View file

@ -67,7 +67,7 @@ SELECT * FROM t6 ORDER BY a,b,c;
connection master;
# Test for erroneous constructions
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
CREATE TABLE t7 (UNIQUE(b)) SELECT a,b FROM tt3;
# Shouldn't be written to the binary log
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
@ -75,7 +75,7 @@ SHOW BINLOG EVENTS FROM 1118;
# Test that INSERT-SELECT works the same way as for SBR.
CREATE TABLE t7 (a INT, b INT UNIQUE);
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
INSERT INTO t7 SELECT a,b FROM tt3;
SELECT * FROM t7 ORDER BY a,b;
# Should be written to the binary log

View file

@ -1 +1 @@
--slave-skip-error=1053,1062
--slave-skip-error=1053,1582

View file

@ -153,7 +153,7 @@ create procedure foo4()
delimiter ;|
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
call foo4();
show warnings;
@ -308,7 +308,7 @@ delimiter ;|
do fn1(100);
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
select fn1(20);
select * from t2;

View file

@ -30,7 +30,7 @@ check table t1 changed;
check table t1 medium;
check table t1 extended;
show index from t1;
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values (5,5,5);
optimize table t1;
optimize table t1;

View file

@ -586,7 +586,7 @@ begin
end|
set @x = 0|
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
call bug3279(@x)|
select @x|
drop procedure bug3279|

View file

@ -1763,11 +1763,11 @@ insert into t3 (a) values (1)|
create procedure h_ee()
deterministic
begin
declare continue handler for 1062 -- ER_DUP_ENTRY
declare continue handler for 1582 -- ER_DUP_ENTRY_WITH_KEY_NAME
select 'Outer (bad)' as 'h_ee';
begin
declare continue handler for 1062 -- ER_DUP_ENTRY
declare continue handler for 1582 -- ER_DUP_ENTRY_WITH_KEY_NAME
select 'Inner (good)' as 'h_ee';
insert into t3 values (1);
@ -1777,7 +1777,7 @@ end|
create procedure h_es()
deterministic
begin
declare continue handler for 1062 -- ER_DUP_ENTRY
declare continue handler for 1582 -- ER_DUP_ENTRY_WITH_KEY_NAME
select 'Outer (good)' as 'h_es';
begin
@ -1823,7 +1823,7 @@ end|
create procedure h_ex()
deterministic
begin
declare continue handler for 1062 -- ER_DUP_ENTRY
declare continue handler for 1582 -- ER_DUP_ENTRY_WITH_KEY_NAME
select 'Outer (good)' as 'h_ex';
begin
@ -1842,7 +1842,7 @@ begin
select 'Outer (bad)' as 'h_se';
begin
declare continue handler for 1062 -- ER_DUP_ENTRY
declare continue handler for 1582 -- ER_DUP_ENTRY_WITH_KEY_NAME
select 'Inner (good)' as 'h_se';
insert into t3 values (1);
@ -2015,7 +2015,7 @@ begin
select 'Outer (bad)' as 'h_xe';
begin
declare continue handler for 1062 -- ER_DUP_ENTRY
declare continue handler for 1582 -- ER_DUP_ENTRY_WITH_KEY_NAME
select 'Inner (good)' as 'h_xe';
insert into t3 values (1);
@ -4507,7 +4507,7 @@ begin
select bug12379();
end|
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
select bug12379()|
select 1|
# statement-based binlogging will show warning which row-based won't;
@ -4518,7 +4518,7 @@ select 2|
call bug12379_2()|
--enable_warnings
select 3|
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
call bug12379_3()|
select 4|
@ -4600,7 +4600,7 @@ end|
call bug6127()|
select * from t3|
--error ER_DUP_ENTRY
--error ER_DUP_ENTRY_WITH_KEY_NAME
call bug6127()|
select * from t3|
set sql_mode=@sm|
@ -5528,11 +5528,11 @@ insert into t3 values (1)|
create procedure bug15011()
deterministic
begin
declare continue handler for 1062
declare continue handler for 1582
select 'Outer' as 'Handler';
begin
declare continue handler for 1062
declare continue handler for 1582
select 'Inner' as 'Handler';
insert into t3 values (1);

View file

@ -89,7 +89,7 @@ create function bug10015_5(i int) returns int
end if;
return i;
end|
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values (bug10015_5(4)), (bug10015_5(5))|
select * from t1|
drop function bug10015_5|

View file

@ -73,7 +73,7 @@ drop table t1,t2;
#
create temporary table t1 (a int not null);
insert into t1 values (1),(1);
-- error 1062
-- error ER_DUP_ENTRY_WITH_KEY_NAME
alter table t1 add primary key (a);
drop table t1;

View file

@ -31,7 +31,7 @@ drop table t1;
create table t1 (s1 binary(2) primary key);
insert into t1 values (0x01);
insert into t1 values (0x0120);
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values (0x0100);
select hex(s1) from t1 order by s1;
# check index search

View file

@ -39,7 +39,7 @@ drop table t1;
create table t1 (a bit);
insert into t1 values (b'0'), (b'1'), (b'000'), (b'100'), (b'001');
select hex(a) from t1;
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
alter table t1 add unique (a);
drop table t1;

View file

@ -40,7 +40,7 @@ drop table t1;
create table t1 (a bit) engine=innodb;
insert into t1 values (b'0'), (b'1'), (b'000'), (b'100'), (b'001');
select hex(a) from t1;
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
alter table t1 add unique (a);
drop table t1;

View file

@ -334,9 +334,9 @@ drop table t1;
#
create table t1 (id integer primary key auto_increment, txt text not null, unique index txt_index (txt (20)));
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 (txt) values ('Chevy'), ('Chevy ');
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 (txt) values ('Chevy'), ('CHEVY');
alter table t1 drop index txt_index, add index txt_index (txt(20));
insert into t1 (txt) values ('Chevy ');

View file

@ -25,7 +25,7 @@ select v='a' from t1;
select binary v='a' from t1;
select binary v='a ' from t1;
insert into t1 values('a');
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
alter table t1 add primary key (v);
drop table t1;
create table t1 (v varbinary(20));

View file

@ -2544,16 +2544,18 @@ CREATE TABLE t1(
uID int unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY);
INSERT INTO t1(fName, lName, DOB) VALUES
('Alice', 'Hill', date_sub(curdate(), interval 15271 day)),
('Bob', 'Adams', date_sub(curdate(), interval 33600 day)),
('Carol', 'Simpson', date_sub(curdate(), interval 13700 day));
('Hank', 'Hill', '1964-09-29'),
('Tom', 'Adams', '1908-02-14'),
('Homer', 'Simpson', '1968-03-05');
CREATE VIEW v1 AS
SELECT (year(now())-year(DOB)) AS Age
FROM t1 HAVING Age < 75;
SHOW CREATE VIEW v1;
set timestamp=1136066400;
SELECT (year(now())-year(DOB)) AS Age FROM t1 HAVING Age < 75;
set timestamp=1136066400;
SELECT * FROM v1;
DROP VIEW v1;

3
sql-bench/example Normal file
View file

@ -0,0 +1,3 @@
#/bin/sh
run-all-tests --prefix=-innodb --hw="AMD Athlon 4000+; 2400 MHz 1M cache, 3G memory" --optimization="gcc 4.0.2 -O3" --comments="Engine=InnoDB" --create-options="ENGINE=InnoDB"

View file

@ -2041,7 +2041,7 @@ void handler::print_keydup_error(uint key_nr, const char *msg)
{
/* Key is unknown */
str.copy("", 0, system_charset_info);
my_printf_error(ER_DUP_ENTRY, msg,
my_printf_error(ER_DUP_ENTRY_WITH_KEY_NAME, msg,
MYF(0), str.c_ptr(), "*UNKNOWN*");
}
else
@ -2054,7 +2054,7 @@ void handler::print_keydup_error(uint key_nr, const char *msg)
str.length(max_length-4);
str.append(STRING_WITH_LEN("..."));
}
my_printf_error(ER_DUP_ENTRY, msg,
my_printf_error(ER_DUP_ENTRY_WITH_KEY_NAME, msg,
MYF(0), str.c_ptr(), table->key_info[key_nr].name);
}
}
@ -2099,7 +2099,7 @@ void handler::print_error(int error, myf errflag)
uint key_nr=get_dup_key(error);
if ((int) key_nr >= 0)
{
print_keydup_error(key_nr, ER(ER_DUP_ENTRY));
print_keydup_error(key_nr, ER(ER_DUP_ENTRY_WITH_KEY_NAME));
DBUG_VOID_RETURN;
}
textno=ER_DUP_KEY;

View file

@ -1479,30 +1479,30 @@ ER_DUP_KEYNAME 42000 S1009
swe "Nyckelnamn '%-.64s' finns flera gånger"
ukr "äÕÂÌÀÀÞÅ ¦Í'Ñ ËÌÀÞÁ '%-.64s'"
ER_DUP_ENTRY 23000 S1009
cze "Zvojen-Bý klíè '%-.64s' (èíslo klíèe '%-.64s')"
dan "Ens værdier '%-.64s' for indeks '%-.64s'"
nla "Dubbele ingang '%-.64s' voor zoeksleutel '%-.64s'"
eng "Duplicate entry '%-.64s' for key '%-.64s'"
jps "'%-.64s' ‚Í key '%-.64s' ɨ¢Ä<E2809A>d•¡µÄ¢Ü·",
est "Kattuv väärtus '%-.64s' võtmele '%-.64s'"
fre "Duplicata du champ '%-.64s' pour la clef '%-.64s'"
ger "Doppelter Eintrag '%-.64s' für Schlüssel '%-.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 nøkkel '%-.64s'"
norwegian-ny "Like verdiar '%-.64s' for nykkel '%-.64s'"
pol "Powtórzone 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 kµúèa '%-.64s')"
spa "Entrada duplicada '%-.64s' para la clave '%-.64s'"
swe "Dubbel nyckel '%-.64s' för nyckel '%-.64s'"
ukr "äÕÂÌÀÀÞÉÊ ÚÁÐÉÓ '%-.64s' ÄÌÑ ËÌÀÞÁ '%-.64s'"
cze "Zvojen-Bý klíè '%-.64s' (èíslo klíèe %d)"
dan "Ens værdier '%-.64s' for indeks %d"
nla "Dubbele ingang '%-.64s' voor zoeksleutel %d"
eng "Duplicate entry '%-.64s' for key %d"
jps "'%-.64s' ‚Í key %d ɨ¢Ä<E2809A>d•¡µÄ¢Ü·",
est "Kattuv väärtus '%-.64s' võtmele %d"
fre "Duplicata du champ '%-.64s' pour la clef %d"
ger "Doppelter Eintrag '%-.64s' für Schlüssel %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 nøkkel %d"
norwegian-ny "Like verdiar '%-.64s' for nykkel %d"
pol "Powtórzone 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 kµúèa %d)"
spa "Entrada duplicada '%-.64s' para la clave %d"
swe "Dubbel nyckel '%-.64s' för nyckel %d"
ukr "äÕÂÌÀÀÞÉÊ ÚÁÐÉÓ '%-.64s' ÄÌÑ ËÌÀÞÁ %d"
ER_WRONG_FIELD_SPEC 42000 S1009
cze "Chybn-Bá specifikace sloupce '%-.64s'"
dan "Forkert kolonnespecifikaton for felt '%-.64s'"
@ -6025,6 +6025,31 @@ ER_WRONG_PARAMETERS_TO_STORED_FCT 42000
ER_NATIVE_FCT_NAME_COLLISION
eng "This function '%-.64s' has the same name as a native function"
ger "Die Funktion '%-.64s' hat denselben Namen wie eine native Funktion"
ER_DUP_ENTRY_WITH_KEY_NAME 23000 S1009
cze "Zvojen-Bý klíè '%-.64s' (èíslo klíèe '%-.64s')"
dan "Ens værdier '%-.64s' for indeks '%-.64s'"
nla "Dubbele ingang '%-.64s' voor zoeksleutel '%-.64s'"
eng "Duplicate entry '%-.64s' for key '%-.64s'"
jps "'%-.64s' ‚Í key '%-.64s' ɨ¢Ä<E2809A>d•¡µÄ¢Ü·",
est "Kattuv väärtus '%-.64s' võtmele '%-.64s'"
fre "Duplicata du champ '%-.64s' pour la clef '%-.64s'"
ger "Doppelter Eintrag '%-.64s' für Schlüssel '%-.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 nøkkel '%-.64s'"
norwegian-ny "Like verdiar '%-.64s' for nykkel '%-.64s'"
pol "Powtórzone 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 kµúèa '%-.64s')"
spa "Entrada duplicada '%-.64s' para la clave '%-.64s'"
swe "Dubbel nyckel '%-.64s' för nyckel '%-.64s'"
ukr "äÕÂÌÀÀÞÉÊ ÚÁÐÉÓ '%-.64s' ÄÌÑ ËÌÀÞÁ '%-.64s'"
ER_BINLOG_PURGE_EMFILE
eng "Too many files opened, please execute the command again"
ger "Zu viele offene Dateien, bitte führen Sie den Befehl noch einmal aus"

View file

@ -6820,7 +6820,7 @@ copy_data_between_tables(TABLE *from,TABLE *to,
uint key_nr= to->file->get_dup_key(error);
if ((int) key_nr >= 0)
{
const char *err_msg= ER(ER_DUP_ENTRY);
const char *err_msg= ER(ER_DUP_ENTRY_WITH_KEY_NAME);
if (key_nr == 0 &&
(to->key_info[0].key_part[0].field->flags &
AUTO_INCREMENT_FLAG))