diff options
author | Sergei Golubchik <sergii@pisem.net> | 2014-05-01 14:04:00 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2014-05-01 14:04:00 +0200 |
commit | 4544e60d298b29a10baa7d5cbb55313e923c16e2 (patch) | |
tree | e8e2220804e11664f87763c7034a2f7f793d4883 /sql/unireg.cc | |
parent | b1232490107fd5b832912f324fb59ae7f56650b8 (diff) | |
download | mariadb-git-4544e60d298b29a10baa7d5cbb55313e923c16e2.tar.gz |
MDEV-6106 Cannot create a table with 229 or greater columns in TokuDB
correct the length encoding for the extra2 frm segment. add the comment.
Diffstat (limited to 'sql/unireg.cc')
-rw-r--r-- | sql/unireg.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sql/unireg.cc b/sql/unireg.cc index aeeba6f4f85..b7ac8b17c38 100644 --- a/sql/unireg.cc +++ b/sql/unireg.cc @@ -46,9 +46,14 @@ static bool pack_fields(uchar *, List<Create_field> &, ulong); static size_t packed_fields_length(List<Create_field> &); static bool make_empty_rec(THD *, uchar *, uint, List<Create_field> &, uint, ulong); +/* + write the length as + if ( 0 < length <= 255) one byte + if (256 < length <= 65535) zero byte, then two bytes, low-endian +*/ static uchar *extra2_write_len(uchar *pos, size_t len) { - if (len < 255) + if (len <= 255) *pos++= len; else { |