diff options
author | Igor Babaev <igor@askmonty.org> | 2019-02-03 18:41:18 -0800 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2019-02-03 18:41:18 -0800 |
commit | 37deed3f37561f264f65e162146bbc2ad35fb1a2 (patch) | |
tree | c1cfb6c0995bfcc4ac3fb335f518a8b404413e32 /sql/sql_const.h | |
parent | 658128af43b4d7c6db445164f8ed25ed4d1e3109 (diff) | |
parent | 5b996782be6b752ce50a0ecaa222b0688aa9e75d (diff) | |
download | mariadb-git-37deed3f37561f264f65e162146bbc2ad35fb1a2.tar.gz |
Merge branch '10.4' into bb-10.4-mdev16188
Diffstat (limited to 'sql/sql_const.h')
-rw-r--r-- | sql/sql_const.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/sql/sql_const.h b/sql/sql_const.h index e6dcc3420cf..d4e40cd551e 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 |