diff options
author | Sergei Golubchik <serg@mariadb.org> | 2018-12-29 23:44:45 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2018-12-29 23:44:45 +0100 |
commit | aeefd26ecb1089678e343c64998749e9f2e3a1e4 (patch) | |
tree | a96f5fdff65a6d0a05d195a74a32bbb4aa0a58c1 /sql/handler.h | |
parent | 50c9469be821e1942a8a9c5f37132e1855c40c86 (diff) | |
parent | 802ce9672ff630bbef08235e0e39bf599075f985 (diff) | |
download | mariadb-git-aeefd26ecb1089678e343c64998749e9f2e3a1e4.tar.gz |
Merge branch '10.0' into 10.1
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 42429e9dcbe..792cce281f6 100644 --- a/sql/handler.h +++ b/sql/handler.h @@ -382,6 +382,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 1 #define HA_CREATE_TMP_ALTER 8 @@ -3371,14 +3377,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; } |