diff options
author | Sergei Golubchik <serg@mariadb.org> | 2018-12-30 15:50:20 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2018-12-30 18:30:29 +0100 |
commit | 67240858b2bfa0afc436d88fc9da0595e1391b60 (patch) | |
tree | 27dc23ebefa72cb2fd7aaa02722da3ba424bbf9e /sql/handler.h | |
parent | cf9070a8f7dec309878e464b277db7dbb3556cf0 (diff) | |
parent | aeefd26ecb1089678e343c64998749e9f2e3a1e4 (diff) | |
download | mariadb-git-67240858b2bfa0afc436d88fc9da0595e1391b60.tar.gz |
Merge branch '10.1' into 10.2mariadb-10.2.21
Diffstat (limited to 'sql/handler.h')
-rw-r--r-- | sql/handler.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/sql/handler.h b/sql/handler.h index d34064811f0..8569cd53410 100644 --- a/sql/handler.h +++ b/sql/handler.h @@ -378,6 +378,12 @@ enum enum_alter_inplace_result { #define HA_KEY_NULL_LENGTH 1 #define HA_KEY_BLOB_LENGTH 2 +/* Maximum length of any index lookup key, in bytes */ + +#define MAX_KEY_LENGTH (MAX_DATA_LENGTH_FOR_KEY \ + +(MAX_REF_PARTS \ + *(HA_KEY_NULL_LENGTH + HA_KEY_BLOB_LENGTH))) + #define HA_LEX_CREATE_TMP_TABLE 1U #define HA_CREATE_TMP_ALTER 8U @@ -3421,14 +3427,14 @@ public: uint max_key_parts() const { return MY_MIN(MAX_REF_PARTS, max_supported_key_parts()); } uint max_key_length() const - { return MY_MIN(MAX_KEY_LENGTH, max_supported_key_length()); } + { return MY_MIN(MAX_DATA_LENGTH_FOR_KEY, max_supported_key_length()); } uint max_key_part_length() const - { return MY_MIN(MAX_KEY_LENGTH, max_supported_key_part_length()); } + { return MY_MIN(MAX_DATA_LENGTH_FOR_KEY, max_supported_key_part_length()); } virtual uint max_supported_record_length() const { return HA_MAX_REC_LENGTH; } virtual uint max_supported_keys() const { return 0; } virtual uint max_supported_key_parts() const { return MAX_REF_PARTS; } - virtual uint max_supported_key_length() const { return MAX_KEY_LENGTH; } + virtual uint max_supported_key_length() const { return MAX_DATA_LENGTH_FOR_KEY; } virtual uint max_supported_key_part_length() const { return 255; } virtual uint min_record_length(uint options) const { return 1; } |