Commit 4544e60d authored by Sergei Golubchik's avatar Sergei Golubchik

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.
parent b1232490
...@@ -46,9 +46,14 @@ static bool pack_fields(uchar *, List<Create_field> &, ulong); ...@@ -46,9 +46,14 @@ static bool pack_fields(uchar *, List<Create_field> &, ulong);
static size_t packed_fields_length(List<Create_field> &); static size_t packed_fields_length(List<Create_field> &);
static bool make_empty_rec(THD *, uchar *, uint, List<Create_field> &, uint, ulong); 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) static uchar *extra2_write_len(uchar *pos, size_t len)
{ {
if (len < 255) if (len <= 255)
*pos++= len; *pos++= len;
else else
{ {
......
create table t1(
col1 varchar(40),
col2 varchar(40),
col3 varchar(40),
col4 varchar(40),
col5 varchar(40),
col6 varchar(40),
col7 varchar(40),
col8 varchar(40),
col9 varchar(40),
col10 varchar(40),
col11 varchar(40),
col12 varchar(40),
col13 varchar(40),
col14 varchar(40),
col15 varchar(40),
col16 varchar(40),
col17 varchar(40),
col18 varchar(40),
col19 varchar(40),
col20 varchar(40),
col21 varchar(40),
col22 varchar(40),
col23 varchar(40),
col24 varchar(40),
col25 varchar(40),
col26 varchar(40),
col27 varchar(40),
col28 varchar(40),
col29 varchar(40),
col30 varchar(40),
col31 varchar(40),
col32 varchar(40),
col33 varchar(40),
col34 varchar(40),
col35 varchar(40),
col36 varchar(40),
col37 varchar(40),
col38 varchar(40),
col39 varchar(40),
col40 varchar(40),
col41 varchar(40),
col42 varchar(40),
col43 varchar(40),
col44 varchar(40),
col45 varchar(40),
col46 varchar(40),
col47 varchar(40),
col48 varchar(40),
col49 varchar(40),
col50 varchar(40),
col51 varchar(40),
col52 varchar(40),
col53 varchar(40),
col54 varchar(40),
col55 varchar(40),
col56 varchar(40),
col57 varchar(40),
col58 varchar(40),
col59 varchar(40),
col60 varchar(40),
col61 varchar(40),
col62 varchar(40),
col63 varchar(40),
col64 varchar(40),
col65 varchar(40),
col66 varchar(40),
col67 varchar(40),
col68 varchar(40),
col69 varchar(40),
col70 varchar(40),
col71 varchar(40),
col72 varchar(40),
col73 varchar(40),
col74 varchar(40),
col75 varchar(40),
col76 varchar(40),
col77 varchar(40),
col78 varchar(40),
col79 varchar(40),
col80 varchar(40),
col81 varchar(40),
col82 varchar(40),
col83 varchar(40),
col84 varchar(40),
col85 varchar(40),
col86 varchar(40),
col87 varchar(40),
col88 varchar(40),
col89 varchar(40),
col90 varchar(40),
col91 varchar(40),
col92 varchar(40),
col93 varchar(40),
col94 varchar(40),
col95 varchar(40),
col96 varchar(40),
col97 varchar(40),
col98 varchar(40),
col99 varchar(40),
col100 varchar(40),
col101 varchar(40),
col102 varchar(40),
col103 varchar(40),
col104 varchar(40),
col105 varchar(40),
col106 varchar(40),
col107 varchar(40),
col108 varchar(40),
col109 varchar(40),
col110 varchar(40),
col111 varchar(40),
col112 varchar(40),
col113 varchar(40),
col114 varchar(40),
col115 varchar(40),
col116 varchar(40),
col117 varchar(40),
col118 varchar(40),
col119 varchar(40),
col120 varchar(40),
col121 varchar(40),
col122 varchar(40),
col123 varchar(40),
col124 varchar(40),
col125 varchar(40),
col126 varchar(40),
col127 varchar(40),
col128 varchar(40),
col129 varchar(40),
col130 varchar(40),
col131 varchar(40),
col132 varchar(40),
col133 varchar(40),
col134 varchar(40),
col135 varchar(40),
col136 varchar(40),
col137 varchar(40),
col138 varchar(40),
col139 varchar(40),
col140 varchar(40),
col141 varchar(40),
col142 varchar(40),
col143 varchar(40),
col144 varchar(40),
col145 varchar(40),
col146 varchar(40),
col147 varchar(40),
col148 varchar(40),
col149 varchar(40),
col150 varchar(40),
col151 varchar(40),
col152 varchar(40),
col153 varchar(40),
col154 varchar(40),
col155 varchar(40),
col156 varchar(40),
col157 varchar(40),
col158 varchar(40),
col159 varchar(40),
col160 varchar(40),
col161 varchar(40),
col162 varchar(40),
col163 varchar(40),
col164 varchar(40),
col165 varchar(40),
col166 varchar(40),
col167 varchar(40),
col168 varchar(40),
col169 varchar(40),
col170 varchar(40),
col171 varchar(40),
col172 varchar(40),
col173 varchar(40),
col174 varchar(40),
col175 varchar(40),
col176 varchar(40),
col177 varchar(40),
col178 varchar(40),
col179 varchar(40),
col180 varchar(40),
col181 varchar(40),
col182 varchar(40),
col183 varchar(40),
col184 varchar(40),
col185 varchar(40),
col186 varchar(40),
col187 varchar(40),
col188 varchar(40),
col189 varchar(40),
col190 varchar(40),
col191 varchar(40),
col192 varchar(40),
col193 varchar(40),
col194 varchar(40),
col195 varchar(40),
col196 varchar(40),
col197 varchar(40),
col198 varchar(40),
col199 varchar(40),
col200 varchar(40),
col201 varchar(40),
col202 varchar(40),
col203 varchar(40),
col204 varchar(40),
col205 varchar(40),
col206 varchar(40),
col207 varchar(40),
col208 varchar(40),
col209 varchar(40),
col210 varchar(40),
col211 varchar(40),
col212 varchar(40),
col213 varchar(40),
col214 varchar(40),
col215 varchar(40),
col216 varchar(40),
col217 varchar(40),
col218 varchar(40),
col219 varchar(40),
col220 varchar(40),
col221 varchar(40),
col222 varchar(40),
col223 varchar(40),
col224 varchar(40),
col225 varchar(40),
col226 varchar(40),
col227 varchar(40),
col228 varchar(40),
col229 varchar(40)
) engine=TokuDB;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`col1` varchar(40) DEFAULT NULL,
`col2` varchar(40) DEFAULT NULL,
`col3` varchar(40) DEFAULT NULL,
`col4` varchar(40) DEFAULT NULL,
`col5` varchar(40) DEFAULT NULL,
`col6` varchar(40) DEFAULT NULL,
`col7` varchar(40) DEFAULT NULL,
`col8` varchar(40) DEFAULT NULL,
`col9` varchar(40) DEFAULT NULL,
`col10` varchar(40) DEFAULT NULL,
`col11` varchar(40) DEFAULT NULL,
`col12` varchar(40) DEFAULT NULL,
`col13` varchar(40) DEFAULT NULL,
`col14` varchar(40) DEFAULT NULL,
`col15` varchar(40) DEFAULT NULL,
`col16` varchar(40) DEFAULT NULL,
`col17` varchar(40) DEFAULT NULL,
`col18` varchar(40) DEFAULT NULL,
`col19` varchar(40) DEFAULT NULL,
`col20` varchar(40) DEFAULT NULL,
`col21` varchar(40) DEFAULT NULL,
`col22` varchar(40) DEFAULT NULL,
`col23` varchar(40) DEFAULT NULL,
`col24` varchar(40) DEFAULT NULL,
`col25` varchar(40) DEFAULT NULL,
`col26` varchar(40) DEFAULT NULL,
`col27` varchar(40) DEFAULT NULL,
`col28` varchar(40) DEFAULT NULL,
`col29` varchar(40) DEFAULT NULL,
`col30` varchar(40) DEFAULT NULL,
`col31` varchar(40) DEFAULT NULL,
`col32` varchar(40) DEFAULT NULL,
`col33` varchar(40) DEFAULT NULL,
`col34` varchar(40) DEFAULT NULL,
`col35` varchar(40) DEFAULT NULL,
`col36` varchar(40) DEFAULT NULL,
`col37` varchar(40) DEFAULT NULL,
`col38` varchar(40) DEFAULT NULL,
`col39` varchar(40) DEFAULT NULL,
`col40` varchar(40) DEFAULT NULL,
`col41` varchar(40) DEFAULT NULL,
`col42` varchar(40) DEFAULT NULL,
`col43` varchar(40) DEFAULT NULL,
`col44` varchar(40) DEFAULT NULL,
`col45` varchar(40) DEFAULT NULL,
`col46` varchar(40) DEFAULT NULL,
`col47` varchar(40) DEFAULT NULL,
`col48` varchar(40) DEFAULT NULL,
`col49` varchar(40) DEFAULT NULL,
`col50` varchar(40) DEFAULT NULL,
`col51` varchar(40) DEFAULT NULL,
`col52` varchar(40) DEFAULT NULL,
`col53` varchar(40) DEFAULT NULL,
`col54` varchar(40) DEFAULT NULL,
`col55` varchar(40) DEFAULT NULL,
`col56` varchar(40) DEFAULT NULL,
`col57` varchar(40) DEFAULT NULL,
`col58` varchar(40) DEFAULT NULL,
`col59` varchar(40) DEFAULT NULL,
`col60` varchar(40) DEFAULT NULL,
`col61` varchar(40) DEFAULT NULL,
`col62` varchar(40) DEFAULT NULL,
`col63` varchar(40) DEFAULT NULL,
`col64` varchar(40) DEFAULT NULL,
`col65` varchar(40) DEFAULT NULL,
`col66` varchar(40) DEFAULT NULL,
`col67` varchar(40) DEFAULT NULL,
`col68` varchar(40) DEFAULT NULL,
`col69` varchar(40) DEFAULT NULL,
`col70` varchar(40) DEFAULT NULL,
`col71` varchar(40) DEFAULT NULL,
`col72` varchar(40) DEFAULT NULL,
`col73` varchar(40) DEFAULT NULL,
`col74` varchar(40) DEFAULT NULL,
`col75` varchar(40) DEFAULT NULL,
`col76` varchar(40) DEFAULT NULL,
`col77` varchar(40) DEFAULT NULL,
`col78` varchar(40) DEFAULT NULL,
`col79` varchar(40) DEFAULT NULL,
`col80` varchar(40) DEFAULT NULL,
`col81` varchar(40) DEFAULT NULL,
`col82` varchar(40) DEFAULT NULL,
`col83` varchar(40) DEFAULT NULL,
`col84` varchar(40) DEFAULT NULL,
`col85` varchar(40) DEFAULT NULL,
`col86` varchar(40) DEFAULT NULL,
`col87` varchar(40) DEFAULT NULL,
`col88` varchar(40) DEFAULT NULL,
`col89` varchar(40) DEFAULT NULL,
`col90` varchar(40) DEFAULT NULL,
`col91` varchar(40) DEFAULT NULL,
`col92` varchar(40) DEFAULT NULL,
`col93` varchar(40) DEFAULT NULL,
`col94` varchar(40) DEFAULT NULL,
`col95` varchar(40) DEFAULT NULL,
`col96` varchar(40) DEFAULT NULL,
`col97` varchar(40) DEFAULT NULL,
`col98` varchar(40) DEFAULT NULL,
`col99` varchar(40) DEFAULT NULL,
`col100` varchar(40) DEFAULT NULL,
`col101` varchar(40) DEFAULT NULL,
`col102` varchar(40) DEFAULT NULL,
`col103` varchar(40) DEFAULT NULL,
`col104` varchar(40) DEFAULT NULL,
`col105` varchar(40) DEFAULT NULL,
`col106` varchar(40) DEFAULT NULL,
`col107` varchar(40) DEFAULT NULL,
`col108` varchar(40) DEFAULT NULL,
`col109` varchar(40) DEFAULT NULL,
`col110` varchar(40) DEFAULT NULL,
`col111` varchar(40) DEFAULT NULL,
`col112` varchar(40) DEFAULT NULL,
`col113` varchar(40) DEFAULT NULL,
`col114` varchar(40) DEFAULT NULL,
`col115` varchar(40) DEFAULT NULL,
`col116` varchar(40) DEFAULT NULL,
`col117` varchar(40) DEFAULT NULL,
`col118` varchar(40) DEFAULT NULL,
`col119` varchar(40) DEFAULT NULL,
`col120` varchar(40) DEFAULT NULL,
`col121` varchar(40) DEFAULT NULL,
`col122` varchar(40) DEFAULT NULL,
`col123` varchar(40) DEFAULT NULL,
`col124` varchar(40) DEFAULT NULL,
`col125` varchar(40) DEFAULT NULL,
`col126` varchar(40) DEFAULT NULL,
`col127` varchar(40) DEFAULT NULL,
`col128` varchar(40) DEFAULT NULL,
`col129` varchar(40) DEFAULT NULL,
`col130` varchar(40) DEFAULT NULL,
`col131` varchar(40) DEFAULT NULL,
`col132` varchar(40) DEFAULT NULL,
`col133` varchar(40) DEFAULT NULL,
`col134` varchar(40) DEFAULT NULL,
`col135` varchar(40) DEFAULT NULL,
`col136` varchar(40) DEFAULT NULL,
`col137` varchar(40) DEFAULT NULL,
`col138` varchar(40) DEFAULT NULL,
`col139` varchar(40) DEFAULT NULL,
`col140` varchar(40) DEFAULT NULL,
`col141` varchar(40) DEFAULT NULL,
`col142` varchar(40) DEFAULT NULL,
`col143` varchar(40) DEFAULT NULL,
`col144` varchar(40) DEFAULT NULL,
`col145` varchar(40) DEFAULT NULL,
`col146` varchar(40) DEFAULT NULL,
`col147` varchar(40) DEFAULT NULL,
`col148` varchar(40) DEFAULT NULL,
`col149` varchar(40) DEFAULT NULL,
`col150` varchar(40) DEFAULT NULL,
`col151` varchar(40) DEFAULT NULL,
`col152` varchar(40) DEFAULT NULL,
`col153` varchar(40) DEFAULT NULL,
`col154` varchar(40) DEFAULT NULL,
`col155` varchar(40) DEFAULT NULL,
`col156` varchar(40) DEFAULT NULL,
`col157` varchar(40) DEFAULT NULL,
`col158` varchar(40) DEFAULT NULL,
`col159` varchar(40) DEFAULT NULL,
`col160` varchar(40) DEFAULT NULL,
`col161` varchar(40) DEFAULT NULL,
`col162` varchar(40) DEFAULT NULL,
`col163` varchar(40) DEFAULT NULL,
`col164` varchar(40) DEFAULT NULL,
`col165` varchar(40) DEFAULT NULL,
`col166` varchar(40) DEFAULT NULL,
`col167` varchar(40) DEFAULT NULL,
`col168` varchar(40) DEFAULT NULL,
`col169` varchar(40) DEFAULT NULL,
`col170` varchar(40) DEFAULT NULL,
`col171` varchar(40) DEFAULT NULL,
`col172` varchar(40) DEFAULT NULL,
`col173` varchar(40) DEFAULT NULL,
`col174` varchar(40) DEFAULT NULL,
`col175` varchar(40) DEFAULT NULL,
`col176` varchar(40) DEFAULT NULL,
`col177` varchar(40) DEFAULT NULL,
`col178` varchar(40) DEFAULT NULL,
`col179` varchar(40) DEFAULT NULL,
`col180` varchar(40) DEFAULT NULL,
`col181` varchar(40) DEFAULT NULL,
`col182` varchar(40) DEFAULT NULL,
`col183` varchar(40) DEFAULT NULL,
`col184` varchar(40) DEFAULT NULL,
`col185` varchar(40) DEFAULT NULL,
`col186` varchar(40) DEFAULT NULL,
`col187` varchar(40) DEFAULT NULL,
`col188` varchar(40) DEFAULT NULL,
`col189` varchar(40) DEFAULT NULL,
`col190` varchar(40) DEFAULT NULL,
`col191` varchar(40) DEFAULT NULL,
`col192` varchar(40) DEFAULT NULL,
`col193` varchar(40) DEFAULT NULL,
`col194` varchar(40) DEFAULT NULL,
`col195` varchar(40) DEFAULT NULL,
`col196` varchar(40) DEFAULT NULL,
`col197` varchar(40) DEFAULT NULL,
`col198` varchar(40) DEFAULT NULL,
`col199` varchar(40) DEFAULT NULL,
`col200` varchar(40) DEFAULT NULL,
`col201` varchar(40) DEFAULT NULL,
`col202` varchar(40) DEFAULT NULL,
`col203` varchar(40) DEFAULT NULL,
`col204` varchar(40) DEFAULT NULL,
`col205` varchar(40) DEFAULT NULL,
`col206` varchar(40) DEFAULT NULL,
`col207` varchar(40) DEFAULT NULL,
`col208` varchar(40) DEFAULT NULL,
`col209` varchar(40) DEFAULT NULL,
`col210` varchar(40) DEFAULT NULL,
`col211` varchar(40) DEFAULT NULL,
`col212` varchar(40) DEFAULT NULL,
`col213` varchar(40) DEFAULT NULL,
`col214` varchar(40) DEFAULT NULL,
`col215` varchar(40) DEFAULT NULL,
`col216` varchar(40) DEFAULT NULL,
`col217` varchar(40) DEFAULT NULL,
`col218` varchar(40) DEFAULT NULL,
`col219` varchar(40) DEFAULT NULL,
`col220` varchar(40) DEFAULT NULL,
`col221` varchar(40) DEFAULT NULL,
`col222` varchar(40) DEFAULT NULL,
`col223` varchar(40) DEFAULT NULL,
`col224` varchar(40) DEFAULT NULL,
`col225` varchar(40) DEFAULT NULL,
`col226` varchar(40) DEFAULT NULL,
`col227` varchar(40) DEFAULT NULL,
`col228` varchar(40) DEFAULT NULL,
`col229` varchar(40) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
drop table t1;
create table t1(
col1 varchar(40),
col2 varchar(40),
col3 varchar(40),
col4 varchar(40),
col5 varchar(40),
col6 varchar(40),
col7 varchar(40),
col8 varchar(40),
col9 varchar(40),
col10 varchar(40),
col11 varchar(40),
col12 varchar(40),
col13 varchar(40),
col14 varchar(40),
col15 varchar(40),
col16 varchar(40),
col17 varchar(40),
col18 varchar(40),
col19 varchar(40),
col20 varchar(40),
col21 varchar(40),
col22 varchar(40),
col23 varchar(40),
col24 varchar(40),
col25 varchar(40),
col26 varchar(40),
col27 varchar(40),
col28 varchar(40),
col29 varchar(40),
col30 varchar(40),
col31 varchar(40),
col32 varchar(40),
col33 varchar(40),
col34 varchar(40),
col35 varchar(40),
col36 varchar(40),
col37 varchar(40),
col38 varchar(40),
col39 varchar(40),
col40 varchar(40),
col41 varchar(40),
col42 varchar(40),
col43 varchar(40),
col44 varchar(40),
col45 varchar(40),
col46 varchar(40),
col47 varchar(40),
col48 varchar(40),
col49 varchar(40),
col50 varchar(40),
col51 varchar(40),
col52 varchar(40),
col53 varchar(40),
col54 varchar(40),
col55 varchar(40),
col56 varchar(40),
col57 varchar(40),
col58 varchar(40),
col59 varchar(40),
col60 varchar(40),
col61 varchar(40),
col62 varchar(40),
col63 varchar(40),
col64 varchar(40),
col65 varchar(40),
col66 varchar(40),
col67 varchar(40),
col68 varchar(40),
col69 varchar(40),
col70 varchar(40),
col71 varchar(40),
col72 varchar(40),
col73 varchar(40),
col74 varchar(40),
col75 varchar(40),
col76 varchar(40),
col77 varchar(40),
col78 varchar(40),
col79 varchar(40),
col80 varchar(40),
col81 varchar(40),
col82 varchar(40),
col83 varchar(40),
col84 varchar(40),
col85 varchar(40),
col86 varchar(40),
col87 varchar(40),
col88 varchar(40),
col89 varchar(40),
col90 varchar(40),
col91 varchar(40),
col92 varchar(40),
col93 varchar(40),
col94 varchar(40),
col95 varchar(40),
col96 varchar(40),
col97 varchar(40),
col98 varchar(40),
col99 varchar(40),
col100 varchar(40),
col101 varchar(40),
col102 varchar(40),
col103 varchar(40),
col104 varchar(40),
col105 varchar(40),
col106 varchar(40),
col107 varchar(40),
col108 varchar(40),
col109 varchar(40),
col110 varchar(40),
col111 varchar(40),
col112 varchar(40),
col113 varchar(40),
col114 varchar(40),
col115 varchar(40),
col116 varchar(40),
col117 varchar(40),
col118 varchar(40),
col119 varchar(40),
col120 varchar(40),
col121 varchar(40),
col122 varchar(40),
col123 varchar(40),
col124 varchar(40),
col125 varchar(40),
col126 varchar(40),
col127 varchar(40),
col128 varchar(40),
col129 varchar(40),
col130 varchar(40),
col131 varchar(40),
col132 varchar(40),
col133 varchar(40),
col134 varchar(40),
col135 varchar(40),
col136 varchar(40),
col137 varchar(40),
col138 varchar(40),
col139 varchar(40),
col140 varchar(40),
col141 varchar(40),
col142 varchar(40),
col143 varchar(40),
col144 varchar(40),
col145 varchar(40),
col146 varchar(40),
col147 varchar(40),
col148 varchar(40),
col149 varchar(40),
col150 varchar(40),
col151 varchar(40),
col152 varchar(40),
col153 varchar(40),
col154 varchar(40),
col155 varchar(40),
col156 varchar(40),
col157 varchar(40),
col158 varchar(40),
col159 varchar(40),
col160 varchar(40),
col161 varchar(40),
col162 varchar(40),
col163 varchar(40),
col164 varchar(40),
col165 varchar(40),
col166 varchar(40),
col167 varchar(40),
col168 varchar(40),
col169 varchar(40),
col170 varchar(40),
col171 varchar(40),
col172 varchar(40),
col173 varchar(40),
col174 varchar(40),
col175 varchar(40),
col176 varchar(40),
col177 varchar(40),
col178 varchar(40),
col179 varchar(40),
col180 varchar(40),
col181 varchar(40),
col182 varchar(40),
col183 varchar(40),
col184 varchar(40),
col185 varchar(40),
col186 varchar(40),
col187 varchar(40),
col188 varchar(40),
col189 varchar(40),
col190 varchar(40),
col191 varchar(40),
col192 varchar(40),
col193 varchar(40),
col194 varchar(40),
col195 varchar(40),
col196 varchar(40),
col197 varchar(40),
col198 varchar(40),
col199 varchar(40),
col200 varchar(40),
col201 varchar(40),
col202 varchar(40),
col203 varchar(40),
col204 varchar(40),
col205 varchar(40),
col206 varchar(40),
col207 varchar(40),
col208 varchar(40),
col209 varchar(40),
col210 varchar(40),
col211 varchar(40),
col212 varchar(40),
col213 varchar(40),
col214 varchar(40),
col215 varchar(40),
col216 varchar(40),
col217 varchar(40),
col218 varchar(40),
col219 varchar(40),
col220 varchar(40),
col221 varchar(40),
col222 varchar(40),
col223 varchar(40),
col224 varchar(40),
col225 varchar(40),
col226 varchar(40),
col227 varchar(40),
col228 varchar(40),
col229 varchar(40)
) engine=TokuDB;
show create table t1;
drop table t1;
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