summaryrefslogtreecommitdiff
path: root/sql/key.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2018-02-23 20:33:48 +0100
committerSergei Golubchik <serg@mariadb.org>2018-02-24 01:28:51 +0100
commit22073cbf3b507969eccee09cf4282aa70cd4c914 (patch)
treedb87bc4d3ed85c5fe1de51ef693905befde2ed96 /sql/key.cc
parent5c7a40e3cf0b9869c7023e2f8c48b7c6e65a87dd (diff)
downloadmariadb-git-22073cbf3b507969eccee09cf4282aa70cd4c914.tar.gz
omit system invisible fields from the duplicate key error
just as SHOW CREATE TABLE omits them from the index definition
Diffstat (limited to 'sql/key.cc')
-rw-r--r--sql/key.cc2
1 files changed, 2 insertions, 0 deletions
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)