Skip to content
Permalink
Browse files
Merge 10.5 into 10.6
  • Loading branch information
dr-m committed Sep 26, 2022
2 parents 70701ee + fe7c95e commit 829e811
Show file tree
Hide file tree
Showing 80 changed files with 2,742 additions and 2,426 deletions.
@@ -256,9 +256,11 @@ ENDIF()

INCLUDE(wsrep)

OPTION(WITH_DBUG_TRACE "Enable DBUG_ENTER()/DBUG_EXIT()" ON)
OPTION(WITH_DBUG_TRACE "Enable DBUG_ENTER()/DBUG_RETURN()/DBUG_PRINT()" ON)
IF(WITH_DBUG_TRACE)
ADD_DEFINITIONS(-DDBUG_TRACE)
FOREACH(LANG C CXX)
SET(CMAKE_${LANG}_FLAGS_DEBUG "${CMAKE_${LANG}_FLAGS_DEBUG} -DDBUG_TRACE")
ENDFOREACH()
ENDIF()

# Always enable debug sync for debug builds.
@@ -365,7 +365,7 @@ wsrep_forced_binlog_format=none
special value NONE, meaning that there is no forced binlog format in effect.
This variable was introduced to support STATEMENT format replication during
rolling schema upgrade processing. However, in most cases ROW replication
is valid for asymmetrict schema replication.
is valid for asymmetric schema replication.

State snapshot transfer options.

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

6. ONLINE SCHEMA UPGRADE

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

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

With earlier releases, DDL processing happened always by Total Order
Isolation (TOI) method. With TOI, the DDL was scheduled to be processed in
same transaction seqeuncing 'slot' in each cluster node.
same transaction sequencing 'slot' in each cluster node.
The processing is secured by locking the affected table from any other use.
With TOI method, the whole cluster has part of the database locked for the
duration of the DDL processing.
@@ -177,7 +177,7 @@ HA_EXTRA_NO_KEYREAD=8 Normal read of records (def)
HA_EXTRA_NO_USER_CHANGE=9 No user is allowed to write
HA_EXTRA_KEY_CACHE=10
HA_EXTRA_NO_KEY_CACHE=11
HA_EXTRA_WAIT_LOCK=12 Wait until file is avalably (def)
HA_EXTRA_WAIT_LOCK=12 Wait until file is available (def)
HA_EXTRA_NO_WAIT_LOCK=13 If file is locked, return quickly
HA_EXTRA_WRITE_CACHE=14 Use write cache in ha_write()
HA_EXTRA_FLUSH_CACHE=15 flush write_record_cache
@@ -77,6 +77,9 @@ extern int (*dbug_sanity)(void);
_db_stack_frame_.line= 0; \
} while(0)

#define DBUG_PRINT(keyword,arglist) \
do if (_db_pargs_(__LINE__,keyword)) _db_doprnt_ arglist; while(0)

#ifdef HAVE_ATTRIBUTE_CLEANUP
#define DBUG_ENTER(a) struct _db_stack_frame_ _db_stack_frame_ __attribute__((cleanup(_db_return_))); \
_db_enter_ (a,__FILE__,__LINE__,&_db_stack_frame_)
@@ -94,6 +97,7 @@ extern int (*dbug_sanity)(void);
#define DBUG_ENTER(a)
#define DBUG_RETURN(a1) return(a1)
#define DBUG_VOID_RETURN return
#define DBUG_PRINT(keyword,arglist) do{} while(0)
#endif

#define DBUG_EXECUTE(keyword,a1) \
@@ -104,9 +108,6 @@ extern int (*dbug_sanity)(void);
(_db_keyword_(0,(keyword), 0) ? (a1) : (a2))
#define DBUG_EVALUATE_IF(keyword,a1,a2) \
(_db_keyword_(0,(keyword), 1) ? (a1) : (a2))
#define DBUG_PRINT(keyword,arglist) \
do if (_db_pargs_(__LINE__,keyword)) _db_doprnt_ arglist; while(0)

#define DBUG_PUSH_EMPTY if (_dbug_on_) { DBUG_PUSH(""); }
#define DBUG_POP_EMPTY if (_dbug_on_) { DBUG_POP(); }
#define DBUG_PUSH(a1) _db_push_ (a1)
@@ -170,6 +171,7 @@ extern void _db_suicide_(void);
#define DBUG_LEAVE
#define DBUG_RETURN(a1) do { return(a1); } while(0)
#define DBUG_VOID_RETURN do { return; } while(0)
#define DBUG_PRINT(keyword, arglist) do { } while(0)
#define DBUG_EXECUTE(keyword,a1) do { } while(0)
#define DBUG_EXECUTE_IF(keyword,a1) do { } while(0)
#define DBUG_EVALUATE(keyword,a1,a2) (a2)
@@ -5,6 +5,7 @@
--source include/big_test.inc
# We are using some debug-only features in this test
--source include/have_debug.inc
--source include/have_debug_sync.inc
# Also we are using SBR to check that statements are executed
# in proper order.
--source include/have_binlog_format_mixed_or_statement.inc
@@ -7,6 +7,7 @@
--source include/not_embedded.inc

--source include/have_debug.inc
--source include/have_debug_sync.inc

# This test needs transactional engine as otherwise COMMIT
# won't block FLUSH TABLES WITH GLOBAL READ LOCK.
@@ -1,5 +1,6 @@
--source include/have_partition.inc
--source include/have_debug.inc
--source include/have_debug_sync.inc
# Save the initial number of concurrent sessions.
--source include/count_sessions.inc

@@ -2,6 +2,7 @@
# Tests for SHOW EXPLAIN FOR functionality
#
--source include/have_debug.inc
--source include/have_debug_sync.inc
--source include/have_innodb.inc
# Using valgrind can cause 'reap' to fail. See comment below
--source include/not_valgrind.inc
@@ -2,6 +2,7 @@
# SHOW EXPLAIN tests for non-select subqueries
#
--source include/have_debug.inc
--source include/have_debug_sync.inc
--source include/have_innodb.inc
--source include/not_embedded.inc

@@ -1,5 +1,6 @@

--source include/have_debug.inc
--source include/have_debug_sync.inc

--echo #
--echo #MDEV-8087:Server crashed in Time_and_counter_tracker::incr_loops
@@ -15,7 +15,6 @@ set global debug_key_management_version=10;
select count(*) from information_schema.innodb_tablespaces_encryption where current_key_version <> 10;
count(*)
0
SET GLOBAL debug_dbug = '+d,ib_log';
SET GLOBAL innodb_log_checkpoint_now = 1;
SET GLOBAL innodb_flush_log_at_trx_commit = 1;
INSERT INTO t1 VALUES(NULL);
@@ -25,7 +25,6 @@ let $wait_condition= select count(*) = $tables_count from information_schema.inn
select count(*) from information_schema.innodb_tablespaces_encryption where current_key_version <> 10;

# Test redo log key rotation and crash recovery.
SET GLOBAL debug_dbug = '+d,ib_log';
SET GLOBAL innodb_log_checkpoint_now = 1;
SET GLOBAL innodb_flush_log_at_trx_commit = 1;
INSERT INTO t1 VALUES(NULL);
@@ -1,5 +1,6 @@
--source include/have_innodb.inc
--source include/have_debug.inc
--source include/have_debug_sync.inc

--echo #
--echo # MDEV-24971 InnoDB access freed virtual column
@@ -433,13 +433,29 @@ INSERT INTO t1 VALUES(1, repeat('a', 10000));
ROLLBACK;
SET DEBUG_SYNC = 'now SIGNAL ins';
connection con1;
disconnect con1;
connection default;
SELECT * FROM t1;
a b
0 NULL
DROP TABLE t1;
SET DEBUG_SYNC = 'RESET';
#
# MDEV-29600 Memory leak in row_log_table_apply_update()
#
CREATE TABLE t1 (pk INT PRIMARY KEY, f TEXT) ENGINE=InnoDB;
INSERT INTO t1 SET pk=1;
connection con1;
SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL created WAIT_FOR updated';
ALTER TABLE t1 FORCE;
connection default;
SET DEBUG_SYNC = 'now WAIT_FOR created';
UPDATE t1 SET f = REPEAT('a', 20000);
SET DEBUG_SYNC = 'now SIGNAL updated';
connection con1;
disconnect con1;
connection default;
DROP TABLE t1;
SET DEBUG_SYNC = 'RESET';
SET GLOBAL innodb_file_per_table = @global_innodb_file_per_table_orig;
SET GLOBAL innodb_monitor_enable = default;
SET GLOBAL innodb_monitor_disable = default;
@@ -9,10 +9,9 @@ CREATE TABLE t1(a INT PRIMARY KEY) ENGINE=InnoDB;
SELECT * FROM t1;
ERROR 42000: Unknown storage engine 'InnoDB'
FOUND 1 /InnoDB: Tablespace 4294967280 was not found at .*, but there were no modifications either/ in mysqld.1.err
# restart: --debug=d,innodb_log_abort_3,ib_log --innodb-log-file-size=4194304
# restart: --debug=d,innodb_log_abort_3 --innodb-log-file-size=4194304
SELECT * FROM t1;
ERROR 42000: Unknown storage engine 'InnoDB'
FOUND 1 /ib_log: FILE_CHECKPOINT.* written/ in mysqld.1.err
# restart
# restart
DROP TABLE t1;
@@ -1,5 +1,6 @@
--source include/have_innodb.inc
--source include/have_debug.inc
--source include/have_debug_sync.inc
--source include/have_sequence.inc

CREATE TABLE t1(f1 INT NOT NULL, f2 INT NOT NULL,
@@ -1,5 +1,6 @@
--source include/have_innodb.inc
--source include/have_debug.inc
--source include/have_debug_sync.inc

create table t1(f1 char(10), f2 char(10) not null, f3 int not null,
f4 int not null, primary key(f3))engine=innodb;
@@ -1,5 +1,6 @@
--source include/have_innodb.inc
--source include/have_debug.inc
--source include/have_debug_sync.inc
--source include/not_embedded.inc

# Two parallel connection with autoinc column after restart.
@@ -1,7 +1,8 @@
--source include/maybe_debug.inc
--source include/innodb_page_size_small.inc
--source include/no_valgrind_without_big.inc

let $have_debug_sync=`select count(*) = 1 from information_schema.session_variables where variable_name = 'debug_sync' and variable_value like 'on %'`;

--echo #
--echo # Bug #16963396 INNODB: USE OF LARGE EXTERNALLY-STORED FIELDS MAKES
--echo # CRASH RECOVERY LOSE DATA
@@ -95,15 +96,15 @@ select f1, right(f2, 20), right(f3, 20) from t2;
update t2 set f3 = '&';
select f1, right(f2, 20), right(f3, 20) from t2;

if ($have_debug) {
if ($have_debug_sync) {
--disable_query_log
set DEBUG_SYNC='blob_rollback_middle SIGNAL stuck WAIT_FOR ever';
send ROLLBACK;
--enable_query_log
}

connection default;
if ($have_debug) {
if ($have_debug_sync) {
--disable_query_log
SET DEBUG_SYNC = 'now WAIT_FOR stuck';
--enable_query_log
@@ -396,13 +396,36 @@ SET DEBUG_SYNC = 'now SIGNAL ins';

connection con1;
reap;
disconnect con1;

connection default;
SELECT * FROM t1;
DROP TABLE t1;
SET DEBUG_SYNC = 'RESET';

--echo #
--echo # MDEV-29600 Memory leak in row_log_table_apply_update()
--echo #

CREATE TABLE t1 (pk INT PRIMARY KEY, f TEXT) ENGINE=InnoDB;
INSERT INTO t1 SET pk=1;

connection con1;
SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL created WAIT_FOR updated';
send ALTER TABLE t1 FORCE;

connection default;
SET DEBUG_SYNC = 'now WAIT_FOR created';
UPDATE t1 SET f = REPEAT('a', 20000);
SET DEBUG_SYNC = 'now SIGNAL updated';

connection con1;
reap;
disconnect con1;

connection default;
DROP TABLE t1;
SET DEBUG_SYNC = 'RESET';

# Check that all connections opened by test cases in this file are really
# gone so execution of other tests won't be affected by their presence.
--source include/wait_until_count_sessions.inc
@@ -36,12 +36,10 @@ SELECT * FROM t1;
--let SEARCH_PATTERN = InnoDB: Tablespace 4294967280 was not found at .*, but there were no modifications either
--source include/search_pattern_in_file.inc

--let $restart_parameters= --debug=d,innodb_log_abort_3,ib_log $resize
--let $restart_parameters= --debug=d,innodb_log_abort_3 $resize
--source include/restart_mysqld.inc
--error ER_UNKNOWN_STORAGE_ENGINE
SELECT * FROM t1;
--let SEARCH_PATTERN= ib_log: FILE_CHECKPOINT.* written
--source include/search_pattern_in_file.inc

--let $restart_parameters=
--source include/restart_mysqld.inc
@@ -1,5 +1,6 @@
--source include/have_innodb.inc
--source include/have_debug.inc
--source include/have_debug_sync.inc
--source include/have_sequence.inc

CREATE TABLE t1(f1 INT NOT NULL, f2 CHAR(200), f3 CHAR(200))ENGINE=InnoDB;
@@ -1,5 +1,6 @@
--source include/have_innodb.inc
--source include/have_debug.inc
--source include/have_debug_sync.inc

# The test demonstrates that intermediate tables (ALTER TABLE...ALGORITHM=COPY)
# will not be included in a backup.
@@ -1,5 +1,6 @@
--source include/have_innodb.inc
--source include/have_debug.inc
--source include/have_debug_sync.inc

# The test demonstrates that intermediate tables (ALTER TABLE...ALGORITHM=COPY)
# are not always properly locked, e.g., can be dropped after

0 comments on commit 829e811

Please sign in to comment.