Skip to content

Commit 6286a05

Browse files
committed
Merge 10.4 into 10.5
2 parents 0792aff + 3c92050 commit 6286a05

File tree

80 files changed

+2760
-2483
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+2760
-2483
lines changed

CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,9 +268,11 @@ ENDIF()
268268

269269
INCLUDE(wsrep)
270270

271-
OPTION(WITH_DBUG_TRACE "Enable DBUG_ENTER()/DBUG_EXIT()" ON)
271+
OPTION(WITH_DBUG_TRACE "Enable DBUG_ENTER()/DBUG_RETURN()/DBUG_PRINT()" ON)
272272
IF(WITH_DBUG_TRACE)
273-
ADD_DEFINITIONS(-DDBUG_TRACE)
273+
FOREACH(LANG C CXX)
274+
SET(CMAKE_${LANG}_FLAGS_DEBUG "${CMAKE_${LANG}_FLAGS_DEBUG} -DDBUG_TRACE")
275+
ENDFOREACH()
274276
ENDIF()
275277

276278
# Always enable debug sync for debug builds.

Docs/README-wsrep

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ wsrep_forced_binlog_format=none
365365
special value NONE, meaning that there is no forced binlog format in effect.
366366
This variable was introduced to support STATEMENT format replication during
367367
rolling schema upgrade processing. However, in most cases ROW replication
368-
is valid for asymmetrict schema replication.
368+
is valid for asymmetric schema replication.
369369

370370
State snapshot transfer options.
371371

@@ -416,7 +416,7 @@ wsrep_sst_donor=
416416

417417
6. ONLINE SCHEMA UPGRADE
418418

419-
Schema upgrades mean any data definition statements (DDL statemnents) run
419+
Schema upgrades mean any data definition statements (DDL statements) run
420420
for the database. They change the database structure and are non-
421421
transactional.
422422

@@ -429,7 +429,7 @@ wsrep_sst_donor=
429429

430430
With earlier releases, DDL processing happened always by Total Order
431431
Isolation (TOI) method. With TOI, the DDL was scheduled to be processed in
432-
same transaction seqeuncing 'slot' in each cluster node.
432+
same transaction sequencing 'slot' in each cluster node.
433433
The processing is secured by locking the affected table from any other use.
434434
With TOI method, the whole cluster has part of the database locked for the
435435
duration of the DDL processing.

Docs/myisam.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ HA_EXTRA_NO_KEYREAD=8 Normal read of records (def)
177177
HA_EXTRA_NO_USER_CHANGE=9 No user is allowed to write
178178
HA_EXTRA_KEY_CACHE=10
179179
HA_EXTRA_NO_KEY_CACHE=11
180-
HA_EXTRA_WAIT_LOCK=12 Wait until file is avalably (def)
180+
HA_EXTRA_WAIT_LOCK=12 Wait until file is available (def)
181181
HA_EXTRA_NO_WAIT_LOCK=13 If file is locked, return quickly
182182
HA_EXTRA_WRITE_CACHE=14 Use write cache in ha_write()
183183
HA_EXTRA_FLUSH_CACHE=15 flush write_record_cache

include/my_dbug.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ extern int (*dbug_sanity)(void);
7777
_db_stack_frame_.line= 0; \
7878
} while(0)
7979

80+
#define DBUG_PRINT(keyword,arglist) \
81+
do if (_db_pargs_(__LINE__,keyword)) _db_doprnt_ arglist; while(0)
82+
8083
#ifdef HAVE_ATTRIBUTE_CLEANUP
8184
#define DBUG_ENTER(a) struct _db_stack_frame_ _db_stack_frame_ __attribute__((cleanup(_db_return_))); \
8285
_db_enter_ (a,__FILE__,__LINE__,&_db_stack_frame_)
@@ -94,6 +97,7 @@ extern int (*dbug_sanity)(void);
9497
#define DBUG_ENTER(a)
9598
#define DBUG_RETURN(a1) return(a1)
9699
#define DBUG_VOID_RETURN return
100+
#define DBUG_PRINT(keyword,arglist) do{} while(0)
97101
#endif
98102

99103
#define DBUG_EXECUTE(keyword,a1) \
@@ -104,9 +108,6 @@ extern int (*dbug_sanity)(void);
104108
(_db_keyword_(0,(keyword), 0) ? (a1) : (a2))
105109
#define DBUG_EVALUATE_IF(keyword,a1,a2) \
106110
(_db_keyword_(0,(keyword), 1) ? (a1) : (a2))
107-
#define DBUG_PRINT(keyword,arglist) \
108-
do if (_db_pargs_(__LINE__,keyword)) _db_doprnt_ arglist; while(0)
109-
110111
#define DBUG_PUSH_EMPTY if (_dbug_on_) { DBUG_PUSH(""); }
111112
#define DBUG_POP_EMPTY if (_dbug_on_) { DBUG_POP(); }
112113
#define DBUG_PUSH(a1) _db_push_ (a1)
@@ -170,6 +171,7 @@ extern void _db_suicide_(void);
170171
#define DBUG_LEAVE
171172
#define DBUG_RETURN(a1) do { return(a1); } while(0)
172173
#define DBUG_VOID_RETURN do { return; } while(0)
174+
#define DBUG_PRINT(keyword, arglist) do { } while(0)
173175
#define DBUG_EXECUTE(keyword,a1) do { } while(0)
174176
#define DBUG_EXECUTE_IF(keyword,a1) do { } while(0)
175177
#define DBUG_EVALUATE(keyword,a1,a2) (a2)

mysql-test/main/alter_table-big.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
--source include/big_test.inc
66
# We are using some debug-only features in this test
77
--source include/have_debug.inc
8+
--source include/have_debug_sync.inc
89
# Also we are using SBR to check that statements are executed
910
# in proper order.
1011
--source include/have_binlog_format_mixed_or_statement.inc

mysql-test/main/flush_read_lock_kill.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
--source include/not_embedded.inc
88

99
--source include/have_debug.inc
10+
--source include/have_debug_sync.inc
1011

1112
# This test needs transactional engine as otherwise COMMIT
1213
# won't block FLUSH TABLES WITH GLOBAL READ LOCK.

mysql-test/main/partition_sync.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
--source include/have_partition.inc
22
--source include/have_debug.inc
3+
--source include/have_debug_sync.inc
34
# Save the initial number of concurrent sessions.
45
--source include/count_sessions.inc
56

mysql-test/main/show_explain.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# Tests for SHOW EXPLAIN FOR functionality
33
#
44
--source include/have_debug.inc
5+
--source include/have_debug_sync.inc
56
--source include/have_innodb.inc
67

78

mysql-test/main/show_explain_non_select.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# SHOW EXPLAIN tests for non-select subqueries
33
#
44
--source include/have_debug.inc
5+
--source include/have_debug_sync.inc
56
--source include/have_innodb.inc
67
--source include/not_embedded.inc
78

mysql-test/main/view_debug.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11

22
--source include/have_debug.inc
3+
--source include/have_debug_sync.inc
34

45
--echo #
56
--echo #MDEV-8087:Server crashed in Time_and_counter_tracker::incr_loops

mysql-test/suite/encryption/r/debug_key_management.result

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ set global debug_key_management_version=10;
1515
select count(*) from information_schema.innodb_tablespaces_encryption where current_key_version <> 10;
1616
count(*)
1717
0
18-
SET GLOBAL debug_dbug = '+d,ib_log';
1918
SET GLOBAL innodb_log_checkpoint_now = 1;
2019
SET GLOBAL innodb_flush_log_at_trx_commit = 1;
2120
INSERT INTO t1 VALUES(NULL);

mysql-test/suite/encryption/t/debug_key_management.test

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ let $wait_condition= select count(*) = $tables_count from information_schema.inn
2525
select count(*) from information_schema.innodb_tablespaces_encryption where current_key_version <> 10;
2626

2727
# Test redo log key rotation and crash recovery.
28-
SET GLOBAL debug_dbug = '+d,ib_log';
2928
SET GLOBAL innodb_log_checkpoint_now = 1;
3029
SET GLOBAL innodb_flush_log_at_trx_commit = 1;
3130
INSERT INTO t1 VALUES(NULL);

mysql-test/suite/gcol/t/virtual_index_drop.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
--source include/have_innodb.inc
22
--source include/have_debug.inc
3+
--source include/have_debug_sync.inc
34

45
--echo #
56
--echo # MDEV-24971 InnoDB access freed virtual column

mysql-test/suite/innodb/r/innodb-table-online.result

Lines changed: 17 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,12 @@ ddl_log_file_alter_table 0
1818
SET DEBUG_SYNC = 'RESET';
1919
SET DEBUG_SYNC = 'write_row_noreplace SIGNAL have_handle WAIT_FOR go_ahead';
2020
INSERT INTO t1 VALUES(1,2,3);
21-
# Establish session con1 (user=root)
2221
connect con1,localhost,root,,;
23-
connection con1;
2422
SET DEBUG_SYNC = 'now WAIT_FOR have_handle';
2523
SET lock_wait_timeout = 1;
2624
ALTER TABLE t1 ROW_FORMAT=REDUNDANT;
2725
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
2826
SET DEBUG_SYNC = 'now SIGNAL go_ahead';
29-
# session default
3027
connection default;
3128
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
3229
SELECT name, count FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE subsystem = 'ddl';
@@ -37,7 +34,6 @@ ddl_online_create_index 0
3734
ddl_pending_alter_table 0
3835
ddl_sort_file_alter_table 0
3936
ddl_log_file_alter_table 0
40-
# session con1
4137
connection con1;
4238
SET @saved_debug_dbug = @@SESSION.debug_dbug;
4339
SET DEBUG_DBUG = '+d,innodb_OOM_prepare_inplace_alter';
@@ -55,7 +51,6 @@ SET SESSION DEBUG = @saved_debug_dbug;
5551
Warnings:
5652
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
5753
ALTER TABLE t1 ROW_FORMAT=REDUNDANT, ALGORITHM=INPLACE, LOCK=NONE;
58-
# session default
5954
connection default;
6055
SHOW CREATE TABLE t1;
6156
Table Create Table
@@ -67,22 +62,17 @@ t1 CREATE TABLE `t1` (
6762
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=REDUNDANT
6863
BEGIN;
6964
INSERT INTO t1 VALUES(7,4,2);
70-
# session con1
7165
connection con1;
7266
SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL scanned WAIT_FOR insert_done';
7367
ALTER TABLE t1 DROP PRIMARY KEY, ADD UNIQUE INDEX(c2);
7468
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
75-
# session default
7669
connection default;
7770
COMMIT;
78-
# session con1
7971
connection con1;
8072
ALTER TABLE t1 DROP PRIMARY KEY, ADD UNIQUE INDEX(c2);
8173
ERROR 23000: Duplicate entry '4' for key 'c2'
82-
# session default
8374
connection default;
8475
DELETE FROM t1 WHERE c1 = 7;
85-
# session con1
8676
connection con1;
8777
ALTER TABLE t1 DROP PRIMARY KEY, ADD UNIQUE INDEX(c2), ROW_FORMAT=COMPACT,
8878
LOCK = SHARED, ALGORITHM = INPLACE;
@@ -100,7 +90,6 @@ t1 CREATE TABLE `t1` (
10090
UNIQUE KEY `c2_2` (`c2`)
10191
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=COMPACT
10292
ALTER TABLE t1 DROP INDEX c2, ADD PRIMARY KEY(c1);
103-
# session default
10493
connection default;
10594
SET DEBUG_SYNC = 'now WAIT_FOR scanned';
10695
SELECT name, count FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE subsystem = 'ddl';
@@ -114,13 +103,10 @@ ddl_log_file_alter_table 0
114103
BEGIN;
115104
INSERT INTO t1 VALUES(4,7,2);
116105
SET DEBUG_SYNC = 'now SIGNAL insert_done';
117-
# session con1
118106
connection con1;
119107
ERROR 23000: Duplicate entry '4' for key 'PRIMARY'
120-
# session default
121108
connection default;
122109
ROLLBACK;
123-
# session con1
124110
connection con1;
125111
SHOW CREATE TABLE t1;
126112
Table Create Table
@@ -142,7 +128,6 @@ ddl_online_create_index 0
142128
ddl_pending_alter_table 0
143129
ddl_sort_file_alter_table 0
144130
ddl_log_file_alter_table 0
145-
# session default
146131
connection default;
147132
INSERT INTO t1 VALUES(6,3,1);
148133
ERROR 23000: Duplicate entry '3' for key 'c2_2'
@@ -152,14 +137,12 @@ DROP INDEX c2_2 ON t1;
152137
BEGIN;
153138
INSERT INTO t1 VALUES(7,4,2);
154139
ROLLBACK;
155-
# session con1
156140
connection con1;
157141
KILL QUERY @id;
158142
ERROR 70100: Query execution was interrupted
159143
SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL rebuilt WAIT_FOR dml_done';
160144
SET DEBUG_SYNC = 'row_log_table_apply2_before SIGNAL applied WAIT_FOR kill_done';
161145
ALTER TABLE t1 ROW_FORMAT=REDUNDANT;
162-
# session default
163146
connection default;
164147
SET DEBUG_SYNC = 'now WAIT_FOR rebuilt';
165148
SELECT name, count FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE subsystem = 'ddl';
@@ -176,7 +159,6 @@ ROLLBACK;
176159
SET DEBUG_SYNC = 'now SIGNAL dml_done WAIT_FOR applied';
177160
KILL QUERY @id;
178161
SET DEBUG_SYNC = 'now SIGNAL kill_done';
179-
# session con1
180162
connection con1;
181163
ERROR 70100: Query execution was interrupted
182164
SELECT name, count FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE subsystem = 'ddl';
@@ -187,7 +169,6 @@ ddl_online_create_index 0
187169
ddl_pending_alter_table 0
188170
ddl_sort_file_alter_table 0
189171
ddl_log_file_alter_table 0
190-
# session default
191172
connection default;
192173
CHECK TABLE t1;
193174
Table Op Msg_type Msg_text
@@ -212,7 +193,6 @@ WHERE variable_name = 'innodb_encryption_n_merge_blocks_decrypted');
212193
SET @rowlog_encrypt_0=
213194
(SELECT variable_value FROM information_schema.global_status
214195
WHERE variable_name = 'innodb_encryption_n_rowlog_blocks_encrypted');
215-
# session con1
216196
connection con1;
217197
SHOW CREATE TABLE t1;
218198
Table Create Table
@@ -227,7 +207,6 @@ SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL rebuilt2 WAIT_FOR dml2_done
227207
SET lock_wait_timeout = 10;
228208
ALTER TABLE t1 ROW_FORMAT=COMPACT
229209
PAGE_COMPRESSED = YES PAGE_COMPRESSION_LEVEL = 1, ALGORITHM = INPLACE;
230-
# session default
231210
connection default;
232211
INSERT INTO t1 SELECT 80 + c1, c2, c3 FROM t1;
233212
INSERT INTO t1 SELECT 160 + c1, c2, c3 FROM t1;
@@ -290,7 +269,6 @@ SELECT
290269
sort_balance @merge_encrypt_1>@merge_encrypt_0 @merge_decrypt_1>@merge_decrypt_0 @rowlog_encrypt_1>@rowlog_encrypt_0
291270
0 0 0 0
292271
SET DEBUG_SYNC = 'now SIGNAL dml2_done';
293-
# session con1
294272
connection con1;
295273
ERROR HY000: Creating index 'PRIMARY' required more than 'innodb_online_alter_log_max_size' bytes of modification log. Please try again
296274
SELECT name, count FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE subsystem = 'ddl';
@@ -321,7 +299,6 @@ ERROR 23000: Duplicate entry '5' for key 'PRIMARY'
321299
ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(c22f,c1,c4(5)),
322300
CHANGE c2 c22f INT, CHANGE c3 c3 CHAR(255) NULL, CHANGE c1 c1 INT AFTER c22f,
323301
ADD COLUMN c4 VARCHAR(6) DEFAULT 'Online', LOCK=NONE;
324-
# session default
325302
connection default;
326303
SET DEBUG_SYNC = 'now WAIT_FOR rebuilt3';
327304
SELECT name, count FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE subsystem = 'ddl';
@@ -349,7 +326,6 @@ ddl_pending_alter_table 1
349326
ddl_sort_file_alter_table 2
350327
ddl_log_file_alter_table 2
351328
SET DEBUG_SYNC = 'now SIGNAL dml3_done';
352-
# session con1
353329
connection con1;
354330
SELECT name, count FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE subsystem = 'ddl';
355331
name count
@@ -405,35 +381,29 @@ SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL c3p5_created0 WAIT_FOR ins_
405381
ALTER TABLE t1 MODIFY c3 CHAR(255) NOT NULL, DROP COLUMN c22f,
406382
DROP PRIMARY KEY, ADD PRIMARY KEY(c1,c4(5)),
407383
ADD COLUMN c5 CHAR(5) DEFAULT 'tired' FIRST;
408-
# session default
409384
connection default;
410385
SET DEBUG_SYNC = 'now WAIT_FOR c3p5_created0';
411386
BEGIN;
412387
INSERT INTO t1 VALUES(347,33101,'Pikku kakkosen posti','YLETV2');
413388
INSERT INTO t1 VALUES(33101,347,NULL,'');
414389
SET DEBUG_SYNC = 'now SIGNAL ins_done0';
415-
# session con1
416390
connection con1;
417391
ERROR 01000: Data truncated for column 'c3' at row 323
418-
# session default
419392
connection default;
420393
ROLLBACK;
421-
# session con1
422394
connection con1;
423395
ALTER TABLE t1 MODIFY c3 CHAR(255) NOT NULL;
424396
SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL c3p5_created WAIT_FOR ins_done';
425397
ALTER TABLE t1 DROP PRIMARY KEY, DROP COLUMN c22f,
426398
ADD COLUMN c6 VARCHAR(1000) DEFAULT
427399
'I love tracking down hard-to-reproduce bugs.',
428400
ADD PRIMARY KEY c3p5(c3(5), c6(2));
429-
# session default
430401
connection default;
431402
SET DEBUG_SYNC = 'now WAIT_FOR c3p5_created';
432403
SET DEBUG_SYNC = 'ib_after_row_insert SIGNAL ins_done WAIT_FOR ddl_timed_out';
433404
INSERT INTO t1 VALUES(347,33101,NULL,'');
434405
ERROR 23000: Column 'c3' cannot be null
435406
INSERT INTO t1 VALUES(347,33101,'Pikku kakkosen posti','');
436-
# session con1
437407
connection con1;
438408
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
439409
SET DEBUG_SYNC = 'now SIGNAL ddl_timed_out';
@@ -445,7 +415,6 @@ ddl_online_create_index 0
445415
ddl_pending_alter_table 0
446416
ddl_sort_file_alter_table 6
447417
ddl_log_file_alter_table 2
448-
# session default
449418
connection default;
450419
SELECT COUNT(*) FROM t1;
451420
COUNT(*)
@@ -463,12 +432,8 @@ c22f c1 c3 c4
463432
5 36 36foofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoo Online
464433
5 41 41foofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoo Online
465434
5 46 46foofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoo Online
466-
# session con1
467435
connection con1;
468436
ALTER TABLE t1 DISCARD TABLESPACE;
469-
# Disconnect session con1
470-
disconnect con1;
471-
# session default
472437
connection default;
473438
SHOW CREATE TABLE t1;
474439
Table Create Table
@@ -482,6 +447,23 @@ t1 CREATE TABLE `t1` (
482447
SET DEBUG_SYNC = 'RESET';
483448
SET GLOBAL innodb_monitor_disable = module_ddl;
484449
DROP TABLE t1;
450+
#
451+
# MDEV-29600 Memory leak in row_log_table_apply_update()
452+
#
453+
CREATE TABLE t1 (pk INT PRIMARY KEY, f TEXT) ENGINE=InnoDB;
454+
INSERT INTO t1 SET pk=1;
455+
connection con1;
456+
SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL created WAIT_FOR updated';
457+
ALTER TABLE t1 FORCE;
458+
connection default;
459+
SET DEBUG_SYNC = 'now WAIT_FOR created';
460+
UPDATE t1 SET f = REPEAT('a', 20000);
461+
SET DEBUG_SYNC = 'now SIGNAL updated';
462+
connection con1;
463+
disconnect con1;
464+
connection default;
465+
DROP TABLE t1;
466+
SET DEBUG_SYNC = 'RESET';
485467
SET GLOBAL innodb_file_per_table = @global_innodb_file_per_table_orig;
486468
SET GLOBAL innodb_monitor_enable = default;
487469
SET GLOBAL innodb_monitor_disable = default;

0 commit comments

Comments
 (0)