summaryrefslogtreecommitdiff
path: root/sql/sql_show.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2021-11-24 16:50:21 +0100
committerSergei Golubchik <serg@mariadb.org>2021-12-11 17:08:35 +0100
commitb5ec3e30b59a75e68192be8fb4550237bd146a2f (patch)
tree360ed8a0f4010b5e5ab1a7b93418aa3e22df5355 /sql/sql_show.cc
parent52a9d82ecb5b14b89dc47549c45b88e6f07a53bb (diff)
downloadmariadb-git-bb-10.8-MDEV-26938.tar.gz
MDEV-26938 Support descending indexes internally in InnoDB (server part)bb-10.8-MDEV-26938
* preserve DESC index property in the parser * store it in the frm (only for HA_KEY_ALG_BTREE) * read it from the frm * show it in SHOW CREATE * skip DESC indexes in opt_range.cc and opt_sum.cc * ORDER BY test
Diffstat (limited to 'sql/sql_show.cc')
-rw-r--r--sql/sql_show.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index d01f84fe7d1..877bfada417 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -2369,6 +2369,8 @@ int show_create_table_ex(THD *thd, TABLE_LIST *table_list,
packet->append_parenthesized((long) key_part->length /
key_part->field->charset()->mbmaxlen);
}
+ if (key_part->key_part_flag & HA_REVERSE_SORT)
+ packet->append(STRING_WITH_LEN(" DESC"));
}
if (key_info->without_overlaps)