Skip to content

Commit cf574cf

Browse files
committed
MDEV-27634 innodb_zip tests failing on s390x
Some GNU/Linux distributions ship a zlib that is modified to use the s390x DFLTCC instruction. That modification would essentially redefine compressBound(sourceLen) as (sourceLen * 16 + 2308) / 8 + 6. Let us relax the tests for InnoDB ROW_FORMAT=COMPRESSED to cope with such a weaker compression guarantee. create_table_info_t::row_size_is_acceptable(): Remove a bogus debug-only assertion that would fail to hold for the test innodb_zip.bug36169. The function page_zip_empty_size() may indeed return 0.
1 parent cdf19cd commit cf574cf

20 files changed

+383
-652
lines changed

mysql-test/suite/innodb/r/innodb-16k.result

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,14 @@ WHERE LOWER(variable_name) = 'innodb_page_size';
88
variable_value
99
16384
1010
# Test 4) The maximum row size is dependent upon the page size.
11-
# Redundant: 8123, Compact: 8126.
12-
# Compressed: 8126, Dynamic: 8126.
11+
# Redundant: 8123, Compact: 8126, Dynamic: 8126.
1312
# Each row format has its own amount of overhead that
1413
# varies depending on number of fields and other overhead.
1514
SET SESSION innodb_strict_mode = ON;
15+
SET @save_frequency=@@GLOBAL.innodb_purge_rseg_truncate_frequency;
16+
SET @save_level=@@GLOBAL.innodb_compression_level;
17+
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
18+
SET GLOBAL innodb_compression_level=1;
1619
CREATE TABLE t1 (
1720
c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
1821
c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
@@ -21,7 +24,7 @@ c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(200),
2124
c21 char(200), c22 char(200), c23 char(200), c24 char(200), c25 char(200),
2225
c26 char(200), c27 char(200), c28 char(200), c29 char(200), c30 char(200),
2326
c31 char(200), c32 char(200), c33 char(200), c34 char(200), c35 char(200),
24-
c36 char(200), c37 char(200), c38 char(200), c39 char(200), c40 char(157)
27+
c36 char(200), c37 char(200), c38 char(196)
2528
) ROW_FORMAT=compressed;
2629
DROP TABLE t1;
2730
CREATE TABLE t1 (
@@ -498,10 +501,13 @@ drop table t1;
498501
CREATE TABLE t1(c text, PRIMARY KEY (c(440)))
499502
ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII;
500503
ERROR 42000: Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
501-
CREATE TABLE t1(c text, PRIMARY KEY (c(438)))
504+
CREATE TABLE t1(c text, PRIMARY KEY (c(292)))
502505
ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII;
503506
INSERT INTO t1 VALUES(REPEAT('A',512)),(REPEAT('B',512));
504507
DROP TABLE t1;
508+
InnoDB 0 transactions not purged
509+
SET GLOBAL innodb_purge_rseg_truncate_frequency = @save_frequency;
510+
SET GLOBAL innodb_compression_level=@save_level;
505511
DROP TABLE t1_purge, t2_purge, t3_purge, t4_purge;
506512
DROP TABLE tlong;
507513
DROP TABLE tlong2;

mysql-test/suite/innodb/t/innodb-16k.test

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,17 @@ SELECT variable_value FROM information_schema.global_status
1818
WHERE LOWER(variable_name) = 'innodb_page_size';
1919

2020
--echo # Test 4) The maximum row size is dependent upon the page size.
21-
--echo # Redundant: 8123, Compact: 8126.
22-
--echo # Compressed: 8126, Dynamic: 8126.
21+
--echo # Redundant: 8123, Compact: 8126, Dynamic: 8126.
2322
--echo # Each row format has its own amount of overhead that
2423
--echo # varies depending on number of fields and other overhead.
2524

2625
SET SESSION innodb_strict_mode = ON;
26+
SET @save_frequency=@@GLOBAL.innodb_purge_rseg_truncate_frequency;
27+
SET @save_level=@@GLOBAL.innodb_compression_level;
28+
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
29+
SET GLOBAL innodb_compression_level=1;
2730

28-
29-
# Compressed table; 7959 bytes with 40 CHAR fields
31+
# Compressed table: compressBound() for the s390x DFLTCC instruction
3032
CREATE TABLE t1 (
3133
c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
3234
c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
@@ -35,7 +37,7 @@ c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(200),
3537
c21 char(200), c22 char(200), c23 char(200), c24 char(200), c25 char(200),
3638
c26 char(200), c27 char(200), c28 char(200), c29 char(200), c30 char(200),
3739
c31 char(200), c32 char(200), c33 char(200), c34 char(200), c35 char(200),
38-
c36 char(200), c37 char(200), c38 char(200), c39 char(200), c40 char(157)
40+
c36 char(200), c37 char(200), c38 char(196)
3941
) ROW_FORMAT=compressed;
4042

4143
DROP TABLE t1;
@@ -451,17 +453,17 @@ drop table t1;
451453
CREATE TABLE t1(c text, PRIMARY KEY (c(440)))
452454
ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII;
453455

454-
CREATE TABLE t1(c text, PRIMARY KEY (c(438)))
456+
CREATE TABLE t1(c text, PRIMARY KEY (c(292)))
455457
ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII;
456458

457459
INSERT INTO t1 VALUES(REPEAT('A',512)),(REPEAT('B',512));
458460

459461
DROP TABLE t1;
460462

461-
# The tests that uses these tables required the purge thread to run.
462-
# Just in case it has not by now, provide a 10 second wait.
463+
--source include/wait_all_purged.inc
463464

464-
--sleep 10
465+
SET GLOBAL innodb_purge_rseg_truncate_frequency = @save_frequency;
466+
SET GLOBAL innodb_compression_level=@save_level;
465467

466468
DROP TABLE t1_purge, t2_purge, t3_purge, t4_purge;
467469
DROP TABLE tlong;

mysql-test/suite/innodb_zip/include/innodb_create_tab_indx.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
eval CREATE TABLE tab5(col_1 TINYBLOB, col_2 TINYTEXT,col_3 BLOB,
44
col_4 TEXT,col_5 MEDIUMBLOB,col_6 MEDIUMTEXT,
5-
col_7 LONGBLOB,col_8 LONGTEXT,col_9 VARCHAR(255))
5+
col_7 LONGBLOB,col_8 LONGTEXT,col_9 VARCHAR(67))
66
ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=$block_size;
77

88

mysql-test/suite/innodb_zip/include/innodb_load_data.inc

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
--echo # Load the data
22

3-
SET @col_1 = repeat('a', 100);
4-
SET @col_2 = repeat('b', 100);
5-
SET @col_3 = repeat('c', 100);
6-
SET @col_4 = repeat('d', 100);
7-
SET @col_5 = repeat('e', 100);
8-
SET @col_6 = repeat('f', 100);
9-
SET @col_7 = repeat('g', 100);
10-
SET @col_8 = repeat('h', 100);
11-
SET @col_9 = repeat('i', 100);
3+
SET @col_1 = repeat('a', 67);
4+
SET @col_2 = repeat('b', 67);
5+
SET @col_3 = repeat('c', 67);
6+
SET @col_4 = repeat('d', 67);
7+
SET @col_5 = repeat('e', 67);
8+
SET @col_6 = repeat('f', 67);
9+
SET @col_7 = repeat('g', 67);
10+
SET @col_8 = repeat('h', 67);
11+
SET @col_9 = repeat('i', 67);
1212

1313
while ($i) {
1414

mysql-test/suite/innodb_zip/r/bug36172.result

Lines changed: 0 additions & 4 deletions
This file was deleted.

mysql-test/suite/innodb_zip/r/bug52745.result

Lines changed: 2 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
SET GLOBAL innodb_file_per_table=on;
2-
SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
31
CREATE TABLE bug52745 (
42
a2 int(10) unsigned DEFAULT NULL,
53
col37 time DEFAULT NULL,
@@ -37,29 +35,8 @@ col68 tinyblob,
3735
col69 date DEFAULT NULL,
3836
col70 tinyint(3) unsigned zerofill DEFAULT NULL,
3937
col71 varchar(44) CHARACTER SET utf8 DEFAULT NULL,
40-
col72 datetime DEFAULT NULL,
41-
col73 smallint(5) unsigned zerofill DEFAULT NULL,
42-
col74 longblob,
43-
col75 bit(34) DEFAULT NULL,
44-
col76 float unsigned zerofill DEFAULT NULL,
45-
col77 year(4) DEFAULT NULL,
46-
col78 tinyint(3) unsigned DEFAULT NULL,
47-
col79 set('msfheowh','tbpxbgf','by','wahnrjw','myqfasxz','rsokyumrt') CHARACTER SET latin2 DEFAULT NULL,
48-
col80 datetime DEFAULT NULL,
49-
col81 smallint(6) DEFAULT NULL,
50-
col82 enum('xtaurnqfqz','rifrse','kuzwpbvb','niisabk','zxavro','rbvasv','','uulrfaove','','') DEFAULT NULL,
51-
col83 bigint(20) unsigned zerofill DEFAULT NULL,
52-
col84 float unsigned zerofill DEFAULT NULL,
53-
col85 double DEFAULT NULL,
54-
col86 enum('ylannv','','vlkhycqc','snke','cxifustp','xiaxaswzp','oxl') CHARACTER SET latin1 COLLATE latin1_german2_ci DEFAULT NULL,
55-
col87 varbinary(221) DEFAULT NULL,
56-
col88 double unsigned DEFAULT NULL,
57-
col89 float unsigned zerofill DEFAULT NULL,
58-
col90 tinyblob
38+
col72 datetime DEFAULT NULL
5939
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
60-
Warnings:
61-
Note 1291 Column 'col82' has duplicated value '' in ENUM
62-
Note 1291 Column 'col82' has duplicated value '' in ENUM
6340
SET sql_mode = default;
6441
INSERT IGNORE INTO bug52745 SET
6542
col40='0000-00-00 00:00:00',
@@ -81,21 +58,7 @@ col66='19600719080256',
8158
col68=repeat('Sagittarius\'',54),
8259
col69='38943902',
8360
col70=1232,
84-
col71='Elora\'',
85-
col74=repeat('zipp',11),
86-
col75='0',
87-
col76=23254,
88-
col78=13247,
89-
col79='56219',
90-
col80='20500609035724',
91-
col81=11632,
92-
col82=7,
93-
col84=-23863,
94-
col85=6341,
95-
col87='HZdkf.4 s7t,5Rmq 8so fmr,ruGLUG25TrtI.yQ 2SuHq0ML7rw7.4 b2yf2E5TJxOtBBZImezDnzpj,uPYfznnEUDN1e9aQoO 2DsplB7TFWy oQJ br HLF :F,eQ p4i1oWsr lL3PG,hjCz6hYqN h1QTjLCjrv:QCdSzpYBibJAtZCxLOk3l6Blsh.W',
96-
col88=16894,
97-
col89=6161,
98-
col90=repeat('gale',48);
61+
col71='Elora\'';
9962
Warnings:
10063
Warning 1265 Data truncated for column 'col53' at row 1
10164
Warning 1264 Out of range value for column 'col54' at row 1
@@ -107,9 +70,6 @@ Warning 1264 Out of range value for column 'col66' at row 1
10770
Warning 1265 Data truncated for column 'col68' at row 1
10871
Warning 1265 Data truncated for column 'col69' at row 1
10972
Warning 1264 Out of range value for column 'col70' at row 1
110-
Warning 1264 Out of range value for column 'col78' at row 1
111-
Warning 1265 Data truncated for column 'col79' at row 1
112-
Warning 1264 Out of range value for column 'col84' at row 1
11373
SHOW WARNINGS;
11474
Level Code Message
11575
Warning 1265 Data truncated for column 'col53' at row 1
@@ -122,8 +82,4 @@ Warning 1264 Out of range value for column 'col66' at row 1
12282
Warning 1265 Data truncated for column 'col68' at row 1
12383
Warning 1265 Data truncated for column 'col69' at row 1
12484
Warning 1264 Out of range value for column 'col70' at row 1
125-
Warning 1264 Out of range value for column 'col78' at row 1
126-
Warning 1265 Data truncated for column 'col79' at row 1
127-
Warning 1264 Out of range value for column 'col84' at row 1
12885
DROP TABLE bug52745;
129-
SET GLOBAL innodb_file_per_table=1;

mysql-test/suite/innodb_zip/r/index_large_prefix.result

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -117,15 +117,15 @@ ERROR 42000: Row size too large. The maximum row size for the used table type, n
117117
show warnings;
118118
Level Code Message
119119
Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
120-
create index idx4 on worklog5743_1(a2(434));
120+
create index idx4 on worklog5743_1(a2(290));
121121
show warnings;
122122
Level Code Message
123123
create index idx5 on worklog5743_1(a1, a2(430));
124124
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
125125
show warnings;
126126
Level Code Message
127127
Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
128-
create index idx6 on worklog5743_1(a1, a2(428));
128+
create index idx6 on worklog5743_1(a1, a2(283));
129129
show warnings;
130130
Level Code Message
131131
set global innodb_large_prefix=0;
@@ -152,15 +152,15 @@ ERROR 42000: Row size too large. The maximum row size for the used table type, n
152152
show warnings;
153153
Level Code Message
154154
Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
155-
create index idx4 on worklog5743_2(a2(946));
155+
create index idx4 on worklog5743_2(a2(802));
156156
show warnings;
157157
Level Code Message
158158
create index idx5 on worklog5743_2(a1, a2(942));
159159
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
160160
show warnings;
161161
Level Code Message
162162
Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
163-
create index idx6 on worklog5743_2(a1, a2(940));
163+
create index idx6 on worklog5743_2(a1, a2(795));
164164
show warnings;
165165
Level Code Message
166166
set global innodb_large_prefix=0;
@@ -186,15 +186,15 @@ ERROR 42000: Row size too large. The maximum row size for the used table type, n
186186
show warnings;
187187
Level Code Message
188188
Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
189-
create index idx4 on worklog5743_4(a2(1970));
189+
create index idx4 on worklog5743_4(a2(1826));
190190
show warnings;
191191
Level Code Message
192192
create index idx5 on worklog5743_4(a1, a2(1966));
193193
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
194194
show warnings;
195195
Level Code Message
196196
Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
197-
create index idx6 on worklog5743_4(a1, a2(1964));
197+
create index idx6 on worklog5743_4(a1, a2(1819));
198198
show warnings;
199199
Level Code Message
200200
set global innodb_large_prefix=0;

mysql-test/suite/innodb_zip/r/page_size,4k.rdiff

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
--- page_size.result
2-
+++ page_size,4k.result
31
@@ -3,7 +3,7 @@
42
SELECT variable_value FROM information_schema.global_status
53
WHERE LOWER(variable_name) = 'innodb_page_size';
@@ -85,8 +83,8 @@
8583
-c21 char(200), c22 char(200), c23 char(200), c24 char(200), c25 char(200),
8684
-c26 char(200), c27 char(200), c28 char(200), c29 char(200), c30 char(200),
8785
-c31 char(200), c32 char(200), c33 char(200), c34 char(200), c35 char(200),
88-
-c36 char(200), c37 char(200), c38 char(200), c39 char(200), c40 char(157)
89-
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(76)
86+
-c36 char(200), c37 char(200), c38 char(196)
87+
+c06 char(200), c07 char(200), c08 char(176)
9088
) ROW_FORMAT=compressed;
9189
DROP TABLE t1;
9290
CREATE TABLE t1 (
@@ -483,5 +481,5 @@
483481
-Warning 139 Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
484482
+Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
485483
DROP TABLE t1;
486-
CREATE TABLE t1(c text, PRIMARY KEY (c(438)))
484+
CREATE TABLE t1(c text, PRIMARY KEY (c(293)))
487485
ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII;

mysql-test/suite/innodb_zip/r/page_size,8k.rdiff

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
--- page_size.result
2-
+++ page_size,8k.result
31
@@ -3,7 +3,7 @@
42
SELECT variable_value FROM information_schema.global_status
53
WHERE LOWER(variable_name) = 'innodb_page_size';
@@ -83,8 +81,8 @@
8381
-c21 char(200), c22 char(200), c23 char(200), c24 char(200), c25 char(200),
8482
-c26 char(200), c27 char(200), c28 char(200), c29 char(200), c30 char(200),
8583
-c31 char(200), c32 char(200), c33 char(200), c34 char(200), c35 char(200),
86-
-c36 char(200), c37 char(200), c38 char(200), c39 char(200), c40 char(157)
87-
+c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(103)
84+
-c36 char(200), c37 char(200), c38 char(196)
85+
+c16 char(200), c17 char(200), c18 char(182)
8886
) ROW_FORMAT=compressed;
8987
DROP TABLE t1;
9088
CREATE TABLE t1 (
@@ -421,5 +419,5 @@
421419
-Warning 139 Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
422420
+Warning 139 Row size too large (> 4030). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
423421
DROP TABLE t1;
424-
CREATE TABLE t1(c text, PRIMARY KEY (c(438)))
422+
CREATE TABLE t1(c text, PRIMARY KEY (c(293)))
425423
ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII;

mysql-test/suite/innodb_zip/r/page_size.result

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(200),
9797
c21 char(200), c22 char(200), c23 char(200), c24 char(200), c25 char(200),
9898
c26 char(200), c27 char(200), c28 char(200), c29 char(200), c30 char(200),
9999
c31 char(200), c32 char(200), c33 char(200), c34 char(200), c35 char(200),
100-
c36 char(200), c37 char(200), c38 char(200), c39 char(200), c40 char(157)
100+
c36 char(200), c37 char(200), c38 char(196)
101101
) ROW_FORMAT=compressed;
102102
DROP TABLE t1;
103103
CREATE TABLE t1 (
@@ -603,7 +603,7 @@ ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII;
603603
Warnings:
604604
Warning 139 Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
605605
DROP TABLE t1;
606-
CREATE TABLE t1(c text, PRIMARY KEY (c(438)))
606+
CREATE TABLE t1(c text, PRIMARY KEY (c(293)))
607607
ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII;
608608
INSERT INTO t1 VALUES(REPEAT('A',512)),(REPEAT('B',512));
609609
DROP TABLE t1;

0 commit comments

Comments
 (0)