From 22073cbf3b507969eccee09cf4282aa70cd4c914 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Fri, 23 Feb 2018 20:33:48 +0100 Subject: omit system invisible fields from the duplicate key error just as SHOW CREATE TABLE omits them from the index definition --- sql/key.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sql/key.cc') diff --git a/sql/key.cc b/sql/key.cc index 5c1afb1f82d..8642820ff3f 100644 --- a/sql/key.cc +++ b/sql/key.cc @@ -427,6 +427,8 @@ void key_unpack(String *to, TABLE *table, KEY *key) key_part < key_part_end; key_part++) { + if (key_part->field->invisible > INVISIBLE_USER) + continue; if (to->length()) to->append('-'); if (key_part->null_bit) -- cgit v1.2.1