Debian Codegraph @

mysql-test/suite/innodb_zip/t/8k.test

raw
1 # Tests for setting innodb-page-size=8k
2
3 SET default_storage_engine=InnoDB;
4
5 --disable_query_log
6 let $MYSQLD_DATADIR = `select @@datadir`;
7 let $INNODB_PAGE_SIZE = `select @@innodb_page_size`;
8
9 call mtr.add_suppression("Cannot create the table .* because the record size will exceed the maximum allowed size for a record.");
10 --enable_query_log
11
12 --echo # Test 1) Show the page size from Information Schema
13 --disable_warnings
14 SELECT variable_value FROM performance_schema.global_status
15 WHERE LOWER(variable_name) = 'innodb_page_size';
16 --enable_warnings
17
18 --echo # Test 2) The number of buffer pool pages is dependent upon the page size.
19 --disable_warnings
20 --replace_result 3071 {checked_valid} 3072 {checked_valid}
21 SELECT variable_value FROM performance_schema.global_status
22 WHERE LOWER(variable_name) = 'innodb_buffer_pool_pages_total';
23 --enable_warnings
24
25 --echo # Test 3) Query some information_shema tables that are dependent upon
26 --echo # the page size.
27 # Show the metadata for tables in schema 'mysql'.
28 # Pulled from innodb-system-table-view.test
29 # The IDs of mysql.innodb_table_stats and mysql.innodb_index_stats are
30 # unpredictable. They depend on whether mtr has created the database for
31 # this test from scratch or is using a previously created database where
32 # those tables have been dropped and recreated. Since we cannot force mtr
33 # to use a freshly created database for this test we do not return the
34 # table or index IDs. We can return the space IS of mysql schema tables
35 # since they are created consistently during bootstrap.
36 SELECT t.name table_name, t.n_cols, t.flag table_flags,
37 i.name index_name, i.page_no root_page, i.type,
38 i.n_fields, i.merge_threshold
39 FROM INFORMATION_SCHEMA.INNODB_TABLES t,
40 INFORMATION_SCHEMA.INNODB_INDEXES i
41 WHERE t.table_id = i.table_id
42 AND t.name LIKE 'mysql%'
43 AND t.name NOT LIKE 'mysql/ndb_binlog_index'
44 ORDER BY t.name, i.index_id;
45
46 CREATE TABLE t1 (a INT KEY, b TEXT) ROW_FORMAT=REDUNDANT ENGINE=innodb;
47 CREATE TABLE t2 (a INT KEY, b TEXT) ROW_FORMAT=COMPACT ENGINE=innodb;
48 CREATE TABLE t3 (a INT KEY, b TEXT) ROW_FORMAT=COMPRESSED ENGINE=innodb;
49 CREATE TABLE t4 (a INT KEY, b TEXT) ROW_FORMAT=DYNAMIC ENGINE=innodb;
50
51 # Show the metadata for tables in schema 'test'.
52 # Do not return the space ID since this tablespace may have existed before
53 # this test runs. The root page number of each index should be consistent
54 # within a file-per-table tablespace.
55 SELECT t.name table_name, t.n_cols, t.flag table_flags,
56 i.name index_name, i.page_no root_page, i.type,
57 i.n_fields, i.merge_threshold
58 FROM INFORMATION_SCHEMA.INNODB_TABLES t,
59 INFORMATION_SCHEMA.INNODB_INDEXES i
60 WHERE t.table_id = i.table_id
61 AND t.name LIKE 'test%'
62 ORDER BY t.name, i.name;
63 --source suite/innodb/include/show_i_s_tablespaces.inc
64 DROP TABLE t1, t2, t3, t4;
65
66 --echo # Test 4) The maximum row size is dependent upon the page size.
67 --echo # Redundant: 4027, Compact: 4030.
68 --echo # Compressed: 4030, Dynamic: 4030.
69 --echo # Each row format has its own amount of overhead that
70 --echo # varies depending on number of fields and other overhead.
71
72 SET SESSION innodb_strict_mode = ON;
73
74 # Redundant table; 4026 bytes with 20 CHAR fields
75 # Calculation :
76 # 6 (extra bytes)
77 # 2 * 23 = 46 (fields len) = 2 * n_fields (3 system fields + 20 user fields)
78 # 6 + 6 + 7 = 19 (ROW_ID, TRX_ID, ROLL_PTR)
79 # 200 * 19 = 3800 (each char(200) field)
80 # 155 = (char(155))
81 # T0tal = 4026
82 # NOTE : charset latin1 causes each char to have max 1 bytes. If we use default
83 # (utf8_mb4) then each char will need 4 bytes. So char(200) will need
84 # max 800 bytes.
85 CREATE TABLE t1 (
86 c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
87 c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
88 c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
89 c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(155)
90 ) charset latin1 ROW_FORMAT=redundant;
91 DROP TABLE t1;
92 # Redundant table; 4027 bytes with 20 CHAR fields
93 --replace_regex /> [0-9]*/> max_row_size/
94 --error ER_TOO_BIG_ROWSIZE
95 CREATE TABLE t1 (
96 c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
97 c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
98 c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
99 c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(156)
100 ) charset latin1 ROW_FORMAT=redundant;
101
102 # Compact table; 4029 bytes with 20 CHAR fields
103 # Calculation :
104 # 5 (extra bytes)
105 # 3 (null bitmap)
106 # 6 + 6 + 7 = 19 (ROW_ID, TRX_ID, ROLL_PTR)
107 # 200 * 19 = 3800 (each char(200) field)
108 # 202 = (char(202))
109 # Total = 4029
110 # NOTE : charset latin1 causes each char to have max 1 bytes. If we use default
111 # (utf8_mb4) then each char will need 4 bytes. So char(200) will need
112 # max 800 bytes.
113 CREATE TABLE t1 (
114 c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
115 c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
116 c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
117 c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(202)
118 ) charset latin1 ROW_FORMAT=compact;
119 DROP TABLE t1;
120 # Compact table; 4030 bytes with 20 CHAR fields
121 --replace_regex /> [0-9]*/> max_row_size/
122 --error ER_TOO_BIG_ROWSIZE
123 CREATE TABLE t1 (
124 c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
125 c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
126 c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
127 c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(203)
128 ) charset latin1 ROW_FORMAT=compact;
129
130 # Compressed table; 3905 bytes with 20 CHAR fields
131 # Bug#13391353 Limit is 3903 on 32-Linux only
132 CREATE TABLE t1 (
133 c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
134 c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
135 c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
136 c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(103)
137 ) ROW_FORMAT=compressed;
138 DROP TABLE t1;
139 --replace_regex /> [0-9]*/> max_row_size/
140 --error ER_TOO_BIG_ROWSIZE
141 CREATE TABLE t1 (
142 c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
143 c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
144 c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
145 c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(106)
146 ) charset latin1 ROW_FORMAT=compressed;
147
148 # Dynamic table; 4002 bytes with 20 CHAR fields
149 CREATE TABLE t1 (
150 c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
151 c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
152 c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
153 c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(202)
154 ) ROW_FORMAT=dynamic;
155 DROP TABLE t1;
156 --replace_regex /> [0-9]*/> max_row_size/
157 --error ER_TOO_BIG_ROWSIZE
158 CREATE TABLE t1 (
159 c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
160 c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
161 c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
162 c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(203)
163 ) charset latin1 ROW_FORMAT=dynamic;
164
165 #
166 # Test the maximum key length
167 # Moved from innodb-index.test since each page size has its own max key length.
168 # Max Key Length is 1536 for 8k pages.
169 #
170 # InnoDB assumes 3 bytes for each UTF8 character.
171 #
172 CREATE TABLE t1 (a varchar(128) character set utf8,
173 b varchar(128) character set utf8,
174 c varchar(128) character set utf8,
175 d varchar(128) character set utf8,
176 PRIMARY KEY (a,b,c,d))
177 charset latin1
178 ENGINE=innodb;
179 DROP TABLE t1;
180 --error ER_TOO_LONG_KEY
181 CREATE TABLE t1 (a varchar(128) character set utf8,
182 b varchar(128) character set utf8,
183 c varchar(128) character set utf8,
184 d varchar(129) character set utf8,
185 PRIMARY KEY (a,b,c,d))
186 charset latin1
187 ENGINE=innodb;
188 CREATE TABLE t1 (a varchar(128) character set utf8,
189 b varchar(128) character set utf8,
190 c varchar(128) character set utf8,
191 d varchar(128) character set utf8,
192 e varchar(128) character set utf8,
193 PRIMARY KEY (a), KEY (b,c,d,e))
194 charset latin1
195 ENGINE=innodb;
196 DROP TABLE t1;
197 --error ER_TOO_LONG_KEY
198 CREATE TABLE t1 (a varchar(128) character set utf8,
199 b varchar(128) character set utf8,
200 c varchar(128) character set utf8,
201 d varchar(128) character set utf8,
202 e varchar(129) character set utf8,
203 PRIMARY KEY (a), KEY (b,c,d,e))
204 charset latin1
205 ENGINE=innodb;
206
207 --echo # Test 5) Make sure that KEY_BLOCK_SIZE=8, 4, 2 & 1 are all
208 --echo # accepted and that KEY_BLOCK_SIZE=16 is rejected in
209 --echo # strict mode and converted to 8 in non-strict mode.
210
211 SET SESSION innodb_strict_mode = ON;
212
213 --error ER_ILLEGAL_HA
214 CREATE TABLE t1 (i int) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16;
215 SHOW WARNINGS;
216
217 CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8;
218 SHOW WARNINGS;
219 SELECT table_name, row_format, create_options
220 FROM information_schema.tables WHERE table_name = 't1';
221
222 ALTER TABLE t1 KEY_BLOCK_SIZE=4;
223 SHOW WARNINGS;
224 SELECT table_name, row_format, create_options
225 FROM information_schema.tables WHERE table_name = 't1';
226
227 ALTER TABLE t1 KEY_BLOCK_SIZE=2;
228 SHOW WARNINGS;
229 SELECT table_name, row_format, create_options
230 FROM information_schema.tables WHERE table_name = 't1';
231
232 ALTER TABLE t1 KEY_BLOCK_SIZE=1;
233 SHOW WARNINGS;
234 SELECT table_name, row_format, create_options
235 FROM information_schema.tables WHERE table_name = 't1';
236
237 ALTER TABLE t1 KEY_BLOCK_SIZE=0;
238 SHOW WARNINGS;
239 SELECT table_name, row_format, create_options
240 FROM information_schema.tables WHERE table_name = 't1';
241 DROP TABLE t1;
242
243 SET SESSION innodb_strict_mode = OFF;
244
245 CREATE TABLE t1 (i int) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16;
246 SHOW WARNINGS;
247 SELECT table_name, row_format, create_options
248 FROM information_schema.tables WHERE table_name = 't1';
249 DROP TABLE t1;
250
251 CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8;
252 SHOW WARNINGS;
253 SELECT table_name, row_format, create_options
254 FROM information_schema.tables WHERE table_name = 't1';
255 DROP TABLE t1;
256
257 CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
258 SHOW WARNINGS;
259 SELECT table_name, row_format, create_options
260 FROM information_schema.tables WHERE table_name = 't1';
261
262 ALTER TABLE t1 KEY_BLOCK_SIZE=2;
263 SHOW WARNINGS;
264 SELECT table_name, row_format, create_options
265 FROM information_schema.tables WHERE table_name = 't1';
266
267 ALTER TABLE t1 KEY_BLOCK_SIZE=1;
268 SHOW WARNINGS;
269 SELECT table_name, row_format, create_options
270 FROM information_schema.tables WHERE table_name = 't1';
271
272 ALTER TABLE t1 KEY_BLOCK_SIZE=0;
273 SHOW WARNINGS;
274 SELECT table_name, row_format, create_options
275 FROM information_schema.tables WHERE table_name = 't1';
276 DROP TABLE t1;
277
278
279 --echo # Test 6) Make sure that KEY_BLOCK_SIZE = 8 and 16
280 --echo # are rejected when innodb_file_per_table=OFF
281 # Moved from innodb-zip.test
282 SET SESSION innodb_strict_mode = ON;
283 SET GLOBAL innodb_file_per_table = OFF;
284 SHOW VARIABLES LIKE 'innodb_file_per_table';
285 --error ER_ILLEGAL_HA
286 CREATE TABLE t4 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=8;
287 SHOW WARNINGS;
288 --error ER_ILLEGAL_HA
289 CREATE TABLE t5 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=16;
290 SHOW WARNINGS;
291 SET GLOBAL innodb_file_per_table = ON;
292 CREATE TABLE t4 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=8;
293 SHOW WARNINGS;
294 DROP TABLE t4;
295 --error ER_ILLEGAL_HA
296 CREATE TABLE t5 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=16;
297 SHOW WARNINGS;
298
299 --echo # Test 7) Not included here; 16k only
300
301
302 --echo # Test 8) Test creating a table that could lead to undo log overflow.
303 CREATE TABLE t1(a blob,b blob,c blob,d blob,e blob,f blob,g blob,
304 h blob,i blob,j blob,k blob,l blob,m blob,n blob,
305 o blob,p blob,q blob,r blob,s blob,t blob,u blob)
306 ENGINE=InnoDB ROW_FORMAT=dynamic;
307 SET @a = repeat('a', 767);
308 SET @b = repeat('b', 767);
309 SET @c = repeat('c', 767);
310 SET @d = repeat('d', 767);
311 SET @e = repeat('e', 767);
312
313 # With no indexes defined, we can update all columns to max key part length.
314 INSERT INTO t1 VALUES (@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a);
315 UPDATE t1 SET a=@b,b=@b,c=@b,d=@b,e=@b,f=@b,g=@b,h=@b,i=@b,j=@b,
316 k=@b,l=@b,m=@b,n=@b,o=@b,p=@b,q=@b,r=@b,s=@b,t=@b,u=@b;
317
318 # With this many indexes defined, we can still update all fields.
319 CREATE INDEX t1a ON t1 (a(767));
320 CREATE INDEX t1b ON t1 (b(767));
321 UPDATE t1 SET a=@c,b=@c,c=@c,d=@c,e=@c,f=@c,g=@c,h=@c,i=@c,j=@c,
322 k=@c,l=@c,m=@c,n=@c,o=@c,p=@c,q=@c,r=@c,s=@c,t=@c,u=@c;
323
324 # Add one more index and the UNDO record becomes too big to update all columns.
325 # But a single transaction can update the columns in separate statements.
326 # because the UNDO records will be smaller.
327 CREATE INDEX t1c ON t1 (c(767));
328 --error ER_UNDO_RECORD_TOO_BIG
329 UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d,f=@d,g=@d,h=@d,i=@d,j=@d,
330 k=@d,l=@d,m=@d,n=@d,o=@d,p=@d,q=@d,r=@d,s=@d,t=@d,u=@d;
331 BEGIN;
332 UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d;
333 UPDATE t1 SET f=@d,g=@d,h=@d,i=@d,j=@d,k=@d,l=@d,m=@d,
334 n=@d,o=@d,p=@d,q=@d,r=@d,s=@d,t=@d,u=@d;
335 COMMIT;
336
337 # More indexes can still be added and a single field can still be updated
338 CREATE INDEX t1d ON t1 (d(767));
339 UPDATE t1 SET d=@e;
340 CREATE INDEX t1e ON t1 (e(767));
341 UPDATE t1 SET e=@e;
342 CREATE INDEX t1f ON t1 (f(767));
343 UPDATE t1 SET f=@e;
344 CREATE INDEX t1g ON t1 (g(767));
345 UPDATE t1 SET g=@e;
346 CREATE INDEX t1h ON t1 (h(767));
347 UPDATE t1 SET h=@e;
348 CREATE INDEX t1i ON t1 (i(767));
349 UPDATE t1 SET i=@e;
350
351 --replace_regex /> [0-9]*/> max_row_size/
352 CREATE INDEX t1k ON t1 (j(767));
353
354 # But it does allow a 500 byte index. And with this, we cannot
355 # update the record. This is a problem. It means that the DDL is
356 # allowed to create a table and a record that CANNOT be updated.
357 # See bug#12953735
358 --replace_regex /> [0-9]*/> max_row_size/
359 CREATE INDEX t1j ON t1 (j(500));
360 --error ER_UNDO_RECORD_TOO_BIG
361 UPDATE t1 SET j=@e;
362 SHOW CREATE TABLE t1;
363 DROP TABLE t1;
364
365 #
366 # Bug #13336585 - INNODB: CHANGE BUFFERING WITH 4K PAGES CAN ASSERT
367 # IF SECONDARY KEY IS NEAR MAX
368 # If the secondary index tuple is close to half the page size,
369 # ibuf_insert_low() could return DB_TOO_BIG_RECORD, which is not expected
370 # in ibuf_insert(). In order to insure this does not happen, WL5756
371 # imposes a maximum key length of 768 for 4k pages and 1536 for 8k pages.
372 # The existing max key Size for 16k pages is 3072.
373 #
374
375 #-- disable_query_log
376 # The flag innodb_change_buffering_debug is only available in debug builds.
377 # It instructs InnoDB to try to evict pages from the buffer pool when
378 # change buffering is possible, so that the change buffer will be used
379 # whenever possible.
380 #-- error 0,ER_UNKNOWN_SYSTEM_VARIABLE
381 #SET @innodb_change_buffering_debug_orig = @@innodb_change_buffering_debug;
382 #-- error 0,ER_UNKNOWN_SYSTEM_VARIABLE
383 #SET GLOBAL innodb_change_buffering_debug = 1;
384 #-- enable_query_log
385
386 # make sure the largest possible key entry can be added to the insert buffer.
387 # Make enough records so that the root page is not a leaf page.
388 SET SESSION innodb_strict_mode = OFF;
389 --replace_regex /> [0-9]*/> max_row_size/
390 CREATE TABLE t1(
391 pk01 varchar(96), pk02 varchar(96), pk03 varchar(96), pk04 varchar(96),
392 pk05 varchar(96), pk06 varchar(96), pk07 varchar(96), pk08 varchar(96),
393 pk09 varchar(96), pk10 varchar(96), pk11 varchar(96), pk12 varchar(96),
394 pk13 varchar(96), pk14 varchar(96), pk15 varchar(96), pk16 varchar(96),
395 sk01 varchar(96), sk02 varchar(96), sk03 varchar(96), sk04 varchar(96),
396 sk05 varchar(96), sk06 varchar(96), sk07 varchar(96), sk08 varchar(96),
397 sk09 varchar(96), sk10 varchar(96), sk11 varchar(96), sk12 varchar(96),
398 sk13 varchar(96), sk14 varchar(96), sk15 varchar(96), sk16 varchar(96),
399 PRIMARY KEY pk(pk01,pk02,pk03,pk04,pk05,pk06,pk07,pk08,
400 pk09,pk10,pk11,pk12,pk13,pk14,pk15,pk16),
401 KEY pk(sk01,sk02,sk03,sk04,sk05,sk06,sk07,sk08,
402 sk09,sk10,sk11,sk12,sk13,sk14,sk15,sk16))
403 charset latin1
404 ROW_FORMAT=Redundant ENGINE=InnoDB;
405 SET @r = repeat('a', 96);
406 INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
407 @r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
408 SET @r = repeat('b', 96);
409 INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
410 @r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
411 SET @r = repeat('c', 96);
412 INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
413 @r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
414 SET @r = repeat('d', 96);
415 INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
416 @r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
417 SET @r = repeat('e', 96);
418 INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
419 @r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
420 DELETE from t1;
421 DROP TABLE t1;
422
423 # Compressed tables do not compress parent pages. So the whole uncompressed
424 # secondary tuple including the primary key must be able to fit in half the
425 # compressed page size. This record length is enforced at index creation.
426 # So the only way to get an ibuf tuple too big is to make the KEY_BLOCK_SIZE
427 # the same as the page size.
428 CREATE TABLE t1(
429 pk01 varchar(96), pk02 varchar(96), pk03 varchar(96), pk04 varchar(96),
430 pk05 varchar(96), pk06 varchar(96), pk07 varchar(96), pk08 varchar(96),
431 pk09 varchar(96), pk10 varchar(96), pk11 varchar(96), pk12 varchar(96),
432 pk13 varchar(96), pk14 varchar(96), pk15 varchar(96), pk16 varchar(96),
433 sk01 varchar(96), sk02 varchar(96), sk03 varchar(96), sk04 varchar(96),
434 sk05 varchar(96), sk06 varchar(96), sk07 varchar(96), sk08 varchar(96),
435 sk09 varchar(96), sk10 varchar(96), sk11 varchar(96), sk12 varchar(96),
436 sk13 varchar(96), sk14 varchar(96), sk15 varchar(96), sk16 varchar(96),
437 PRIMARY KEY pk(pk01,pk02,pk03,pk04,pk05,pk06,pk07,pk08,
438 pk09,pk10,pk11,pk12,pk13,pk14,pk15,pk16),
439 KEY pk(sk01,sk02,sk03,sk04,sk05,sk06,sk07,sk08,
440 sk09,sk10,sk11,sk12,sk13,sk14,sk15,sk16))
441 charset latin1
442 ROW_FORMAT=Compressed KEY_BLOCK_SIZE=8 ENGINE=InnoDB;
443 SET @r = repeat('a', 96);
444 INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
445 @r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
446 SET @r = repeat('b', 96);
447 INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
448 @r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
449 SET @r = repeat('c', 96);
450 INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
451 @r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
452 SET @r = repeat('d', 96);
453 INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
454 @r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
455 SET @r = repeat('e', 96);
456 INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
457 @r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
458 DELETE from t1;
459 DROP TABLE t1;
460
461 #-- disable_query_log
462 #-- error 0,ER_UNKNOWN_SYSTEM_VARIABLE
463 #SET GLOBAL innodb_change_buffering_debug = 0;
464 #-- enable_query_log
465
466 # The following should fail in non-strict mode too.
467 # (The fix of Bug #50945 only affects REDUNDANT and COMPACT tables.)
468 SET SESSION innodb_strict_mode = off;
469 --replace_regex /> [0-9]*/> max_row_size/
470 CREATE TABLE t1(
471 c text NOT NULL, d text NOT NULL,
472 PRIMARY KEY (c(767),d(767)))
473 ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII;
474 DROP TABLE t1;
475 --replace_regex /> [0-9]*/> max_row_size/
476 CREATE TABLE t1(
477 c text NOT NULL, d text NOT NULL,
478 PRIMARY KEY (c(767),d(767)))
479 ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2 CHARSET=ASCII;
480 DROP TABLE t1;
481 CREATE TABLE t1(
482 c text NOT NULL, d text NOT NULL,
483 PRIMARY KEY (c(767),d(767)))
484 ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4 CHARSET=ASCII;
485 drop table t1;
486 --replace_regex /> [0-9]*/> max_row_size/
487 CREATE TABLE t1(c text, PRIMARY KEY (c(440)))
488 ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII;
489 DROP TABLE t1;
490 CREATE TABLE t1(c text, PRIMARY KEY (c(438)))
491 ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII;
492 INSERT INTO t1 VALUES(REPEAT('A',512)),(REPEAT('B',512));
493 DROP TABLE t1;