Commit cf574cf5 authored by Marko Mäkelä's avatar Marko Mäkelä

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.
parent cdf19cd6
......@@ -8,11 +8,14 @@ WHERE LOWER(variable_name) = 'innodb_page_size';
variable_value
16384
# Test 4) The maximum row size is dependent upon the page size.
# Redundant: 8123, Compact: 8126.
# Compressed: 8126, Dynamic: 8126.
# Redundant: 8123, Compact: 8126, Dynamic: 8126.
# Each row format has its own amount of overhead that
# varies depending on number of fields and other overhead.
SET SESSION innodb_strict_mode = ON;
SET @save_frequency=@@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET @save_level=@@GLOBAL.innodb_compression_level;
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
SET GLOBAL innodb_compression_level=1;
CREATE TABLE t1 (
c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
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),
c21 char(200), c22 char(200), c23 char(200), c24 char(200), c25 char(200),
c26 char(200), c27 char(200), c28 char(200), c29 char(200), c30 char(200),
c31 char(200), c32 char(200), c33 char(200), c34 char(200), c35 char(200),
c36 char(200), c37 char(200), c38 char(200), c39 char(200), c40 char(157)
c36 char(200), c37 char(200), c38 char(196)
) ROW_FORMAT=compressed;
DROP TABLE t1;
CREATE TABLE t1 (
......@@ -498,10 +501,13 @@ drop table t1;
CREATE TABLE t1(c text, PRIMARY KEY (c(440)))
ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII;
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.
CREATE TABLE t1(c text, PRIMARY KEY (c(438)))
CREATE TABLE t1(c text, PRIMARY KEY (c(292)))
ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII;
INSERT INTO t1 VALUES(REPEAT('A',512)),(REPEAT('B',512));
DROP TABLE t1;
InnoDB 0 transactions not purged
SET GLOBAL innodb_purge_rseg_truncate_frequency = @save_frequency;
SET GLOBAL innodb_compression_level=@save_level;
DROP TABLE t1_purge, t2_purge, t3_purge, t4_purge;
DROP TABLE tlong;
DROP TABLE tlong2;
......
......@@ -18,15 +18,17 @@ SELECT variable_value FROM information_schema.global_status
WHERE LOWER(variable_name) = 'innodb_page_size';
--echo # Test 4) The maximum row size is dependent upon the page size.
--echo # Redundant: 8123, Compact: 8126.
--echo # Compressed: 8126, Dynamic: 8126.
--echo # Redundant: 8123, Compact: 8126, Dynamic: 8126.
--echo # Each row format has its own amount of overhead that
--echo # varies depending on number of fields and other overhead.
SET SESSION innodb_strict_mode = ON;
SET @save_frequency=@@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET @save_level=@@GLOBAL.innodb_compression_level;
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
SET GLOBAL innodb_compression_level=1;
# Compressed table; 7959 bytes with 40 CHAR fields
# Compressed table: compressBound() for the s390x DFLTCC instruction
CREATE TABLE t1 (
c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
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),
c21 char(200), c22 char(200), c23 char(200), c24 char(200), c25 char(200),
c26 char(200), c27 char(200), c28 char(200), c29 char(200), c30 char(200),
c31 char(200), c32 char(200), c33 char(200), c34 char(200), c35 char(200),
c36 char(200), c37 char(200), c38 char(200), c39 char(200), c40 char(157)
c36 char(200), c37 char(200), c38 char(196)
) ROW_FORMAT=compressed;
DROP TABLE t1;
......@@ -451,17 +453,17 @@ drop table t1;
CREATE TABLE t1(c text, PRIMARY KEY (c(440)))
ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII;
CREATE TABLE t1(c text, PRIMARY KEY (c(438)))
CREATE TABLE t1(c text, PRIMARY KEY (c(292)))
ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII;
INSERT INTO t1 VALUES(REPEAT('A',512)),(REPEAT('B',512));
DROP TABLE t1;
# The tests that uses these tables required the purge thread to run.
# Just in case it has not by now, provide a 10 second wait.
--source include/wait_all_purged.inc
--sleep 10
SET GLOBAL innodb_purge_rseg_truncate_frequency = @save_frequency;
SET GLOBAL innodb_compression_level=@save_level;
DROP TABLE t1_purge, t2_purge, t3_purge, t4_purge;
DROP TABLE tlong;
......
......@@ -2,7 +2,7 @@
eval CREATE TABLE tab5(col_1 TINYBLOB, col_2 TINYTEXT,col_3 BLOB,
col_4 TEXT,col_5 MEDIUMBLOB,col_6 MEDIUMTEXT,
col_7 LONGBLOB,col_8 LONGTEXT,col_9 VARCHAR(255))
col_7 LONGBLOB,col_8 LONGTEXT,col_9 VARCHAR(67))
ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=$block_size;
......
--echo # Load the data
SET @col_1 = repeat('a', 100);
SET @col_2 = repeat('b', 100);
SET @col_3 = repeat('c', 100);
SET @col_4 = repeat('d', 100);
SET @col_5 = repeat('e', 100);
SET @col_6 = repeat('f', 100);
SET @col_7 = repeat('g', 100);
SET @col_8 = repeat('h', 100);
SET @col_9 = repeat('i', 100);
SET @col_1 = repeat('a', 67);
SET @col_2 = repeat('b', 67);
SET @col_3 = repeat('c', 67);
SET @col_4 = repeat('d', 67);
SET @col_5 = repeat('e', 67);
SET @col_6 = repeat('f', 67);
SET @col_7 = repeat('g', 67);
SET @col_8 = repeat('h', 67);
SET @col_9 = repeat('i', 67);
while ($i) {
......
set @file_per_table=@@global.innodb_file_per_table;
SET GLOBAL innodb_file_per_table=on;
SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
SET GLOBAL innodb_file_per_table=@file_per_table;
SET GLOBAL innodb_file_per_table=on;
SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE bug52745 (
a2 int(10) unsigned DEFAULT NULL,
col37 time DEFAULT NULL,
......@@ -37,29 +35,8 @@ col68 tinyblob,
col69 date DEFAULT NULL,
col70 tinyint(3) unsigned zerofill DEFAULT NULL,
col71 varchar(44) CHARACTER SET utf8 DEFAULT NULL,
col72 datetime DEFAULT NULL,
col73 smallint(5) unsigned zerofill DEFAULT NULL,
col74 longblob,
col75 bit(34) DEFAULT NULL,
col76 float unsigned zerofill DEFAULT NULL,
col77 year(4) DEFAULT NULL,
col78 tinyint(3) unsigned DEFAULT NULL,
col79 set('msfheowh','tbpxbgf','by','wahnrjw','myqfasxz','rsokyumrt') CHARACTER SET latin2 DEFAULT NULL,
col80 datetime DEFAULT NULL,
col81 smallint(6) DEFAULT NULL,
col82 enum('xtaurnqfqz','rifrse','kuzwpbvb','niisabk','zxavro','rbvasv','','uulrfaove','','') DEFAULT NULL,
col83 bigint(20) unsigned zerofill DEFAULT NULL,
col84 float unsigned zerofill DEFAULT NULL,
col85 double DEFAULT NULL,
col86 enum('ylannv','','vlkhycqc','snke','cxifustp','xiaxaswzp','oxl') CHARACTER SET latin1 COLLATE latin1_german2_ci DEFAULT NULL,
col87 varbinary(221) DEFAULT NULL,
col88 double unsigned DEFAULT NULL,
col89 float unsigned zerofill DEFAULT NULL,
col90 tinyblob
col72 datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
Warnings:
Note 1291 Column 'col82' has duplicated value '' in ENUM
Note 1291 Column 'col82' has duplicated value '' in ENUM
SET sql_mode = default;
INSERT IGNORE INTO bug52745 SET
col40='0000-00-00 00:00:00',
......@@ -81,21 +58,7 @@ col66='19600719080256',
col68=repeat('Sagittarius\'',54),
col69='38943902',
col70=1232,
col71='Elora\'',
col74=repeat('zipp',11),
col75='0',
col76=23254,
col78=13247,
col79='56219',
col80='20500609035724',
col81=11632,
col82=7,
col84=-23863,
col85=6341,
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',
col88=16894,
col89=6161,
col90=repeat('gale',48);
col71='Elora\'';
Warnings:
Warning 1265 Data truncated for column 'col53' at row 1
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
Warning 1265 Data truncated for column 'col68' at row 1
Warning 1265 Data truncated for column 'col69' at row 1
Warning 1264 Out of range value for column 'col70' at row 1
Warning 1264 Out of range value for column 'col78' at row 1
Warning 1265 Data truncated for column 'col79' at row 1
Warning 1264 Out of range value for column 'col84' at row 1
SHOW WARNINGS;
Level Code Message
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
Warning 1265 Data truncated for column 'col68' at row 1
Warning 1265 Data truncated for column 'col69' at row 1
Warning 1264 Out of range value for column 'col70' at row 1
Warning 1264 Out of range value for column 'col78' at row 1
Warning 1265 Data truncated for column 'col79' at row 1
Warning 1264 Out of range value for column 'col84' at row 1
DROP TABLE bug52745;
SET GLOBAL innodb_file_per_table=1;
......@@ -117,7 +117,7 @@ ERROR 42000: Row size too large. The maximum row size for the used table type, n
show warnings;
Level Code Message
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
create index idx4 on worklog5743_1(a2(434));
create index idx4 on worklog5743_1(a2(290));
show warnings;
Level Code Message
create index idx5 on worklog5743_1(a1, a2(430));
......@@ -125,7 +125,7 @@ ERROR 42000: Row size too large. The maximum row size for the used table type, n
show warnings;
Level Code Message
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
create index idx6 on worklog5743_1(a1, a2(428));
create index idx6 on worklog5743_1(a1, a2(283));
show warnings;
Level Code Message
set global innodb_large_prefix=0;
......@@ -152,7 +152,7 @@ ERROR 42000: Row size too large. The maximum row size for the used table type, n
show warnings;
Level Code Message
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
create index idx4 on worklog5743_2(a2(946));
create index idx4 on worklog5743_2(a2(802));
show warnings;
Level Code Message
create index idx5 on worklog5743_2(a1, a2(942));
......@@ -160,7 +160,7 @@ ERROR 42000: Row size too large. The maximum row size for the used table type, n
show warnings;
Level Code Message
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
create index idx6 on worklog5743_2(a1, a2(940));
create index idx6 on worklog5743_2(a1, a2(795));
show warnings;
Level Code Message
set global innodb_large_prefix=0;
......@@ -186,7 +186,7 @@ ERROR 42000: Row size too large. The maximum row size for the used table type, n
show warnings;
Level Code Message
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
create index idx4 on worklog5743_4(a2(1970));
create index idx4 on worklog5743_4(a2(1826));
show warnings;
Level Code Message
create index idx5 on worklog5743_4(a1, a2(1966));
......@@ -194,7 +194,7 @@ ERROR 42000: Row size too large. The maximum row size for the used table type, n
show warnings;
Level Code Message
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
create index idx6 on worklog5743_4(a1, a2(1964));
create index idx6 on worklog5743_4(a1, a2(1819));
show warnings;
Level Code Message
set global innodb_large_prefix=0;
......
--- page_size.result
+++ page_size,4k.result
@@ -3,7 +3,7 @@
SELECT variable_value FROM information_schema.global_status
WHERE LOWER(variable_name) = 'innodb_page_size';
......@@ -85,8 +83,8 @@
-c21 char(200), c22 char(200), c23 char(200), c24 char(200), c25 char(200),
-c26 char(200), c27 char(200), c28 char(200), c29 char(200), c30 char(200),
-c31 char(200), c32 char(200), c33 char(200), c34 char(200), c35 char(200),
-c36 char(200), c37 char(200), c38 char(200), c39 char(200), c40 char(157)
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(76)
-c36 char(200), c37 char(200), c38 char(196)
+c06 char(200), c07 char(200), c08 char(176)
) ROW_FORMAT=compressed;
DROP TABLE t1;
CREATE TABLE t1 (
......@@ -483,5 +481,5 @@
-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.
+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.
DROP TABLE t1;
CREATE TABLE t1(c text, PRIMARY KEY (c(438)))
CREATE TABLE t1(c text, PRIMARY KEY (c(293)))
ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII;
--- page_size.result
+++ page_size,8k.result
@@ -3,7 +3,7 @@
SELECT variable_value FROM information_schema.global_status
WHERE LOWER(variable_name) = 'innodb_page_size';
......@@ -83,8 +81,8 @@
-c21 char(200), c22 char(200), c23 char(200), c24 char(200), c25 char(200),
-c26 char(200), c27 char(200), c28 char(200), c29 char(200), c30 char(200),
-c31 char(200), c32 char(200), c33 char(200), c34 char(200), c35 char(200),
-c36 char(200), c37 char(200), c38 char(200), c39 char(200), c40 char(157)
+c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(103)
-c36 char(200), c37 char(200), c38 char(196)
+c16 char(200), c17 char(200), c18 char(182)
) ROW_FORMAT=compressed;
DROP TABLE t1;
CREATE TABLE t1 (
......@@ -421,5 +419,5 @@
-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.
+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.
DROP TABLE t1;
CREATE TABLE t1(c text, PRIMARY KEY (c(438)))
CREATE TABLE t1(c text, PRIMARY KEY (c(293)))
ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII;
......@@ -97,7 +97,7 @@ c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(200),
c21 char(200), c22 char(200), c23 char(200), c24 char(200), c25 char(200),
c26 char(200), c27 char(200), c28 char(200), c29 char(200), c30 char(200),
c31 char(200), c32 char(200), c33 char(200), c34 char(200), c35 char(200),
c36 char(200), c37 char(200), c38 char(200), c39 char(200), c40 char(157)
c36 char(200), c37 char(200), c38 char(196)
) ROW_FORMAT=compressed;
DROP TABLE t1;
CREATE TABLE t1 (
......@@ -603,7 +603,7 @@ ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII;
Warnings:
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.
DROP TABLE t1;
CREATE TABLE t1(c text, PRIMARY KEY (c(438)))
CREATE TABLE t1(c text, PRIMARY KEY (c(293)))
ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII;
INSERT INTO t1 VALUES(REPEAT('A',512)),(REPEAT('B',512));
DROP TABLE t1;
......@@ -325,7 +325,7 @@ col_1_binary = REPEAT("c", 255)
DROP TABLE worklog5743;
CREATE TABLE worklog5743_key2 (
col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) ,
PRIMARY KEY (col_1_varchar(948))
PRIMARY KEY (col_1_varchar(801))
) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2, engine = innodb;
INSERT INTO worklog5743_key2 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
INSERT INTO worklog5743_key2 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
......@@ -349,7 +349,7 @@ col_1_varchar = REPEAT("c", 4000)
DROP TABLE worklog5743_key2;
CREATE TABLE worklog5743_key4 (
col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) ,
PRIMARY KEY (col_1_varchar(1964))
PRIMARY KEY (col_1_varchar(1825))
) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4, engine = innodb;
INSERT INTO worklog5743_key4 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
INSERT INTO worklog5743_key4 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
......@@ -398,7 +398,7 @@ col_1_varchar = REPEAT("c", 4000)
DROP TABLE worklog5743_key8;
CREATE TABLE worklog5743_key2 (
col_1_text TEXT (4000) , col_2_text TEXT (4000) ,
PRIMARY KEY (col_1_text(948))
PRIMARY KEY (col_1_text(801))
) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2, engine = innodb;
INSERT INTO worklog5743_key2 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
INSERT INTO worklog5743_key2 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
......@@ -422,7 +422,7 @@ col_1_text = REPEAT("c", 4000)
DROP TABLE worklog5743_key2;
CREATE TABLE worklog5743_key4 (
col_1_text TEXT (4000) , col_2_text TEXT (4000) ,
PRIMARY KEY (col_1_text(1964))
PRIMARY KEY (col_1_text(1825))
) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4, engine = innodb;
INSERT INTO worklog5743_key4 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
INSERT INTO worklog5743_key4 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
......@@ -470,7 +470,7 @@ col_1_text = REPEAT("c", 4000)
DROP TABLE worklog5743_key8;
CREATE TABLE worklog5743_key2 (
col_1_blob BLOB (4000) , col_2_blob BLOB (4000) ,
PRIMARY KEY (col_1_blob(948))
PRIMARY KEY (col_1_blob(801))
) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2, engine = innodb;
INSERT INTO worklog5743_key2 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
INSERT INTO worklog5743_key2 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
......@@ -494,7 +494,7 @@ col_1_blob = REPEAT("c", 4000)
DROP TABLE worklog5743_key2;
CREATE TABLE worklog5743_key4 (
col_1_blob BLOB (4000) , col_2_blob BLOB (4000) ,
PRIMARY KEY (col_1_blob(1964))
PRIMARY KEY (col_1_blob(1825))
) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4, engine = innodb;
INSERT INTO worklog5743_key4 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
INSERT INTO worklog5743_key4 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
......@@ -1302,7 +1302,7 @@ col_1_text = REPEAT("c", 4000)
DROP TABLE worklog5743;
CREATE TABLE worklog5743 (
col_1_text TEXT (4000) , col_2_text TEXT (4000) ,
PRIMARY KEY (col_1_text(948))
PRIMARY KEY (col_1_text(801))
) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2, engine = innodb;
INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
......
......@@ -3,7 +3,7 @@ SET @save_innodb_compression_level = @@global.innodb_compression_level;
SET global innodb_compression_level=0;
#create table with 1K block size
CREATE TABLE tab5 (col_1 CHAR (255) ,
col_2 VARCHAR (255), col_3 longtext,
col_2 VARCHAR (121), col_3 longtext,
col_4 longtext,col_5 longtext,
col_6 longtext , col_7 longtext ,
col_8 longtext ,col_9 longtext ,
......@@ -54,7 +54,7 @@ COMMIT;
SET global innodb_compression_level=9;
#create table with 1K block size
CREATE TABLE tab6 (col_1 CHAR (255) ,
col_2 VARCHAR (255), col_3 longtext,
col_2 VARCHAR (121), col_3 longtext,
col_4 longtext,col_5 longtext,
col_6 longtext , col_7 longtext ,
col_8 longtext ,col_9 longtext ,
......
--source include/innodb_page_size_small.inc
#
# Test case for bug 36172
#
set @file_per_table=@@global.innodb_file_per_table;
SET GLOBAL innodb_file_per_table=on;
SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
# we do not really care about what gets printed, we are only
# interested in getting success or failure according to our
# expectations
-- disable_query_log
-- disable_result_log
CREATE TABLE `table0` ( `col0` tinyint(1) DEFAULT NULL, `col1` tinyint(1) DEFAULT NULL, `col2` tinyint(4) DEFAULT NULL, `col3` date DEFAULT NULL, `col4` time DEFAULT NULL, `col5` set('test1','test2','test3') DEFAULT NULL, `col6` time DEFAULT NULL, `col7` text, `col8` decimal(10,0) DEFAULT NULL, `col9` set('test1','test2','test3') DEFAULT NULL, `col10` float DEFAULT NULL, `col11` double DEFAULT NULL, `col12` enum('test1','test2','test3') DEFAULT NULL, `col13` tinyblob, `col14` year(4) DEFAULT NULL, `col15` set('test1','test2','test3') DEFAULT NULL, `col16` decimal(10,0) DEFAULT NULL, `col17` decimal(10,0) DEFAULT NULL, `col18` blob, `col19` datetime DEFAULT NULL, `col20` double DEFAULT NULL, `col21` decimal(10,0) DEFAULT NULL, `col22` datetime DEFAULT NULL, `col23` decimal(10,0) DEFAULT NULL, `col24` decimal(10,0) DEFAULT NULL, `col25` longtext, `col26` tinyblob, `col27` time DEFAULT NULL, `col28` tinyblob, `col29` enum('test1','test2','test3') DEFAULT NULL, `col30` smallint(6) DEFAULT NULL, `col31` double DEFAULT NULL, `col32` float DEFAULT NULL, `col33` char(175) DEFAULT NULL, `col34` tinytext, `col35` tinytext, `col36` tinyblob, `col37` tinyblob, `col38` tinytext, `col39` mediumblob, `col40` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `col41` double DEFAULT NULL, `col42` smallint(6) DEFAULT NULL, `col43` longblob, `col44` varchar(80) DEFAULT NULL, `col45` mediumtext, `col46` decimal(10,0) DEFAULT NULL, `col47` bigint(20) DEFAULT NULL, `col48` date DEFAULT NULL, `col49` tinyblob, `col50` date DEFAULT NULL, `col51` tinyint(1) DEFAULT NULL, `col52` mediumint(9) DEFAULT NULL, `col53` float DEFAULT NULL, `col54` tinyblob, `col55` longtext, `col56` smallint(6) DEFAULT NULL, `col57` enum('test1','test2','test3') DEFAULT NULL, `col58` datetime DEFAULT NULL, `col59` mediumtext, `col60` varchar(232) DEFAULT NULL, `col61` decimal(10,0) DEFAULT NULL, `col62` year(4) DEFAULT NULL, `col63` smallint(6) DEFAULT NULL, `col64` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `col65` blob, `col66` longblob, `col67` int(11) DEFAULT NULL, `col68` longtext, `col69` enum('test1','test2','test3') DEFAULT NULL, `col70` int(11) DEFAULT NULL, `col71` time DEFAULT NULL, `col72` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `col73` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `col74` varchar(170) DEFAULT NULL, `col75` set('test1','test2','test3') DEFAULT NULL, `col76` tinyblob, `col77` bigint(20) DEFAULT NULL, `col78` decimal(10,0) DEFAULT NULL, `col79` datetime DEFAULT NULL, `col80` year(4) DEFAULT NULL, `col81` decimal(10,0) DEFAULT NULL, `col82` longblob, `col83` text, `col84` char(83) DEFAULT NULL, `col85` decimal(10,0) DEFAULT NULL, `col86` float DEFAULT NULL, `col87` int(11) DEFAULT NULL, `col88` varchar(145) DEFAULT NULL, `col89` date DEFAULT NULL, `col90` decimal(10,0) DEFAULT NULL, `col91` decimal(10,0) DEFAULT NULL, `col92` mediumblob, `col93` time DEFAULT NULL, KEY `idx0` (`col69`,`col90`,`col8`), KEY `idx1` (`col60`), KEY `idx2` (`col60`,`col70`,`col74`), KEY `idx3` (`col22`,`col32`,`col72`,`col30`), KEY `idx4` (`col29`), KEY `idx5` (`col19`,`col45`(143)), KEY `idx6` (`col46`,`col48`,`col5`,`col39`(118)), KEY `idx7` (`col48`,`col61`), KEY `idx8` (`col93`), KEY `idx9` (`col31`), KEY `idx10` (`col30`,`col21`), KEY `idx11` (`col67`), KEY `idx12` (`col44`,`col6`,`col8`,`col38`(226)), KEY `idx13` (`col71`,`col41`,`col15`,`col49`(88)), KEY `idx14` (`col78`), KEY `idx15` (`col63`,`col67`,`col64`), KEY `idx16` (`col17`,`col86`), KEY `idx17` (`col77`,`col56`,`col10`,`col55`(24)), KEY `idx18` (`col62`), KEY `idx19` (`col31`,`col57`,`col56`,`col53`), KEY `idx20` (`col46`), KEY `idx21` (`col83`(54)), KEY `idx22` (`col51`,`col7`(120)), KEY `idx23` (`col7`(163),`col31`,`col71`,`col14`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2;
SET sql_mode = default;
insert ignore into `table0` set `col23` = 7887371.5084383683, `col24` = 4293854615.6906948000, `col25` = 'vitalist', `col26` = 'widespread', `col27` = '3570490', `col28` = 'habitual', `col30` = -5471, `col31` = 4286985783.6771750000, `col32` = 6354540.9826654866, `col33` = 'defoliation', `col34` = 'logarithms', `col35` = 'tegument\'s', `col36` = 'scouting\'s', `col37` = 'intermittency', `col38` = 'elongates', `col39` = 'prophecies', `col40` = '20560103035939', `col41` = 4292809130.0544143000, `col42` = 22057, `col43` = 'Hess\'s', `col44` = 'bandstand', `col45` = 'phenylketonuria', `col46` = 6338767.4018677324, `col47` = 5310247, `col48` = '12592418', `col49` = 'churchman\'s', `col50` = '32226125', `col51` = -58, `col52` = -6207968, `col53` = 1244839.3255104220, `col54` = 'robotized', `col55` = 'monotonous', `col56` = -26909, `col58` = '20720107023550', `col59` = 'suggestiveness\'s', `col60` = 'gemology', `col61` = 4287800670.2229986000, `col62` = '1944', `col63` = -16827, `col64` = '20700107212324', `col65` = 'Nicolais', `col66` = 'apteryx', `col67` = 6935317, `col68` = 'stroganoff', `col70` = 3316430, `col71` = '3277608', `col72` = '19300511045918', `col73` = '20421201003327', `col74` = 'attenuant', `col75` = '15173', `col76` = 'upstroke\'s', `col77` = 8118987, `col78` = 6791516.2735374002, `col79` = '20780701144624', `col80` = '2134', `col81` = 4290682351.3127537000, `col82` = 'unexplainably', `col83` = 'Storm', `col84` = 'Greyso\'s', `col85` = 4289119212.4306774000, `col86` = 7617575.8796655172, `col87` = -6325335, `col88` = 'fondue\'s', `col89` = '40608940', `col90` = 1659421.8093508712, `col91` = 8346904.6584368423, `col92` = 'reloads', `col93` = '5188366';
CHECK TABLE table0 EXTENDED;
INSERT IGNORE INTO `table0` SET `col19` = '19940127002709', `col20` = 2383927.9055146948, `col21` = 4293243420.5621204000, `col22` = '20511211123705', `col23` = 4289899778.6573381000, `col24` = 4293449279.0540481000, `col25` = 'emphysemic', `col26` = 'dentally', `col27` = '2347406', `col28` = 'eruct', `col30` = 1222, `col31` = 4294372994.9941406000, `col32` = 4291385574.1173744000, `col33` = 'borrowing\'s', `col34` = 'septics', `col35` = 'ratter\'s', `col36` = 'Kaye', `col37` = 'Florentia', `col38` = 'allium', `col39` = 'barkeep', `col40` = '19510407003441', `col41` = 4293559200.4215522000, `col42` = 22482, `col43` = 'decussate', `col44` = 'Brom\'s', `col45` = 'violated', `col46` = 4925506.4635456400, `col47` = 930549, `col48` = '51296066', `col49` = 'voluminously', `col50` = '29306676', `col51` = -88, `col52` = -2153690, `col53` = 4290250202.1464887000, `col54` = 'expropriation', `col55` = 'Aberdeen\'s', `col56` = 20343, `col58` = '19640415171532', `col59` = 'extern', `col60` = 'Ubana', `col61` = 4290487961.8539081000, `col62` = '2147', `col63` = -24271, `col64` = '20750801194548', `col65` = 'Cunaxa\'s', `col66` = 'pasticcio', `col67` = 2795817, `col68` = 'Indore\'s', `col70` = 6864127, `col71` = '1817832', `col72` = '20540506114211', `col73` = '20040101012300', `col74` = 'rationalized', `col75` = '45522', `col76` = 'indene', `col77` = -6964559, `col78` = 4247535.5266884370, `col79` = '20720416124357', `col80` = '2143', `col81` = 4292060102.4466386000, `col82` = 'striving', `col83` = 'boneblack\'s', `col84` = 'redolent', `col85` = 6489697.9009369183, `col86` = 4287473465.9731131000, `col87` = 7726015, `col88` = 'perplexed', `col89` = '17153791', `col90` = 5478587.1108127078, `col91` = 4287091404.7004304000, `col92` = 'Boulez\'s', `col93` = '2931278';
CHECK TABLE table0 EXTENDED;
DROP TABLE table0;
-- enable_query_log
-- enable_result_log
SET GLOBAL innodb_file_per_table=@file_per_table;
-- source include/innodb_page_size_small.inc
let $file_per_table=`select @@innodb_file_per_table`;
SET GLOBAL innodb_file_per_table=on;
SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE bug52745 (
a2 int(10) unsigned DEFAULT NULL,
col37 time DEFAULT NULL,
......@@ -40,25 +37,7 @@ CREATE TABLE bug52745 (
col69 date DEFAULT NULL,
col70 tinyint(3) unsigned zerofill DEFAULT NULL,
col71 varchar(44) CHARACTER SET utf8 DEFAULT NULL,
col72 datetime DEFAULT NULL,
col73 smallint(5) unsigned zerofill DEFAULT NULL,
col74 longblob,
col75 bit(34) DEFAULT NULL,
col76 float unsigned zerofill DEFAULT NULL,
col77 year(4) DEFAULT NULL,
col78 tinyint(3) unsigned DEFAULT NULL,
col79 set('msfheowh','tbpxbgf','by','wahnrjw','myqfasxz','rsokyumrt') CHARACTER SET latin2 DEFAULT NULL,
col80 datetime DEFAULT NULL,
col81 smallint(6) DEFAULT NULL,
col82 enum('xtaurnqfqz','rifrse','kuzwpbvb','niisabk','zxavro','rbvasv','','uulrfaove','','') DEFAULT NULL,
col83 bigint(20) unsigned zerofill DEFAULT NULL,
col84 float unsigned zerofill DEFAULT NULL,
col85 double DEFAULT NULL,
col86 enum('ylannv','','vlkhycqc','snke','cxifustp','xiaxaswzp','oxl') CHARACTER SET latin1 COLLATE latin1_german2_ci DEFAULT NULL,
col87 varbinary(221) DEFAULT NULL,
col88 double unsigned DEFAULT NULL,
col89 float unsigned zerofill DEFAULT NULL,
col90 tinyblob
col72 datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
SET sql_mode = default;
INSERT IGNORE INTO bug52745 SET
......@@ -81,24 +60,8 @@ col66='19600719080256',
col68=repeat('Sagittarius\'',54),
col69='38943902',
col70=1232,
col71='Elora\'',
col74=repeat('zipp',11),
col75='0',
col76=23254,
col78=13247,
col79='56219',
col80='20500609035724',
col81=11632,
col82=7,
col84=-23863,
col85=6341,
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',
col88=16894,
col89=6161,
col90=repeat('gale',48);
col71='Elora\'';
SHOW WARNINGS;
DROP TABLE bug52745;
EVAL SET GLOBAL innodb_file_per_table=$file_per_table;
......@@ -148,14 +148,14 @@ show warnings;
-- error ER_TOO_BIG_ROWSIZE
create index idx3 on worklog5743_1(a2(436));
show warnings;
# Bug#13391353 Limit is one byte less on on 32bit-Linux only
create index idx4 on worklog5743_1(a2(434));
# MDEV-27634 stricter compressBound() limit for the s390x DFLTCC instruction
create index idx4 on worklog5743_1(a2(290));
show warnings;
-- error ER_TOO_BIG_ROWSIZE
create index idx5 on worklog5743_1(a1, a2(430));
show warnings;
# Bug#13391353 Limit is one byte less on on 32bit-Linux only
create index idx6 on worklog5743_1(a1, a2(428));
# MDEV-27634 stricter compressBound() limit for the s390x DFLTCC instruction
create index idx6 on worklog5743_1(a1, a2(283));
show warnings;
# Test edge cases for indexes using key_block_size=2
......@@ -171,14 +171,14 @@ show warnings;
-- error ER_TOO_BIG_ROWSIZE
create index idx3 on worklog5743_2(a2(948));
show warnings;
# Bug#13391353 Limit is one byte less on on 32bit-Linux only
create index idx4 on worklog5743_2(a2(946));
# MDEV-27634 stricter compressBound() limit for the s390x DFLTCC instruction
create index idx4 on worklog5743_2(a2(802));
show warnings;
-- error ER_TOO_BIG_ROWSIZE
create index idx5 on worklog5743_2(a1, a2(942));
show warnings;
# Bug#13391353 Limit is one byte less on on 32bit-Linux only
create index idx6 on worklog5743_2(a1, a2(940));
# MDEV-27634 stricter compressBound() limit for the s390x DFLTCC instruction
create index idx6 on worklog5743_2(a1, a2(795));
show warnings;
# Test edge cases for indexes using key_block_size=4
......@@ -192,14 +192,14 @@ show warnings;
-- error ER_TOO_BIG_ROWSIZE
create index idx3 on worklog5743_4(a2(1972));
show warnings;
# Bug#13391353 Limit is one byte less on on 32bit-Linux only
create index idx4 on worklog5743_4(a2(1970));
# MDEV-27634 stricter compressBound() limit for the s390x DFLTCC instruction
create index idx4 on worklog5743_4(a2(1826));
show warnings;
-- error ER_TOO_BIG_ROWSIZE
create index idx5 on worklog5743_4(a1, a2(1966));
show warnings;
# Bug#13391353 Limit is one byte less on on 32bit-Linux only
create index idx6 on worklog5743_4(a1, a2(1964));
# MDEV-27634 stricter compressBound() limit for the s390x DFLTCC instruction
create index idx6 on worklog5743_4(a1, a2(1819));
show warnings;
# Test edge cases for indexes using key_block_size=8
......
......@@ -85,11 +85,11 @@ c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(156)
) ROW_FORMAT=compact;
# Compressed table; 1878 bytes with 10 CHAR fields
# Bug#13391353 Limit is 1876 on 32-Linux only
# Compressed table
# MDEV-27634 stricter compressBound() limit for the s390x DFLTCC instruction
CREATE TABLE t1 (
c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(76)
c06 char(200), c07 char(200), c08 char(176)
) ROW_FORMAT=compressed;
DROP TABLE t1;
--replace_regex /> [0-9]*/> max_row_size/
......@@ -185,13 +185,13 @@ c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(203)
) ROW_FORMAT=compact;
# Compressed table; 3905 bytes with 20 CHAR fields
# Bug#13391353 Limit is 3903 on 32-Linux only
# Compressed table
# MDEV-27634 stricter compressBound() limit for the s390x DFLTCC instruction
CREATE TABLE t1 (
c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(103)
c16 char(200), c17 char(200), c18 char(182)
) ROW_FORMAT=compressed;
DROP TABLE t1;
--replace_regex /> [0-9]*/> max_row_size/
......@@ -307,8 +307,8 @@ c31 char(200), c32 char(200), c33 char(200), c34 char(200), c35 char(200),
c36 char(200), c37 char(200), c38 char(200), c39 char(250), c40 char(247)
) ROW_FORMAT=compact;
# Compressed table; 7959 bytes with 40 CHAR fields
# Bug#13391353 Limit is 7957 on 32-Linux only
# Compressed table
# MDEV-27634 stricter compressBound() limit for the s390x DFLTCC instruction
CREATE TABLE t1 (
c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
......@@ -317,7 +317,7 @@ c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(200),
c21 char(200), c22 char(200), c23 char(200), c24 char(200), c25 char(200),
c26 char(200), c27 char(200), c28 char(200), c29 char(200), c30 char(200),
c31 char(200), c32 char(200), c33 char(200), c34 char(200), c35 char(200),
c36 char(200), c37 char(200), c38 char(200), c39 char(200), c40 char(157)
c36 char(200), c37 char(200), c38 char(196)
) ROW_FORMAT=compressed;
DROP TABLE t1;
--error ER_TOO_BIG_ROWSIZE
......@@ -875,7 +875,9 @@ DROP TABLE t1;
CREATE TABLE t1(c text, PRIMARY KEY (c(440)))
ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII;
DROP TABLE t1;
CREATE TABLE t1(c text, PRIMARY KEY (c(438)))
--disable_warnings
CREATE TABLE t1(c text, PRIMARY KEY (c(293)))
ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII;
--enable_warnings
INSERT INTO t1 VALUES(REPEAT('A',512)),(REPEAT('B',512));
DROP TABLE t1;
......@@ -295,10 +295,9 @@ DROP TABLE worklog5743;
# Prefix index with VARCHAR data type , primary/seconday index , DML ops
# and COMPRESSED row format. KEY_BLOCK_SIZE is varied as 2 , 4 , 8.
# With KEY_BLOCK_SIZE = 2,prefix index limit comes around ~948 for following
CREATE TABLE worklog5743_key2 (
col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) ,
PRIMARY KEY (col_1_varchar(948))
PRIMARY KEY (col_1_varchar(801))
) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2, engine = innodb;
INSERT INTO worklog5743_key2 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
#CREATE INDEX prefix_idx ON worklog5743_key2 (col_1_varchar (767));
......@@ -314,10 +313,9 @@ DELETE FROM worklog5743_key2 WHERE col_1_varchar = REPEAT("b", 4000);
SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743_key2;
DROP TABLE worklog5743_key2;
# With KEY_BLOCK_SIZE = 4,prefix index limit comes around ~1964 for following
CREATE TABLE worklog5743_key4 (
col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) ,
PRIMARY KEY (col_1_varchar(1964))
PRIMARY KEY (col_1_varchar(1825))
) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4, engine = innodb;
INSERT INTO worklog5743_key4 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
#CREATE INDEX prefix_idx ON worklog5743_key4 (col_1_varchar (767));
......@@ -356,10 +354,9 @@ DROP TABLE worklog5743_key8;
# Prefix index with TEXT data type , primary/seconday index , DML ops
# and COMPRESSED row format. KEY_BLOCK_SIZE is varied as 2 , 4 , 8.
# With KEY_BLOCK_SIZE = 2,prefix index limit comes around ~948 for following
CREATE TABLE worklog5743_key2 (
col_1_text TEXT (4000) , col_2_text TEXT (4000) ,
PRIMARY KEY (col_1_text(948))
PRIMARY KEY (col_1_text(801))
) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2, engine = innodb;
INSERT INTO worklog5743_key2 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
#CREATE INDEX prefix_idx ON worklog5743_key2 (col_1_text (767));
......@@ -375,10 +372,9 @@ DELETE FROM worklog5743_key2 WHERE col_1_text = REPEAT("b", 4000);
SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743_key2;
DROP TABLE worklog5743_key2;
# With KEY_BLOCK_SIZE = 4,prefix index limit comes around ~1964 for following
CREATE TABLE worklog5743_key4 (
col_1_text TEXT (4000) , col_2_text TEXT (4000) ,
PRIMARY KEY (col_1_text(1964))
PRIMARY KEY (col_1_text(1825))
) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4, engine = innodb;
INSERT INTO worklog5743_key4 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
#CREATE INDEX prefix_idx ON worklog5743_key4 (col_1_text (767));
......@@ -416,10 +412,9 @@ DROP TABLE worklog5743_key8;
# Prefix index with BLOB data type , primary/seconday index , DML ops
# and COMPRESSED row format. KEY_BLOCK_SIZE is varied as 2 , 4 , 8.
# With KEY_BLOCK_SIZE = 2,prefix index limit comes around ~948 for following
CREATE TABLE worklog5743_key2 (
col_1_blob BLOB (4000) , col_2_blob BLOB (4000) ,
PRIMARY KEY (col_1_blob(948))
PRIMARY KEY (col_1_blob(801))
) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2, engine = innodb;
INSERT INTO worklog5743_key2 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
#CREATE INDEX prefix_idx ON worklog5743_key2 (col_1_blob (767));
......@@ -435,10 +430,9 @@ DELETE FROM worklog5743_key2 WHERE col_1_blob = REPEAT("b", 4000);
SELECT col_1_blob = REPEAT("c", 4000) FROM worklog5743_key2;
DROP TABLE worklog5743_key2;
# With KEY_BLOCK_SIZE = 4,prefix index limit comes around ~1964 for following
CREATE TABLE worklog5743_key4 (
col_1_blob BLOB (4000) , col_2_blob BLOB (4000) ,
PRIMARY KEY (col_1_blob(1964))
PRIMARY KEY (col_1_blob(1825))
) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4, engine = innodb;
INSERT INTO worklog5743_key4 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
#CREATE INDEX prefix_idx ON worklog5743_key4 (col_1_blob (767));
......@@ -1197,7 +1191,7 @@ DROP TABLE worklog5743;
# For compressed row type + primary key
CREATE TABLE worklog5743 (
col_1_text TEXT (4000) , col_2_text TEXT (4000) ,
PRIMARY KEY (col_1_text(948))
PRIMARY KEY (col_1_text(801))
) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2, engine = innodb;
INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
# Create index of 767
......
......@@ -18,7 +18,7 @@ SET global innodb_compression_level=0;
-- echo #create table with 1K block size
CREATE TABLE tab5 (col_1 CHAR (255) ,
col_2 VARCHAR (255), col_3 longtext,
col_2 VARCHAR (121), col_3 longtext,
col_4 longtext,col_5 longtext,
col_6 longtext , col_7 longtext ,
col_8 longtext ,col_9 longtext ,
......@@ -62,7 +62,7 @@ SET global innodb_compression_level=9;
-- echo #create table with 1K block size
CREATE TABLE tab6 (col_1 CHAR (255) ,
col_2 VARCHAR (255), col_3 longtext,
col_2 VARCHAR (121), col_3 longtext,
col_4 longtext,col_5 longtext,
col_6 longtext , col_7 longtext ,
col_8 longtext ,col_9 longtext ,
......
......@@ -12983,7 +12983,6 @@ bool create_table_info_t::row_size_is_acceptable(
if (info.row_is_too_big())
{
ut_ad(info.get_overrun_size() != 0);
ut_ad(info.max_leaf_size != 0);
const size_t idx= info.get_first_overrun_field_index();
const dict_field_t *field= dict_index_get_nth_field(&index, idx);
......
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