Debian Codegraph @

mysql-test/suite/innodb/t/innodb_max_recordsize.test

raw
1 #
2 # Bug#33399379 : Missing PREFIX BLOB in calculating maximum length of possible row
3 #
4
5 --disable_query_log
6 call mtr.add_suppression("Cannot create the table .* because the record size will exceed the maximum allowed size for a record.");
7 --enable_query_log
8
9 SET @saved_innodb_strict_mode=@@SESSION.innodb_strict_mode;
10
11 --error ER_TOO_BIG_ROWSIZE
12 CREATE TABLE t1 (id INT PRIMARY KEY, c1 VARCHAR(4000), c2 VARCHAR(4000), c3 VARCHAR(500)) ROW_FORMAT=COMPACT;
13
14 --error ER_TOO_BIG_ROWSIZE
15 CREATE TABLE t1 (id INT PRIMARY KEY, c1 VARCHAR(4000), c2 VARCHAR(4000), c3 VARCHAR(500)) ROW_FORMAT=REDUNDANT;
16
17 SET SESSION innodb_strict_mode=OFF;
18 # Create Table shall pass with a warning with strict mode off
19 CREATE TABLE t1 (id INT PRIMARY KEY, c1 VARCHAR(4000), c2 VARCHAR(4000), c3 VARCHAR(500)) ROW_FORMAT=COMPACT;
20 # Actual Insert shall return error as the row size is big
21 --error ER_TOO_BIG_ROWSIZE
22 INSERT INTO t1 VALUES(2, repeat('e', 4000), repeat('f', 4000), repeat('h', 500));
23 DROP TABLE t1;
24
25 # Create Table shall pass with a warning with strict mode off
26 CREATE TABLE t1 (id INT PRIMARY KEY, c1 VARCHAR(4000), c2 VARCHAR(4000), c3 VARCHAR(500)) ROW_FORMAT=REDUNDANT;
27 # Actual Insert shall return error as the row size is big
28 --error ER_TOO_BIG_ROWSIZE
29 INSERT INTO t1 VALUES(2, repeat('e', 4000), repeat('f', 4000), repeat('h', 500));
30 DROP TABLE t1;
31 SET SESSION innodb_strict_mode=@saved_innodb_strict_mode;
32
33 CREATE TABLE t1 (id INT PRIMARY KEY, c1 VARCHAR(4000), c2 VARCHAR(4000), c3 VARCHAR(500)) ROW_FORMAT=DYNAMIC;
34
35 INSERT INTO t1 VALUES(2, repeat('e', 4000), repeat('f', 4000), repeat('h', 500));
36
37 SELECT id, LEFT(c1 , 10), LEFT(c2, 10), LEFT(c3, 10) FROM t1;
38
39 DROP TABLE t1;