Commit 4971d4de authored by marko's avatar marko

Document that DICT_MAX_INDEX_COL_LEN must not be changed.

parent c99433a3
......@@ -1531,6 +1531,12 @@ dict_index_add_col(
if (field->fixed_len > DICT_MAX_INDEX_COL_LEN) {
field->fixed_len = 0;
}
#if DICT_MAX_INDEX_COL_LEN != 768
/* The comparison limit above must be constant. If it were
changed, the disk format of some fixed-length columns would
change, which would be a disaster. */
# error "DICT_MAX_INDEX_COL_LEN != 768"
#endif
if (!(col->prtype & DATA_NOT_NULL)) {
index->n_nullable++;
......
......@@ -161,7 +161,9 @@ struct dict_col_struct{
/* DICT_MAX_INDEX_COL_LEN is measured in bytes and is the max index column
length + 1. Starting from 4.1.6, we set it to < 3 * 256, so that one can
create a column prefix index on 255 characters of a TEXT field also in the
UTF-8 charset. In that charset, a character may take at most 3 bytes. */
UTF-8 charset. In that charset, a character may take at most 3 bytes.
This constant MUST NOT BE CHANGED, or the compatibility of InnoDB data files
would be at risk! */
#define DICT_MAX_INDEX_COL_LEN 768
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment