summaryrefslogtreecommitdiff
path: root/sql/sql_const.h
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2018-12-29 23:44:45 +0100
committerSergei Golubchik <serg@mariadb.org>2018-12-29 23:44:45 +0100
commitaeefd26ecb1089678e343c64998749e9f2e3a1e4 (patch)
treea96f5fdff65a6d0a05d195a74a32bbb4aa0a58c1 /sql/sql_const.h
parent50c9469be821e1942a8a9c5f37132e1855c40c86 (diff)
parent802ce9672ff630bbef08235e0e39bf599075f985 (diff)
downloadmariadb-git-aeefd26ecb1089678e343c64998749e9f2e3a1e4.tar.gz
Merge branch '10.0' into 10.1
Diffstat (limited to 'sql/sql_const.h')
-rw-r--r--sql/sql_const.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/sql/sql_const.h b/sql/sql_const.h
index 0cd214d8bc7..1d6549f777f 100644
--- a/sql/sql_const.h
+++ b/sql/sql_const.h
@@ -33,7 +33,17 @@
#define MAX_SYS_VAR_LENGTH 32
#define MAX_KEY MAX_INDEXES /* Max used keys */
#define MAX_REF_PARTS 32 /* Max parts used as ref */
-#define MAX_KEY_LENGTH 3072 /* max possible key */
+
+/*
+ Maximum length of the data part of an index lookup key.
+
+ The "data part" is defined as the value itself, not including the
+ NULL-indicator bytes or varchar length bytes ("the Extras"). We need this
+ value because there was a bug where length of the Extras were not counted.
+
+ You probably need MAX_KEY_LENGTH, not this constant.
+*/
+#define MAX_DATA_LENGTH_FOR_KEY 3072
#if SIZEOF_OFF_T > 4
#define MAX_REFLENGTH 8 /* Max length for record ref */
#else