summaryrefslogtreecommitdiff
path: root/sql/handler.h
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-01-06 17:43:02 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2019-01-06 17:43:02 +0200
commit734510a44d690dfb94264e1d2775ee1cb6f3ebb9 (patch)
tree0ccc317bf9462ca95cd1277b4ce65a7fda5fe315 /sql/handler.h
parent2465d3e00b2f18c7d4967f9bb10438883682787d (diff)
parentfaf206a848684bc0f87c93a2b47a55063bbccc6c (diff)
downloadmariadb-git-734510a44d690dfb94264e1d2775ee1cb6f3ebb9.tar.gz
Merge 10.3 into 10.4
Diffstat (limited to 'sql/handler.h')
-rw-r--r--sql/handler.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/sql/handler.h b/sql/handler.h
index a0739d75aaf..fc6246c38a1 100644
--- a/sql/handler.h
+++ b/sql/handler.h
@@ -430,6 +430,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
#define HA_LEX_CREATE_SEQUENCE 16U
@@ -3801,14 +3807,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; }