Skip to content

Commit 746ee78

Browse files
committed
MDEV-20949: Merge 10.3 into 10.4
2 parents 3bee95d + 4ded5fb commit 746ee78

20 files changed

+759
-311
lines changed

mysql-test/suite/innodb/r/instant_alter,4k.rdiff

Lines changed: 59 additions & 61 deletions
Large diffs are not rendered by default.

mysql-test/suite/innodb/r/instant_alter.result

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -353,8 +353,6 @@ id c2 c3 c4 c5 c6 c7 c8 phrase b
353353
ALTER TABLE t3 DROP c3, DROP c7;
354354
affected rows: 0
355355
info: Records: 0 Duplicates: 0 Warnings: 0
356-
SET innodb_strict_mode = OFF;
357-
affected rows: 0
358356
SELECT * FROM t3;
359357
id c2 c4 c5 c6 c8 phrase b
360358
1 1 1970-01-01 03:00:42 1970-01-01 03:00:42 NULL 1970-01-01 The quick brown fox jumps over the lazy dog
@@ -1204,8 +1202,6 @@ id c2 c3 c4 c5 c6 c7 c8 phrase b
12041202
ALTER TABLE t3 DROP c3, DROP c7;
12051203
affected rows: 0
12061204
info: Records: 0 Duplicates: 0 Warnings: 0
1207-
SET innodb_strict_mode = OFF;
1208-
affected rows: 0
12091205
SELECT * FROM t3;
12101206
id c2 c4 c5 c6 c8 phrase b
12111207
1 1 1970-01-01 03:00:42 1970-01-01 03:00:42 NULL 1970-01-01 The quick brown fox jumps over the lazy dog
@@ -2055,8 +2051,6 @@ id c2 c3 c4 c5 c6 c7 c8 phrase b
20552051
ALTER TABLE t3 DROP c3, DROP c7;
20562052
affected rows: 0
20572053
info: Records: 0 Duplicates: 0 Warnings: 0
2058-
SET innodb_strict_mode = OFF;
2059-
affected rows: 0
20602054
SELECT * FROM t3;
20612055
id c2 c4 c5 c6 c8 phrase b
20622056
1 1 1970-01-01 03:00:42 1970-01-01 03:00:42 NULL 1970-01-01 The quick brown fox jumps over the lazy dog

mysql-test/suite/innodb/r/instant_alter_limit,4k.rdiff

Lines changed: 296 additions & 1 deletion
Large diffs are not rendered by default.

mysql-test/suite/innodb/r/instant_alter_limit,8k.rdiff

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,53 @@
11
--- instant_alter_limit.result
22
+++ instant_alter_limit.result
3-
@@ -42,5 +42,5 @@
3+
@@ -5,6 +5,28 @@
4+
ENGINE=InnoDB;
5+
INSERT INTO t VALUES(1,2,3,4,5);
6+
SET innodb_strict_mode = OFF;
7+
+Warnings:
8+
+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.
9+
+Warnings:
10+
+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.
11+
+Warnings:
12+
+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.
13+
+Warnings:
14+
+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.
15+
+Warnings:
16+
+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.
17+
+Warnings:
18+
+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.
19+
+Warnings:
20+
+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.
21+
+Warnings:
22+
+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.
23+
+Warnings:
24+
+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.
25+
+Warnings:
26+
+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.
27+
+Warnings:
28+
+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.
29+
SELECT * FROM t;
30+
b d a c e
31+
NULL NULL 1 NULL NULL
32+
@@ -12,11 +34,17 @@
33+
ADD COLUMN b INT, ALGORITHM=INSTANT;
34+
ERROR 0A000: ALGORITHM=INSTANT is not supported for this operation. Try ALGORITHM=INPLACE
35+
ALTER TABLE t CHANGE COLUMN b beta INT AFTER a, ALGORITHM=INSTANT;
36+
+Warnings:
37+
+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.
38+
ALTER TABLE t DROP e, DROP c, DROP d, ALGORITHM=INSTANT;
39+
+Warnings:
40+
+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.
41+
SELECT * FROM t;
42+
a beta
43+
1 NULL
44+
ALTER TABLE t DROP COLUMN beta, ALGORITHM=INSTANT;
45+
+Warnings:
46+
+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.
47+
ALTER TABLE t ADD COLUMN b INT NOT NULL, ALGORITHM=INSTANT;
48+
ERROR 0A000: ALGORITHM=INSTANT is not supported for this operation. Try ALGORITHM=INPLACE
49+
SELECT variable_value-@old_instant instants
50+
@@ -43,5 +71,5 @@
451
FROM information_schema.global_status
552
WHERE variable_name = 'innodb_instant_alter_column';
653
instants

mysql-test/suite/innodb/r/instant_alter_limit.result

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ WHERE variable_name = 'innodb_instant_alter_column');
44
CREATE TABLE t(a INT PRIMARY KEY, b INT, c INT, d INT, e INT)
55
ENGINE=InnoDB;
66
INSERT INTO t VALUES(1,2,3,4,5);
7+
SET innodb_strict_mode = OFF;
78
SELECT * FROM t;
89
b d a c e
910
NULL NULL 1 NULL NULL

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

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ SET @old_instant=
4646
WHERE variable_name = 'innodb_instant_alter_column');
4747

4848
let $format= 3;
49+
let $redundant_4k= `SELECT @@GLOBAL.innodb_page_size=4096`;
4950
while ($format) {
5051
let $engine= `SELECT CONCAT('ENGINE=InnoDB ROW_FORMAT=',CASE $format
5152
WHEN 1 THEN 'DYNAMIC'
@@ -196,9 +197,19 @@ SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
196197
WHERE name = 'test/t2';
197198
connection default;
198199

200+
if ($redundant_4k)
201+
{
202+
--error ER_TOO_BIG_ROWSIZE
203+
ALTER TABLE t2 DROP p;
204+
SET innodb_strict_mode = OFF;
205+
}
199206
--enable_info
200207
ALTER TABLE t2 DROP p;
201208
--disable_info
209+
if ($redundant_4k)
210+
{
211+
SET innodb_strict_mode = ON;
212+
}
202213
SELECT * FROM t2;
203214

204215
# datetime
@@ -223,6 +234,13 @@ SELECT id, c2, ST_AsText(c3) c3, c4, c5, c6, c7, c8 FROM t3;
223234
--enable_info
224235
ALTER TABLE t3 ADD COLUMN t TEXT CHARSET utf8
225236
DEFAULT 'The quick brown fox jumps over the lazy dog';
237+
238+
if ($redundant_4k)
239+
{
240+
--error ER_TOO_BIG_ROWSIZE
241+
ALTER TABLE t3 ADD COLUMN b BLOB NOT NULL;
242+
SET innodb_strict_mode = OFF;
243+
}
226244
ALTER TABLE t3 ADD COLUMN b BLOB NOT NULL;
227245
--error ER_NO_DEFAULT_FOR_FIELD
228246
INSERT INTO t3 SET id=4;
@@ -236,7 +254,6 @@ INSERT INTO t3 SET id=5, c2=9;
236254
SELECT id, c2, ST_AsText(c3) c3, c4, c5, c6, c7, c8, phrase, b FROM t3;
237255
--enable_info
238256
ALTER TABLE t3 DROP c3, DROP c7;
239-
SET innodb_strict_mode = OFF;
240257
--disable_info
241258
SELECT * FROM t3;
242259

@@ -774,6 +791,7 @@ SELECT * FROM t1;
774791
DROP TABLE t1;
775792

776793
dec $format;
794+
let $redundant_4k= 0;
777795
}
778796
disconnect analyze;
779797
SELECT variable_value-@old_instant instants

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ WHERE variable_name = 'innodb_instant_alter_column');
77
CREATE TABLE t(a INT PRIMARY KEY, b INT, c INT, d INT, e INT)
88
ENGINE=InnoDB;
99
INSERT INTO t VALUES(1,2,3,4,5);
10+
SET innodb_strict_mode = OFF;
1011
--disable_query_log
12+
call mtr.add_suppression("\\[Warning\\] InnoDB: Cannot add .* in table `test`\\.`t` because after adding it, the row size");
1113
let $n=253;
1214
while ($n) {
1315
dec $n;

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
call mtr.add_suppression('InnoDB: Cannot add field.*because after adding it, the row size is');
12
SET GLOBAL innodb_file_per_table=on;
23
SET GLOBAL innodb_strict_mode=on;
34
set old_alter_table=0;

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
call mtr.add_suppression('InnoDB: Cannot add field.*because after adding it, the row size is');
12
CREATE TABLE worklog5743 (
23
col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) ,
34
PRIMARY KEY (col_1_varchar(3072))

mysql-test/suite/innodb_zip/t/bug53591.test

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
-- source include/innodb_page_size_small.inc
22

3+
call mtr.add_suppression('InnoDB: Cannot add field.*because after adding it, the row size is');
4+
35
let $file_per_table=`select @@innodb_file_per_table`;
46

57
SET GLOBAL innodb_file_per_table=on;

0 commit comments

Comments
 (0)