Debian Codegraph @

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

raw
1 # Tests for setting innodb-page-size=4k
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 6144 {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: 1979, Compact: 1982.
68 --echo # Compressed: 1982, Dynamic: 1982.
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; 1978 bytes with 10 CHAR fields
75 # Calculation :
76 # 6 (extra bytes)
77 # 2 * 13 = 26 (fields len) = 2 * n_fields (3 system fields + 10 user fields)
78 # 6 + 6 + 7 = 19 (ROW_ID, TRX_ID, ROLL_PTR)
79 # 200 * 9 = 1800 (each char(200) field)
80 # 127 = (char(127))
81 # T0tal = 1978
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(127)
88 ) charset latin1 ROW_FORMAT=redundant;
89 DROP TABLE t1;
90 # Redundant table; 1979 bytes with 10 CHAR fields
91 --replace_regex /> [0-9]*/> max_row_size/
92 --error ER_TOO_BIG_ROWSIZE
93 CREATE TABLE t1 (
94 c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
95 c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(128)
96 ) charset latin1 ROW_FORMAT=redundant;
97
98 # Compact table; 1981 bytes with 10 CHAR fields
99 # Calculation :
100 # 5 (extra bytes)
101 # 2 (null bitmap)
102 # 6 + 6 + 7 = 19 (ROW_ID, TRX_ID, ROLL_PTR)
103 # 200 * 9 = 1800 (each char(200) field)
104 # 155 = (char(155))
105 # Total = 1981
106 # NOTE : charset latin1 causes each char to have max 1 bytes. If we use default
107 # (utf8_mb4) then each char will need 4 bytes. So char(200) will need
108 # max 800 bytes.
109 CREATE TABLE t1 (
110 c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
111 c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(155)
112 ) charset latin1 ROW_FORMAT=compact;
113 DROP TABLE t1;
114 # Compact table; 1982 bytes with 10 CHAR fields
115 --replace_regex /> [0-9]*/> max_row_size/
116 --error ER_TOO_BIG_ROWSIZE
117 CREATE TABLE t1 (
118 c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
119 c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(156)
120 ) charset latin1 ROW_FORMAT=compact;
121
122 # Compressed table; 1878 bytes with 10 CHAR fields
123 # Bug#13391353 Limit is 1876 on 32-Linux only
124 CREATE TABLE t1 (
125 c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
126 c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(76)
127 ) ROW_FORMAT=compressed;
128 DROP TABLE t1;
129 --replace_regex /> [0-9]*/> max_row_size/
130 --error ER_TOO_BIG_ROWSIZE
131 CREATE TABLE t1 (
132 c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
133 c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(79)
134 ) charset latin1 ROW_FORMAT=compressed;
135
136 # Dynamic table; 1955 bytes with 10 CHAR fields
137 CREATE TABLE t1 (
138 c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
139 c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(155)
140 ) ROW_FORMAT=dynamic;
141 DROP TABLE t1;
142 --replace_regex /> [0-9]*/> max_row_size/
143 --error ER_TOO_BIG_ROWSIZE
144 CREATE TABLE t1 (
145 c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
146 c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(156)
147 ) charset latin1 ROW_FORMAT=dynamic;
148
149 #
150 # Test the maximum key length
151 # Moved from innodb-index.test since each page size has its own max key length.
152 # Max Key Length is 768 for 4k pages.
153 #
154 # InnoDB assumes 3 bytes for each UTF8 character.
155 #
156 CREATE TABLE t1 (a varchar(64) character set utf8,
157 b varchar(64) character set utf8,
158 c varchar(64) character set utf8,
159 d varchar(64) character set utf8,
160 PRIMARY KEY (a,b,c,d))
161 charset latin1
162 ENGINE=innodb;
163 DROP TABLE t1;
164 --error ER_TOO_LONG_KEY
165 CREATE TABLE t1 (a varchar(64) character set utf8,
166 b varchar(64) character set utf8,
167 c varchar(64) character set utf8,
168 d varchar(65) character set utf8,
169 PRIMARY KEY (a,b,c,d))
170 charset latin1
171 ENGINE=innodb;
172 CREATE TABLE t1 (a varchar(64) character set utf8,
173 b varchar(64) character set utf8,
174 c varchar(64) character set utf8,
175 d varchar(64) character set utf8,
176 e varchar(64) character set utf8,
177 PRIMARY KEY (a), KEY (b,c,d,e))
178 charset latin1
179 ENGINE=innodb;
180 DROP TABLE t1;
181 --error ER_TOO_LONG_KEY
182 CREATE TABLE t1 (a varchar(64) character set utf8,
183 b varchar(64) character set utf8,
184 c varchar(64) character set utf8,
185 d varchar(64) character set utf8,
186 e varchar(65) character set utf8,
187 PRIMARY KEY (a), KEY (b,c,d,e))
188 charset latin1
189 ENGINE=innodb;
190
191 --echo # Test 5) Make sure that KEY_BLOCK_SIZE=4, 2 & 1 are all
192 --echo # accepted and that KEY_BLOCK_SIZE=16 & 8 are rejected
193 --echo # in strict mode and converted to 4 in non-strict mode.
194
195 SET SESSION innodb_strict_mode = ON;
196
197 --error ER_ILLEGAL_HA
198 CREATE TABLE t1 (i int) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16;
199 SHOW WARNINGS;
200
201 --error ER_ILLEGAL_HA
202 CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8;
203 SHOW WARNINGS;
204
205 CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
206 SHOW WARNINGS;
207 SELECT table_name, row_format, create_options
208 FROM information_schema.tables WHERE table_name = 't1';
209
210 ALTER TABLE t1 KEY_BLOCK_SIZE=2;
211 SHOW WARNINGS;
212 SELECT table_name, row_format, create_options
213 FROM information_schema.tables WHERE table_name = 't1';
214
215 ALTER TABLE t1 KEY_BLOCK_SIZE=1;
216 SHOW WARNINGS;
217 SELECT table_name, row_format, create_options
218 FROM information_schema.tables WHERE table_name = 't1';
219
220 ALTER TABLE t1 KEY_BLOCK_SIZE=0;
221 SHOW WARNINGS;
222 SELECT table_name, row_format, create_options
223 FROM information_schema.tables WHERE table_name = 't1';
224 DROP TABLE t1;
225
226 SET SESSION innodb_strict_mode = OFF;
227
228 CREATE TABLE t1 (i int) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16;
229 SHOW WARNINGS;
230 SELECT table_name, row_format, create_options
231 FROM information_schema.tables WHERE table_name = 't1';
232 DROP TABLE t1;
233
234 CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8;
235 SHOW WARNINGS;
236 SELECT table_name, row_format, create_options
237 FROM information_schema.tables WHERE table_name = 't1';
238 DROP TABLE t1;
239
240 CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
241 SHOW WARNINGS;
242 SELECT table_name, row_format, create_options
243 FROM information_schema.tables WHERE table_name = 't1';
244
245 ALTER TABLE t1 KEY_BLOCK_SIZE=2;
246 SHOW WARNINGS;
247 SELECT table_name, row_format, create_options
248 FROM information_schema.tables WHERE table_name = 't1';
249
250 ALTER TABLE t1 KEY_BLOCK_SIZE=1;
251 SHOW WARNINGS;
252 SELECT table_name, row_format, create_options
253 FROM information_schema.tables WHERE table_name = 't1';
254
255 ALTER TABLE t1 KEY_BLOCK_SIZE=0;
256 SHOW WARNINGS;
257 SELECT table_name, row_format, create_options
258 FROM information_schema.tables WHERE table_name = 't1';
259 DROP TABLE t1;
260
261
262 --echo # Test 6) Make sure that KEY_BLOCK_SIZE = 8 and 16
263 --echo # are both rejected when innodb_file_per_table=OFF
264 # Moved from innodb-zip.test
265 SET SESSION innodb_strict_mode = ON;
266 SET GLOBAL innodb_file_per_table = OFF;
267 SHOW VARIABLES LIKE 'innodb_file_per_table';
268 --error ER_ILLEGAL_HA
269 CREATE TABLE t4 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=8;
270 SHOW WARNINGS;
271 --error ER_ILLEGAL_HA
272 CREATE TABLE t5 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=16;
273 SHOW WARNINGS;
274 SET GLOBAL innodb_file_per_table = ON;
275 --error ER_ILLEGAL_HA
276 CREATE TABLE t4 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=8;
277 SHOW WARNINGS;
278 --error ER_ILLEGAL_HA
279 CREATE TABLE t5 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=16;
280 SHOW WARNINGS;
281
282 --echo # Test 7) Not included here; 16k only
283
284
285 --echo # Test 8) Test creating a table that could lead to undo log overflow.
286 CREATE TABLE t1(a blob,b blob,c blob,d blob,e blob,f blob,g blob,
287 h blob,i blob,j blob,k blob,l blob,m blob,n blob,
288 o blob,p blob,q blob,r blob,s blob,t blob,u blob)
289 ENGINE=InnoDB ROW_FORMAT=dynamic;
290 SET @a = repeat('a', 767);
291 SET @b = repeat('b', 767);
292 SET @c = repeat('c', 767);
293 SET @d = repeat('d', 767);
294 SET @e = repeat('e', 767);
295
296 # With no indexes defined, we can update all columns to max key part length.
297 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);
298 UPDATE t1 SET a=@b,b=@b,c=@b,d=@b,e=@b,f=@b,g=@b,h=@b,i=@b,j=@b,
299 k=@b,l=@b,m=@b,n=@b,o=@b,p=@b,q=@b,r=@b,s=@b,t=@b,u=@b;
300
301 # With one index defined, we can still update all fields.
302 CREATE INDEX t1a ON t1 (a(767));
303 UPDATE t1 SET a=@c,b=@c,c=@c,d=@c,e=@c,f=@c,g=@c,h=@c,i=@c,j=@c,
304 k=@c,l=@c,m=@c,n=@c,o=@c,p=@c,q=@c,r=@c,s=@c,t=@c,u=@c;
305
306 # Add one more index and the UNDO record becomes too big to update all columns.
307 # But a single transaction can update the columns in separate statements.
308 # because the UNDO records will be smaller.
309 CREATE INDEX t1b ON t1 (b(767));
310 --error ER_UNDO_RECORD_TOO_BIG
311 UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d,f=@d,g=@d,h=@d,i=@d,j=@d,
312 k=@d,l=@d,m=@d,n=@d,o=@d,p=@d,q=@d,r=@d,s=@d,t=@d,u=@d;
313 BEGIN;
314 UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d;
315 UPDATE t1 SET f=@d,g=@d,h=@d,i=@d,j=@d,k=@d,l=@d,m=@d,
316 n=@d,o=@d,p=@d,q=@d,r=@d,s=@d,t=@d,u=@d;
317 COMMIT;
318
319 # Another index can still be added and a single field can still be updated
320 CREATE INDEX t1c ON t1 (c(767));
321 UPDATE t1 SET c=@e;
322
323 # Add one more index and we cannot update a column to its defined index length.
324 # This is a problem. It means that the DDL is allowed to create a table
325 # that CANNOT be updated. See bug#12953735.
326 CREATE INDEX t1d ON t1 (d(767));
327 # NOTE: bug#12953735 seems to become a little more rare case by fixing bug#29536710
328 # Reproducing doesn't seem to be so needed. And just comment out for now.
329 #--error ER_UNDO_RECORD_TOO_BIG
330 #UPDATE t1 SET d=@e;
331
332 --replace_regex /> [0-9]*/> max_row_size/
333 CREATE INDEX t1e ON t1 (e(767));
334
335 SHOW CREATE TABLE t1;
336 DROP TABLE t1;
337
338 #
339 # Bug #13336585 - INNODB: CHANGE BUFFERING WITH 4K PAGES CAN ASSERT
340 # IF SECONDARY KEY IS NEAR MAX
341 # If the secondary index tuple is close to half the page size,
342 # ibuf_insert_low() could return DB_TOO_BIG_RECORD, which is not expected
343 # in ibuf_insert(). In order to insure this does not happen, WL5756
344 # imposes a maximum key length of 768 for 4k pages and 1536 for 8k pages.
345 # The existing max key Size for 16k pages is 3072.
346 #
347
348 #-- disable_query_log
349 # The flag innodb_change_buffering_debug is only available in debug builds.
350 # It instructs InnoDB to try to evict pages from the buffer pool when
351 # change buffering is possible, so that the change buffer will be used
352 # whenever possible.
353 # This flag is not used currently since it exposes valgrind error in ibuf
354 # code with the following SQL
355 #-- error 0,ER_UNKNOWN_SYSTEM_VARIABLE
356 #SET @innodb_change_buffering_debug_orig = @@innodb_change_buffering_debug;
357 #-- error 0,ER_UNKNOWN_SYSTEM_VARIABLE
358 #SET GLOBAL innodb_change_buffering_debug = 1;
359 #-- enable_query_log
360
361 # make sure the largest possible key entry can be added to the insert buffer.
362 # Make enough records so that the root page is not a leaf page.
363 SET SESSION innodb_strict_mode = OFF;
364 --replace_regex /> [0-9]*/> max_row_size/
365 CREATE TABLE t1(
366 pk01 varchar(48), pk02 varchar(48), pk03 varchar(48), pk04 varchar(48),
367 pk05 varchar(48), pk06 varchar(48), pk07 varchar(48), pk08 varchar(48),
368 pk09 varchar(48), pk10 varchar(48), pk11 varchar(48), pk12 varchar(48),
369 pk13 varchar(48), pk14 varchar(48), pk15 varchar(48), pk16 varchar(48),
370 sk01 varchar(48), sk02 varchar(48), sk03 varchar(48), sk04 varchar(48),
371 sk05 varchar(48), sk06 varchar(48), sk07 varchar(48), sk08 varchar(48),
372 sk09 varchar(48), sk10 varchar(48), sk11 varchar(48), sk12 varchar(48),
373 sk13 varchar(48), sk14 varchar(48), sk15 varchar(48), sk16 varchar(48),
374 PRIMARY KEY pk(pk01,pk02,pk03,pk04,pk05,pk06,pk07,pk08,
375 pk09,pk10,pk11,pk12,pk13,pk14,pk15,pk16),
376 KEY pk(sk01,sk02,sk03,sk04,sk05,sk06,sk07,sk08,
377 sk09,sk10,sk11,sk12,sk13,sk14,sk15,sk16))
378 charset latin1
379 ROW_FORMAT=Redundant ENGINE=InnoDB;
380 SET @r = repeat('a', 48);
381 INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
382 @r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
383 SET @r = repeat('b', 48);
384 INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
385 @r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
386 SET @r = repeat('c', 48);
387 INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
388 @r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
389 SET @r = repeat('d', 48);
390 INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
391 @r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
392 SET @r = repeat('e', 48);
393 INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
394 @r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
395 DELETE from t1;
396 DROP TABLE t1;
397
398 # Compressed tables do not compress parent pages. So the whole uncompressed
399 # secondary tuple including the primary key must be able to fit in half the
400 # compressed page size. This record length is enforced at index creation.
401 # So the only way to get an ibuf tuple too big is to make the KEY_BLOCK_SIZE
402 # the same as the page size.
403 CREATE TABLE t1(
404 pk01 varchar(48), pk02 varchar(48), pk03 varchar(48), pk04 varchar(48),
405 pk05 varchar(48), pk06 varchar(48), pk07 varchar(48), pk08 varchar(48),
406 pk09 varchar(48), pk10 varchar(48), pk11 varchar(48), pk12 varchar(48),
407 pk13 varchar(48), pk14 varchar(48), pk15 varchar(48), pk16 varchar(48),
408 sk01 varchar(48), sk02 varchar(48), sk03 varchar(48), sk04 varchar(48),
409 sk05 varchar(48), sk06 varchar(48), sk07 varchar(48), sk08 varchar(48),
410 sk09 varchar(48), sk10 varchar(48), sk11 varchar(48), sk12 varchar(48),
411 sk13 varchar(48), sk14 varchar(48), sk15 varchar(48), sk16 varchar(48),
412 PRIMARY KEY pk(pk01,pk02,pk03,pk04,pk05,pk06,pk07,pk08,
413 pk09,pk10,pk11,pk12,pk13,pk14,pk15,pk16),
414 KEY pk(sk01,sk02,sk03,sk04,sk05,sk06,sk07,sk08,
415 sk09,sk10,sk11,sk12,sk13,sk14,sk15,sk16))
416 charset latin1
417 ROW_FORMAT=Compressed KEY_BLOCK_SIZE=4 ENGINE=InnoDB;
418 SET @r = repeat('a', 48);
419 INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
420 @r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
421 SET @r = repeat('b', 48);
422 INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
423 @r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
424 SET @r = repeat('c', 48);
425 INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
426 @r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
427 SET @r = repeat('d', 48);
428 INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
429 @r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
430 SET @r = repeat('e', 48);
431 INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
432 @r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
433 DELETE from t1;
434 DROP TABLE t1;
435
436 #-- disable_query_log
437 #-- error 0,ER_UNKNOWN_SYSTEM_VARIABLE
438 #SET GLOBAL innodb_change_buffering_debug = 0;
439 #-- enable_query_log
440
441 # The following should fail in non-strict mode too.
442 # (The fix of Bug #50945 only affects REDUNDANT and COMPACT tables.)
443 SET SESSION innodb_strict_mode = off;
444 --replace_regex /> [0-9]*/> max_row_size/
445 CREATE TABLE t1(
446 c text NOT NULL, d text NOT NULL,
447 PRIMARY KEY (c(767)))
448 ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII;
449 DROP TABLE t1;
450 CREATE TABLE t1(
451 c text NOT NULL, d text NOT NULL,
452 PRIMARY KEY (c(767)))
453 ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2 CHARSET=ASCII;
454 drop table t1;
455 CREATE TABLE t1(
456 c text NOT NULL, d text NOT NULL,
457 PRIMARY KEY (c(767)))
458 ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4 CHARSET=ASCII;
459 drop table t1;
460 --replace_regex /> [0-9]*/> max_row_size/
461 CREATE TABLE t1(c text, PRIMARY KEY (c(440)))
462 ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII;
463 DROP TABLE t1;
464 CREATE TABLE t1(c text, PRIMARY KEY (c(438)))
465 ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII;
466 INSERT INTO t1 VALUES(REPEAT('A',512)),(REPEAT('B',512));
467 DROP TABLE t1;
468
469 --echo #
470 --echo # Bug #29283055: CLASS.CC:2604: VOID THD::SEND_STATEMENT_STATUS(): ASSERTION `0' FAILED.
471 --echo #
472
473 USE mysql;
474 RENAME TABLE mysql.slave_master_info to mysql.slave_master_info_28490361;
475
476 # Should fail because its not an InnoDB Table
477 --error ER_UNSUPPORTED_ENGINE
478 CREATE TABLE mysql.slave_master_info(Number_of_lines int(10)unsigned COMMENT 'Number of lines in the file.',Master_log_name text COLLATE utf8_bin COMMENT 'The name of the master binary log currently being read from the master.',Master_log_pos INT(20) unsigned COMMENT 'The master log position of the last read event.',Host char(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT''COMMENT 'The host name of the master.',User_name text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The user name used to connect to the master.',User_password text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The password used to connect to the master.',Port int(10) unsigned COMMENT 'The network port used to connect to the master.',Connect_retry int(10) unsigned COMMENT 'The period (in seconds) that the slave will wait before trying to reconnect to the master.',Enabled_ssl INT(1) COMMENT 'Indicates whether the server supports SSL connections.',Ssl_ca text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The file used for the Certificate Authority (CA) certificate.',Ssl_capath text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The path to the Certificate Authority (CA) certificates.',Ssl_cert text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The name of the SSL certificate file.',Ssl_cipher text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The name of the cipher in use for the SSL connection.',Sslk text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The name of the SSL key file.',Ssl_verify_server_cert INT(1) COMMENT 'Whether to verify the server certificate.',Heartbeat float,Bind text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'Displays which interface is employed when connecting to the MySQL server',Ignored_server_ids text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The number of server IDs to be ignored,followed by the actual server IDs',Uuid text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The master server uuid.',Retry_count INT(20) unsigned COMMENT 'Number of reconnect attempts,to the master,before giving up.',Ssl_crl text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The file used for the Certificate Revocation List (CRL)',Ssl_crlpath text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The path used for Certificate Revocation List (CRL) files',Enabled_auto_position INT(1) COMMENT 'Indicates whether GTIDs will be used to retrieve events from the master.',PRIMARY KEY (Host,Port)) DEFAULT CHARSET=utf8 STATS_PERSISTENT=0 COMMENT='Master Information' ENGINE=ARCHIVE;
479
480 # Should fail because its a temporary table
481 --error ER_TOO_LONG_KEY
482 create temporary table mysql.slave_master_info (a varchar(334) character set utf32 primary key) ROW_FORMAT=COMPACT ENGINE=INNODB;
483
484 # Should pass
485 create table mysql.slave_master_info (a varchar(334) character set utf32 primary key) ROW_FORMAT=COMPACT ENGINE=INNODB;
486
487 --echo # Cleanup
488 DROP TABLE mysql.slave_master_info;
489 RENAME TABLE mysql.slave_master_info_28490361 to mysql.slave_master_info;
490