mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
omit system invisible fields from the duplicate key error
just as SHOW CREATE TABLE omits them from the index definition
This commit is contained in:
@ -3,6 +3,6 @@ INSERT IGNORE INTO t1 (a,b,c) VALUES (1,2,3);
|
|||||||
SELECT a, b, c FROM t1 INTO OUTFILE '15330.data';
|
SELECT a, b, c FROM t1 INTO OUTFILE '15330.data';
|
||||||
LOAD DATA INFILE '15330.data' IGNORE INTO TABLE t1 (a,b,c);
|
LOAD DATA INFILE '15330.data' IGNORE INTO TABLE t1 (a,b,c);
|
||||||
Warnings:
|
Warnings:
|
||||||
Warning 1062 Duplicate entry '1-2038-01-19 04:14:07.999999' for key 'a'
|
Warning 1062 Duplicate entry '1' for key 'a'
|
||||||
LOAD DATA INFILE '15330.data' REPLACE INTO TABLE t1 (a,b,c);
|
LOAD DATA INFILE '15330.data' REPLACE INTO TABLE t1 (a,b,c);
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
@ -427,6 +427,8 @@ void key_unpack(String *to, TABLE *table, KEY *key)
|
|||||||
key_part < key_part_end;
|
key_part < key_part_end;
|
||||||
key_part++)
|
key_part++)
|
||||||
{
|
{
|
||||||
|
if (key_part->field->invisible > INVISIBLE_USER)
|
||||||
|
continue;
|
||||||
if (to->length())
|
if (to->length())
|
||||||
to->append('-');
|
to->append('-');
|
||||||
if (key_part->null_bit)
|
if (key_part->null_bit)
|
||||||
|
Reference in New Issue
Block a user