mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 20:12:31 +01:00
Show the index type even for indexes using the default index type in
tables that support multiple index types. (Bug #7235) sql/sql_show.cc: Always output 'TYPE <indextype>' for indexes on tables with multiple index types mysql-test/r/ctype_utf8.result: Fix results for test
This commit is contained in:
parent
0c57a67ce0
commit
76266f19e8
2 changed files with 8 additions and 4 deletions
|
@ -412,7 +412,7 @@ show create table t1;
|
|||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`c` char(10) character set utf8 default NULL,
|
||||
UNIQUE KEY `a` (`c`(1))
|
||||
UNIQUE KEY `a` TYPE HASH (`c`(1))
|
||||
) ENGINE=HEAP DEFAULT CHARSET=latin1
|
||||
insert into t1 values ('a'),('b'),('c'),('d'),('e'),('f');
|
||||
insert into t1 values ('aa');
|
||||
|
@ -570,7 +570,7 @@ show create table t1;
|
|||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`c` char(10) character set utf8 collate utf8_bin default NULL,
|
||||
UNIQUE KEY `a` (`c`(1))
|
||||
UNIQUE KEY `a` TYPE HASH (`c`(1))
|
||||
) ENGINE=HEAP DEFAULT CHARSET=latin1
|
||||
insert into t1 values ('a'),('b'),('c'),('d'),('e'),('f');
|
||||
insert into t1 values ('aa');
|
||||
|
|
|
@ -1406,14 +1406,18 @@ store_create_info(THD *thd, TABLE *table, String *packet)
|
|||
if (!(thd->variables.sql_mode & MODE_NO_KEY_OPTIONS) &&
|
||||
!limited_mysql_mode && !foreign_db_mode)
|
||||
{
|
||||
if (table->db_type == DB_TYPE_HEAP &&
|
||||
key_info->algorithm == HA_KEY_ALG_BTREE)
|
||||
if (key_info->algorithm == HA_KEY_ALG_BTREE)
|
||||
packet->append(" TYPE BTREE", 11);
|
||||
|
||||
if (key_info->algorithm == HA_KEY_ALG_HASH)
|
||||
packet->append(" TYPE HASH", 10);
|
||||
|
||||
// +BAR: send USING only in non-default case: non-spatial rtree
|
||||
if ((key_info->algorithm == HA_KEY_ALG_RTREE) &&
|
||||
!(key_info->flags & HA_SPATIAL))
|
||||
packet->append(" TYPE RTREE", 11);
|
||||
|
||||
// No need to send TYPE FULLTEXT, it is sent as FULLTEXT KEY
|
||||
}
|
||||
packet->append(" (", 2);
|
||||
|
||||
|
|
Loading…
Reference in a new issue