mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
WL#1563 - Modify MySQL to support fast CREATE/DROP INDEX
Change "duplicate key" message to print key name instead of key number.
This commit is contained in:
@ -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 'б!#"<22>' for key 1
|
||||
ERROR 23000: Duplicate entry 'б!#"<22>' 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;
|
||||
|
Reference in New Issue
Block a user