diff options
author | Sachin <sachin.setiya@mariadb.com> | 2019-02-18 22:44:01 +0530 |
---|---|---|
committer | Sachin <sachin.setiya@mariadb.com> | 2019-02-18 22:44:01 +0530 |
commit | b72e778120c94ce1df9d11b7c4a9455032c9385e (patch) | |
tree | 6502a773904a295629cb6be45618e35bb9ce08b7 /sql | |
parent | 15e5313020cadb7a67ff3a6ebef75bf088259f11 (diff) | |
download | mariadb-git-bb-10.4-blob-index.tar.gz |
final commit -2bb-10.4-blob-index
Diffstat (limited to 'sql')
-rw-r--r-- | sql/handler.h | 4 | ||||
-rw-r--r-- | sql/sql_table.cc | 6 |
2 files changed, 4 insertions, 6 deletions
diff --git a/sql/handler.h b/sql/handler.h index 878968bf7e9..70fdaa7f3e3 100644 --- a/sql/handler.h +++ b/sql/handler.h @@ -144,7 +144,6 @@ enum enum_alter_inplace_result { #define HA_PRIMARY_KEY_REQUIRED_FOR_POSITION (1ULL << 16) #define HA_CAN_RTREEKEYS (1ULL << 17) #define HA_NOT_DELETE_WITH_CACHE (1ULL << 18) /* unused */ -#define HA_CAN_HASH_KEYS (1ULL << 19) /* The following is we need to a primary key to delete (and update) a row. If there is no primary key, all columns needs to be read on update and delete @@ -320,6 +319,9 @@ enum enum_alter_inplace_result { /* Safe for online backup */ #define HA_CAN_ONLINE_BACKUPS (1ULL << 56) +/* Support native hash index */ +#define HA_CAN_HASH_KEYS (1ULL << 57) + /* bits in index_flags(index_number) for what you can do with index */ #define HA_READ_NEXT 1 /* TODO really use this flag */ #define HA_READ_PREV 2 /* supports ::index_prev */ diff --git a/sql/sql_table.cc b/sql/sql_table.cc index bb5d33e4044..4d06b1e61e6 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -4193,7 +4193,7 @@ mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info, } if (is_hash_field_needed || (key_info->algorithm == HA_KEY_ALG_HASH && - create_info->db_type->flags)) + !(file->ha_table_flags() & HA_CAN_HASH_KEYS ))) { Create_field *hash_fld= add_hash_field(thd, &alter_info->create_list, create_info->default_table_charset, @@ -4208,10 +4208,6 @@ mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info, hash_fld->pack_flag&= ~FIELDFLAG_MAYBE_NULL; } } - // If user forces hash index for storage engine other then memory -// else if (key_info->algorithm == HA_KEY_ALG_HASH && - // create_info->db_type->db_type != DB_TYPE_HEAP) - // key_info->algorithm= HA_KEY_ALG_LONG_HASH; if (validate_comment_length(thd, &key->key_create_info.comment, INDEX_COMMENT_MAXLEN, ER_TOO_LONG_INDEX_COMMENT, |