Skip to content

Commit 2dce3ba

Browse files
committed
Merge 10.4 into 10.5
2 parents e8e755e + 7b97020 commit 2dce3ba

21 files changed

+175
-154
lines changed

mysql-test/main/innodb_mysql_sync.result

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ connection default;
131131
DROP DATABASE db1;
132132
# Test 2: Primary index (implicit), should block writes.
133133
CREATE TABLE t1(a INT NOT NULL, b INT NOT NULL) engine=innodb;
134+
INSERT INTO t1 VALUES(1, 2);
134135
SET DEBUG_SYNC= "alter_table_inplace_after_lock_downgrade SIGNAL manage WAIT_FOR query";
135136
# Sending:
136137
ALTER TABLE t1 ADD UNIQUE INDEX(a), LOCK=SHARED;
@@ -139,15 +140,16 @@ SET DEBUG_SYNC= "now WAIT_FOR manage";
139140
USE test;
140141
SELECT * FROM t1;
141142
a b
143+
1 2
142144
# Sending:
143-
UPDATE t1 SET a=NULL;
145+
UPDATE t1 SET a=3;
144146
connection con2;
145147
# Waiting for SELECT to be blocked by the metadata lock on t1
146148
SET DEBUG_SYNC= "now SIGNAL query";
147149
connection default;
148150
# Reaping: ALTER TABLE t1 ADD UNIQUE INDEX(a)
149151
connection con1;
150-
# Reaping: UPDATE t1 SET a=NULL
152+
# Reaping: UPDATE t1 SET a=3
151153
# Test 3: Primary index (explicit), should block writes.
152154
connection default;
153155
ALTER TABLE t1 DROP INDEX a;
@@ -158,15 +160,16 @@ connection con1;
158160
SET DEBUG_SYNC= "now WAIT_FOR manage";
159161
SELECT * FROM t1;
160162
a b
163+
3 2
161164
# Sending:
162-
UPDATE t1 SET a=NULL;
165+
UPDATE t1 SET a=4;
163166
connection con2;
164167
# Waiting for SELECT to be blocked by the metadata lock on t1
165168
SET DEBUG_SYNC= "now SIGNAL query";
166169
connection default;
167170
# Reaping: ALTER TABLE t1 ADD PRIMARY KEY (a)
168171
connection con1;
169-
# Reaping: UPDATE t1 SET a=NULL
172+
# Reaping: UPDATE t1 SET a=4
170173
# Test 4: Secondary unique index, should not block reads.
171174
connection default;
172175
SET DEBUG_SYNC= "alter_table_inplace_after_lock_downgrade SIGNAL manage WAIT_FOR query";
@@ -176,6 +179,7 @@ connection con1;
176179
SET DEBUG_SYNC= "now WAIT_FOR manage";
177180
SELECT * FROM t1;
178181
a b
182+
4 2
179183
SET DEBUG_SYNC= "now SIGNAL query";
180184
connection default;
181185
# Reaping: ALTER TABLE t1 ADD UNIQUE (b)

mysql-test/main/innodb_mysql_sync.test

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ DROP DATABASE db1;
176176
--echo # Test 2: Primary index (implicit), should block writes.
177177

178178
CREATE TABLE t1(a INT NOT NULL, b INT NOT NULL) engine=innodb;
179+
INSERT INTO t1 VALUES(1, 2);
179180
SET DEBUG_SYNC= "alter_table_inplace_after_lock_downgrade SIGNAL manage WAIT_FOR query";
180181
--echo # Sending:
181182
--send ALTER TABLE t1 ADD UNIQUE INDEX(a), LOCK=SHARED
@@ -185,13 +186,13 @@ SET DEBUG_SYNC= "now WAIT_FOR manage";
185186
USE test;
186187
SELECT * FROM t1;
187188
--echo # Sending:
188-
--send UPDATE t1 SET a=NULL
189+
--send UPDATE t1 SET a=3
189190

190191
connection con2;
191192
--echo # Waiting for SELECT to be blocked by the metadata lock on t1
192193
let $wait_condition= SELECT COUNT(*)= 1 FROM information_schema.processlist
193194
WHERE state= 'Waiting for table metadata lock'
194-
AND info='UPDATE t1 SET a=NULL';
195+
AND info='UPDATE t1 SET a=3';
195196
--source include/wait_condition.inc
196197
SET DEBUG_SYNC= "now SIGNAL query";
197198

@@ -200,7 +201,7 @@ connection default;
200201
--reap
201202

202203
connection con1;
203-
--echo # Reaping: UPDATE t1 SET a=NULL
204+
--echo # Reaping: UPDATE t1 SET a=3
204205
--reap
205206

206207
--echo # Test 3: Primary index (explicit), should block writes.
@@ -215,13 +216,13 @@ connection con1;
215216
SET DEBUG_SYNC= "now WAIT_FOR manage";
216217
SELECT * FROM t1;
217218
--echo # Sending:
218-
--send UPDATE t1 SET a=NULL
219+
--send UPDATE t1 SET a=4
219220

220221
connection con2;
221222
--echo # Waiting for SELECT to be blocked by the metadata lock on t1
222223
let $wait_condition= SELECT COUNT(*)= 1 FROM information_schema.processlist
223224
WHERE state= 'Waiting for table metadata lock'
224-
AND info='UPDATE t1 SET a=NULL';
225+
AND info='UPDATE t1 SET a=4';
225226
--source include/wait_condition.inc
226227
SET DEBUG_SYNC= "now SIGNAL query";
227228

@@ -230,7 +231,7 @@ connection default;
230231
--reap
231232

232233
connection con1;
233-
--echo # Reaping: UPDATE t1 SET a=NULL
234+
--echo # Reaping: UPDATE t1 SET a=4
234235
--reap
235236

236237
--echo # Test 4: Secondary unique index, should not block reads.

mysql-test/suite/federated/rpl.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
source have_federatedx.inc;
12
source include/have_binlog_format_row.inc;
23
source include/master-slave.inc;
34

mysql-test/suite/galera_3nodes/disabled.def

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
##############################################################################
1212

1313
GAL-501 : MDEV-24645 galera_3nodes.GAL-501 MTR failed: failed to open gcomm backend connection: 110
14+
galera_2_cluster : MDEV-22195 temporarily disabled due to issues to be fixed with MDEV-22195
1415
galera_gtid_2_cluster : MDEV-23775 Galera test failure on galera_3nodes.galera_gtid_2_cluster
1516
galera_ist_gcache_rollover : MDEV-23578 WSREP: exception caused by message: {v=0,t=1,ut=255,o=4,s=0,sr=0,as=1,f=6,src=50524cfe,srcvid=view_id(REG,50524cfe,4),insvid=view_id(UNKNOWN,00000000,0),ru=00000000,r=[-1,-1],fs=75,nl=(}
1617
galera_load_data_ist : MDEV-24639 galera_3nodes.galera_load_data_ist MTR failed with SIGABRT: query 'reap' failed: 2013: Lost connection to MySQL server during query

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

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,12 +462,27 @@ INSERT INTO t1 SET a=0, i=REPEAT('1', 10000);
462462
ROLLBACK;
463463
set DEBUG_SYNC='now SIGNAL go';
464464
connection default;
465-
disconnect con1;
466465
SELECT * FROM t1;
467466
a b c d e f g h i
468467
1 2 3 4 5 6 7 8 test
469468
DROP TABLE t1;
470469
SET DEBUG_SYNC=RESET;
470+
#
471+
# MDEV-27962 Instant DDL downgrades the MDL when table is empty
472+
#
473+
CREATE TABLE t1(f1 INT NOT NULL, f2 INT NOT NULL)ENGINE=InnoDB;
474+
SET DEBUG_SYNC="alter_table_inplace_after_lock_downgrade SIGNAL try_insert WAIT_FOR alter_progress";
475+
ALTER TABLE t1 ADD INDEX(f1), ADD INDEX(f2);
476+
connection con1;
477+
SET SESSION lock_wait_timeout=1;
478+
SET DEBUG_SYNC="now WAIT_FOR try_insert";
479+
INSERT INTO t1 VALUES(1, 2);
480+
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
481+
SET DEBUG_SYNC="now SIGNAL alter_progress";
482+
disconnect con1;
483+
connection default;
484+
DROP TABLE t1;
485+
SET DEBUG_SYNC=reset;
471486
# End of 10.4 tests
472487
#
473488
# MDEV-22867 Assertion instant.n_core_fields == n_core_fields

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,10 @@ f1
2525
disconnect con1;
2626
connection default;
2727
drop table t1;
28+
#
29+
# MDEV-27993 Assertion failed in btr_page_reorganize_low()
30+
#
31+
CREATE TABLE t1(a INT PRIMARY KEY, b INT UNIQUE) ENGINE=InnoDB;
32+
SET DEBUG_DBUG = '+d,do_page_reorganize';
33+
INSERT INTO t1 VALUES(0,0);
34+
DROP TABLE t1;

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

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,11 +533,28 @@ set DEBUG_SYNC='now SIGNAL go';
533533
connection default;
534534
reap;
535535

536-
disconnect con1;
537536
SELECT * FROM t1;
538537
DROP TABLE t1;
539538
SET DEBUG_SYNC=RESET;
540539

540+
--echo #
541+
--echo # MDEV-27962 Instant DDL downgrades the MDL when table is empty
542+
--echo #
543+
CREATE TABLE t1(f1 INT NOT NULL, f2 INT NOT NULL)ENGINE=InnoDB;
544+
SET DEBUG_SYNC="alter_table_inplace_after_lock_downgrade SIGNAL try_insert WAIT_FOR alter_progress";
545+
send ALTER TABLE t1 ADD INDEX(f1), ADD INDEX(f2);
546+
connection con1;
547+
SET SESSION lock_wait_timeout=1;
548+
SET DEBUG_SYNC="now WAIT_FOR try_insert";
549+
--error ER_LOCK_WAIT_TIMEOUT
550+
INSERT INTO t1 VALUES(1, 2);
551+
SET DEBUG_SYNC="now SIGNAL alter_progress";
552+
disconnect con1;
553+
connection default;
554+
reap;
555+
DROP TABLE t1;
556+
SET DEBUG_SYNC=reset;
557+
541558
--echo # End of 10.4 tests
542559

543560
--echo #

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,12 @@ connection default;
5353

5454
drop table t1;
5555

56+
--echo #
57+
--echo # MDEV-27993 Assertion failed in btr_page_reorganize_low()
58+
--echo #
59+
CREATE TABLE t1(a INT PRIMARY KEY, b INT UNIQUE) ENGINE=InnoDB;
60+
SET DEBUG_DBUG = '+d,do_page_reorganize';
61+
INSERT INTO t1 VALUES(0,0);
62+
DROP TABLE t1;
63+
5664
--source include/wait_until_count_sessions.inc

mysql-test/suite/innodb_fts/r/innodb-fts-ddl.result

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,3 +289,32 @@ ENGINE=InnoDB;
289289
ALTER TABLE t1 ADD c SERIAL;
290290
DROP TABLE t1;
291291
# End of 10.3 tests
292+
#
293+
# MDEV-27582 Fulltext DDL decrements the FTS_DOC_ID value
294+
#
295+
CREATE TABLE t1 (
296+
f1 INT NOT NULL PRIMARY KEY,
297+
f2 VARCHAR(64), FULLTEXT ft(f2)) ENGINE=InnoDB;
298+
INSERT INTO t1 VALUES (1,'foo'),(2,'bar');
299+
connect con1,localhost,root,,,;
300+
START TRANSACTION WITH CONSISTENT SNAPSHOT;
301+
connection default;
302+
DELETE FROM t1 WHERE f1 = 2;
303+
ALTER TABLE t1 DROP INDEX ft;
304+
ALTER TABLE t1 ADD FULLTEXT INDEX ft (f2);
305+
INSERT INTO t1 VALUES (3, 'innodb fts search');
306+
SET GLOBAL innodb_optimize_fulltext_only=ON;
307+
OPTIMIZE TABLE t1;
308+
Table Op Msg_type Msg_text
309+
test.t1 optimize status OK
310+
SET GLOBAL innodb_ft_aux_table = 'test/t1';
311+
SELECT max(DOC_ID) FROM INFORMATION_SCHEMA.INNODB_FT_INDEX_TABLE;
312+
max(DOC_ID)
313+
3
314+
SELECT * FROM t1 WHERE MATCH(f2) AGAINST("+innodb +search" IN BOOLEAN MODE);
315+
f1 f2
316+
3 innodb fts search
317+
DROP TABLE t1;
318+
disconnect con1;
319+
SET GLOBAL innodb_optimize_fulltext_only=OFF;
320+
SET GLOBAL innodb_ft_aux_table = default;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
--enable-plugin-innodb-sys-tables
2+
--innodb_ft_index_table

0 commit comments

Comments
 (0)