mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Fix for bug#10936: Cluster engine shows wrong key value for duplicate key error
This commit is contained in:
@ -416,10 +416,12 @@ INSERT INTO t1 VALUES
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
2000
|
||||
INSERT INTO t1 VALUES (1,1,1);
|
||||
ERROR 23000: Duplicate entry '1' for key 1
|
||||
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);
|
||||
ERROR 23000: Duplicate entry '10' for key 1
|
||||
ERROR 23000: Can't write; duplicate key in table 't1'
|
||||
select count(*) from t1;
|
||||
count(*)
|
||||
2000
|
||||
@ -437,7 +439,7 @@ begin;
|
||||
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);
|
||||
ERROR 23000: Duplicate entry '10' for key 1
|
||||
ERROR 23000: Can't write; duplicate key in table 't1'
|
||||
commit;
|
||||
ERROR HY000: Got error 4350 'Transaction already aborted' from ndbcluster
|
||||
select * from t1 where pk1=1;
|
||||
@ -456,7 +458,7 @@ begin;
|
||||
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);
|
||||
ERROR 23000: Duplicate entry '10' for key 1
|
||||
ERROR 23000: Can't write; duplicate key in table 't1'
|
||||
rollback;
|
||||
select * from t1 where pk1=1;
|
||||
pk1 b c
|
||||
@ -474,7 +476,7 @@ begin;
|
||||
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);
|
||||
ERROR 23000: Duplicate entry '10' for key 1
|
||||
ERROR 23000: Can't write; duplicate key in table 't1'
|
||||
SELECT * FROM t1 WHERE pk1=10;
|
||||
ERROR HY000: Got error 4350 'Transaction already aborted' from ndbcluster
|
||||
rollback;
|
||||
@ -494,7 +496,7 @@ begin;
|
||||
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);
|
||||
ERROR 23000: Duplicate entry '10' for key 1
|
||||
ERROR 23000: Can't write; duplicate key in table 't1'
|
||||
SELECT * FROM t1 WHERE pk1=10;
|
||||
ERROR HY000: Got error 4350 'Transaction already aborted' from ndbcluster
|
||||
SELECT * FROM t1 WHERE pk1=10;
|
||||
@ -517,7 +519,7 @@ begin;
|
||||
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);
|
||||
ERROR 23000: Duplicate entry '10' for key 1
|
||||
ERROR 23000: Can't write; duplicate key in table 't1'
|
||||
INSERT INTO t1 values (4000, 40, 44);
|
||||
ERROR HY000: Got error 4350 'Transaction already aborted' from ndbcluster
|
||||
rollback;
|
||||
@ -534,7 +536,7 @@ select count(*) from t1;
|
||||
count(*)
|
||||
2000
|
||||
insert into t1 select * from t1 where b < 10 order by pk1;
|
||||
ERROR 23000: Duplicate entry '9' for key 1
|
||||
ERROR 23000: Can't write; duplicate key in table 't1'
|
||||
DELETE FROM t1 WHERE pk1=2;
|
||||
begin;
|
||||
INSERT IGNORE INTO t1 VALUES(1,2,3),(2,3,4);
|
||||
|
Reference in New Issue
Block a user