Merge 10.4 into 10.5

This commit is contained in:
Marko Mäkelä 2022-09-26 13:34:38 +03:00
commit 6286a05d80
80 changed files with 2760 additions and 2483 deletions

View file

@ -268,9 +268,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.

View file

@ -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.

View file

@ -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

View file

@ -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)

View file

@ -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

View file

@ -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.

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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);

View file

@ -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);

View file

@ -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

View file

@ -18,15 +18,12 @@ ddl_log_file_alter_table 0
SET DEBUG_SYNC = 'RESET';
SET DEBUG_SYNC = 'write_row_noreplace SIGNAL have_handle WAIT_FOR go_ahead';
INSERT INTO t1 VALUES(1,2,3);
# Establish session con1 (user=root)
connect con1,localhost,root,,;
connection con1;
SET DEBUG_SYNC = 'now WAIT_FOR have_handle';
SET lock_wait_timeout = 1;
ALTER TABLE t1 ROW_FORMAT=REDUNDANT;
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
SET DEBUG_SYNC = 'now SIGNAL go_ahead';
# session default
connection default;
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
SELECT name, count FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE subsystem = 'ddl';
@ -37,7 +34,6 @@ ddl_online_create_index 0
ddl_pending_alter_table 0
ddl_sort_file_alter_table 0
ddl_log_file_alter_table 0
# session con1
connection con1;
SET @saved_debug_dbug = @@SESSION.debug_dbug;
SET DEBUG_DBUG = '+d,innodb_OOM_prepare_inplace_alter';
@ -55,7 +51,6 @@ SET SESSION DEBUG = @saved_debug_dbug;
Warnings:
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
ALTER TABLE t1 ROW_FORMAT=REDUNDANT, ALGORITHM=INPLACE, LOCK=NONE;
# session default
connection default;
SHOW CREATE TABLE t1;
Table Create Table
@ -67,22 +62,17 @@ t1 CREATE TABLE `t1` (
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=REDUNDANT
BEGIN;
INSERT INTO t1 VALUES(7,4,2);
# session con1
connection con1;
SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL scanned WAIT_FOR insert_done';
ALTER TABLE t1 DROP PRIMARY KEY, ADD UNIQUE INDEX(c2);
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
# session default
connection default;
COMMIT;
# session con1
connection con1;
ALTER TABLE t1 DROP PRIMARY KEY, ADD UNIQUE INDEX(c2);
ERROR 23000: Duplicate entry '4' for key 'c2'
# session default
connection default;
DELETE FROM t1 WHERE c1 = 7;
# session con1
connection con1;
ALTER TABLE t1 DROP PRIMARY KEY, ADD UNIQUE INDEX(c2), ROW_FORMAT=COMPACT,
LOCK = SHARED, ALGORITHM = INPLACE;
@ -100,7 +90,6 @@ t1 CREATE TABLE `t1` (
UNIQUE KEY `c2_2` (`c2`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=COMPACT
ALTER TABLE t1 DROP INDEX c2, ADD PRIMARY KEY(c1);
# session default
connection default;
SET DEBUG_SYNC = 'now WAIT_FOR scanned';
SELECT name, count FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE subsystem = 'ddl';
@ -114,13 +103,10 @@ ddl_log_file_alter_table 0
BEGIN;
INSERT INTO t1 VALUES(4,7,2);
SET DEBUG_SYNC = 'now SIGNAL insert_done';
# session con1
connection con1;
ERROR 23000: Duplicate entry '4' for key 'PRIMARY'
# session default
connection default;
ROLLBACK;
# session con1
connection con1;
SHOW CREATE TABLE t1;
Table Create Table
@ -142,7 +128,6 @@ ddl_online_create_index 0
ddl_pending_alter_table 0
ddl_sort_file_alter_table 0
ddl_log_file_alter_table 0
# session default
connection default;
INSERT INTO t1 VALUES(6,3,1);
ERROR 23000: Duplicate entry '3' for key 'c2_2'
@ -152,14 +137,12 @@ DROP INDEX c2_2 ON t1;
BEGIN;
INSERT INTO t1 VALUES(7,4,2);
ROLLBACK;
# session con1
connection con1;
KILL QUERY @id;
ERROR 70100: Query execution was interrupted
SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL rebuilt WAIT_FOR dml_done';
SET DEBUG_SYNC = 'row_log_table_apply2_before SIGNAL applied WAIT_FOR kill_done';
ALTER TABLE t1 ROW_FORMAT=REDUNDANT;
# session default
connection default;
SET DEBUG_SYNC = 'now WAIT_FOR rebuilt';
SELECT name, count FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE subsystem = 'ddl';
@ -176,7 +159,6 @@ ROLLBACK;
SET DEBUG_SYNC = 'now SIGNAL dml_done WAIT_FOR applied';
KILL QUERY @id;
SET DEBUG_SYNC = 'now SIGNAL kill_done';
# session con1
connection con1;
ERROR 70100: Query execution was interrupted
SELECT name, count FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE subsystem = 'ddl';
@ -187,7 +169,6 @@ ddl_online_create_index 0
ddl_pending_alter_table 0
ddl_sort_file_alter_table 0
ddl_log_file_alter_table 0
# session default
connection default;
CHECK TABLE t1;
Table Op Msg_type Msg_text
@ -212,7 +193,6 @@ WHERE variable_name = 'innodb_encryption_n_merge_blocks_decrypted');
SET @rowlog_encrypt_0=
(SELECT variable_value FROM information_schema.global_status
WHERE variable_name = 'innodb_encryption_n_rowlog_blocks_encrypted');
# session con1
connection con1;
SHOW CREATE TABLE t1;
Table Create Table
@ -227,7 +207,6 @@ SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL rebuilt2 WAIT_FOR dml2_done
SET lock_wait_timeout = 10;
ALTER TABLE t1 ROW_FORMAT=COMPACT
PAGE_COMPRESSED = YES PAGE_COMPRESSION_LEVEL = 1, ALGORITHM = INPLACE;
# session default
connection default;
INSERT INTO t1 SELECT 80 + c1, c2, c3 FROM t1;
INSERT INTO t1 SELECT 160 + c1, c2, c3 FROM t1;
@ -290,7 +269,6 @@ SELECT
sort_balance @merge_encrypt_1>@merge_encrypt_0 @merge_decrypt_1>@merge_decrypt_0 @rowlog_encrypt_1>@rowlog_encrypt_0
0 0 0 0
SET DEBUG_SYNC = 'now SIGNAL dml2_done';
# session con1
connection con1;
ERROR HY000: Creating index 'PRIMARY' required more than 'innodb_online_alter_log_max_size' bytes of modification log. Please try again
SELECT name, count FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE subsystem = 'ddl';
@ -321,7 +299,6 @@ ERROR 23000: Duplicate entry '5' for key 'PRIMARY'
ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(c22f,c1,c4(5)),
CHANGE c2 c22f INT, CHANGE c3 c3 CHAR(255) NULL, CHANGE c1 c1 INT AFTER c22f,
ADD COLUMN c4 VARCHAR(6) DEFAULT 'Online', LOCK=NONE;
# session default
connection default;
SET DEBUG_SYNC = 'now WAIT_FOR rebuilt3';
SELECT name, count FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE subsystem = 'ddl';
@ -349,7 +326,6 @@ ddl_pending_alter_table 1
ddl_sort_file_alter_table 2
ddl_log_file_alter_table 2
SET DEBUG_SYNC = 'now SIGNAL dml3_done';
# session con1
connection con1;
SELECT name, count FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE subsystem = 'ddl';
name count
@ -405,20 +381,16 @@ SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL c3p5_created0 WAIT_FOR ins_
ALTER TABLE t1 MODIFY c3 CHAR(255) NOT NULL, DROP COLUMN c22f,
DROP PRIMARY KEY, ADD PRIMARY KEY(c1,c4(5)),
ADD COLUMN c5 CHAR(5) DEFAULT 'tired' FIRST;
# session default
connection default;
SET DEBUG_SYNC = 'now WAIT_FOR c3p5_created0';
BEGIN;
INSERT INTO t1 VALUES(347,33101,'Pikku kakkosen posti','YLETV2');
INSERT INTO t1 VALUES(33101,347,NULL,'');
SET DEBUG_SYNC = 'now SIGNAL ins_done0';
# session con1
connection con1;
ERROR 01000: Data truncated for column 'c3' at row 323
# session default
connection default;
ROLLBACK;
# session con1
connection con1;
ALTER TABLE t1 MODIFY c3 CHAR(255) NOT NULL;
SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL c3p5_created WAIT_FOR ins_done';
@ -426,14 +398,12 @@ ALTER TABLE t1 DROP PRIMARY KEY, DROP COLUMN c22f,
ADD COLUMN c6 VARCHAR(1000) DEFAULT
'I love tracking down hard-to-reproduce bugs.',
ADD PRIMARY KEY c3p5(c3(5), c6(2));
# session default
connection default;
SET DEBUG_SYNC = 'now WAIT_FOR c3p5_created';
SET DEBUG_SYNC = 'ib_after_row_insert SIGNAL ins_done WAIT_FOR ddl_timed_out';
INSERT INTO t1 VALUES(347,33101,NULL,'');
ERROR 23000: Column 'c3' cannot be null
INSERT INTO t1 VALUES(347,33101,'Pikku kakkosen posti','');
# session con1
connection con1;
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
SET DEBUG_SYNC = 'now SIGNAL ddl_timed_out';
@ -445,7 +415,6 @@ ddl_online_create_index 0
ddl_pending_alter_table 0
ddl_sort_file_alter_table 6
ddl_log_file_alter_table 2
# session default
connection default;
SELECT COUNT(*) FROM t1;
COUNT(*)
@ -463,12 +432,8 @@ c22f c1 c3 c4
5 36 36foofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoo Online
5 41 41foofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoo Online
5 46 46foofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoo Online
# session con1
connection con1;
ALTER TABLE t1 DISCARD TABLESPACE;
# Disconnect session con1
disconnect con1;
# session default
connection default;
SHOW CREATE TABLE t1;
Table Create Table
@ -482,6 +447,23 @@ t1 CREATE TABLE `t1` (
SET DEBUG_SYNC = 'RESET';
SET GLOBAL innodb_monitor_disable = module_ddl;
DROP TABLE t1;
#
# 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;

View file

@ -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;

View file

@ -4,6 +4,7 @@
--source include/not_embedded.inc
--source include/have_innodb.inc
--source include/have_debug.inc
--source include/have_debug_sync.inc
--source include/not_crashrep.inc
--disable_query_log

View file

@ -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;

View file

@ -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.

View file

@ -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,7 +96,7 @@ 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;
@ -103,7 +104,7 @@ send ROLLBACK;
}
connection default;
if ($have_debug) {
if ($have_debug_sync) {
--disable_query_log
SET DEBUG_SYNC = 'now WAIT_FOR stuck';
--enable_query_log

View file

@ -30,9 +30,7 @@ SET DEBUG_SYNC = 'write_row_noreplace SIGNAL have_handle WAIT_FOR go_ahead';
--send
INSERT INTO t1 VALUES(1,2,3);
--echo # Establish session con1 (user=root)
connect (con1,localhost,root,,);
connection con1;
# This should block at the end because of the INSERT in connection default
# is holding a metadata lock.
@ -42,13 +40,11 @@ SET lock_wait_timeout = 1;
ALTER TABLE t1 ROW_FORMAT=REDUNDANT;
SET DEBUG_SYNC = 'now SIGNAL go_ahead';
--echo # session default
connection default;
--error ER_DUP_ENTRY
reap;
eval $innodb_metrics_select;
--echo # session con1
connection con1;
SET @saved_debug_dbug = @@SESSION.debug_dbug;
SET DEBUG_DBUG = '+d,innodb_OOM_prepare_inplace_alter';
@ -61,14 +57,12 @@ ALTER TABLE t1 ROW_FORMAT=REDUNDANT, ALGORITHM=INPLACE, LOCK=NONE;
SET SESSION DEBUG = @saved_debug_dbug;
ALTER TABLE t1 ROW_FORMAT=REDUNDANT, ALGORITHM=INPLACE, LOCK=NONE;
--echo # session default
connection default;
SHOW CREATE TABLE t1;
# Insert a duplicate entry (4) for the upcoming UNIQUE INDEX(c2).
BEGIN;
INSERT INTO t1 VALUES(7,4,2);
--echo # session con1
connection con1;
# This DEBUG_SYNC should not kick in yet, because the duplicate key will be
# detected before we get a chance to apply the online log.
@ -78,20 +72,16 @@ SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL scanned WAIT_FOR insert_don
--error ER_LOCK_WAIT_TIMEOUT
ALTER TABLE t1 DROP PRIMARY KEY, ADD UNIQUE INDEX(c2);
--echo # session default
connection default;
COMMIT;
--echo # session con1
connection con1;
--error ER_DUP_ENTRY
ALTER TABLE t1 DROP PRIMARY KEY, ADD UNIQUE INDEX(c2);
--echo # session default
connection default;
DELETE FROM t1 WHERE c1 = 7;
--echo # session con1
connection con1;
ALTER TABLE t1 DROP PRIMARY KEY, ADD UNIQUE INDEX(c2), ROW_FORMAT=COMPACT,
LOCK = SHARED, ALGORITHM = INPLACE;
@ -106,7 +96,6 @@ SHOW CREATE TABLE t1;
--send
ALTER TABLE t1 DROP INDEX c2, ADD PRIMARY KEY(c1);
--echo # session default
connection default;
SET DEBUG_SYNC = 'now WAIT_FOR scanned';
eval $innodb_metrics_select;
@ -116,7 +105,6 @@ BEGIN;
INSERT INTO t1 VALUES(4,7,2);
SET DEBUG_SYNC = 'now SIGNAL insert_done';
--echo # session con1
connection con1;
# Because the modification log will be applied in order and we did
# not roll back before the log apply, there will be a duplicate key
@ -124,11 +112,9 @@ connection con1;
--error ER_DUP_ENTRY
reap;
--echo # session default
connection default;
ROLLBACK;
--echo # session con1
connection con1;
SHOW CREATE TABLE t1;
# Now, rebuild the table without any concurrent DML, while no duplicate exists.
@ -137,7 +123,6 @@ ALTER TABLE t1 DROP PRIMARY KEY, ADD UNIQUE INDEX(c2), ALGORITHM = INPLACE;
ALTER TABLE t1 DROP INDEX c2, ADD PRIMARY KEY(c1), ALGORITHM = INPLACE;
eval $innodb_metrics_select;
--echo # session default
connection default;
--error ER_DUP_ENTRY
INSERT INTO t1 VALUES(6,3,1);
@ -148,7 +133,6 @@ BEGIN;
INSERT INTO t1 VALUES(7,4,2);
ROLLBACK;
--echo # session con1
connection con1;
let $ID= `SELECT @id := CONNECTION_ID()`;
--error ER_QUERY_INTERRUPTED
@ -159,7 +143,6 @@ SET DEBUG_SYNC = 'row_log_table_apply2_before SIGNAL applied WAIT_FOR kill_done'
--send
ALTER TABLE t1 ROW_FORMAT=REDUNDANT;
--echo # session default
connection default;
SET DEBUG_SYNC = 'now WAIT_FOR rebuilt';
eval $innodb_metrics_select;
@ -171,13 +154,11 @@ let $ignore= `SELECT @id := $ID`;
KILL QUERY @id;
SET DEBUG_SYNC = 'now SIGNAL kill_done';
--echo # session con1
connection con1;
--error ER_QUERY_INTERRUPTED
reap;
eval $innodb_metrics_select;
--echo # session default
connection default;
CHECK TABLE t1;
INSERT INTO t1 SELECT 5 + c1, c2, c3 FROM t1;
@ -199,7 +180,6 @@ SET @rowlog_encrypt_0=
(SELECT variable_value FROM information_schema.global_status
WHERE variable_name = 'innodb_encryption_n_rowlog_blocks_encrypted');
--echo # session con1
connection con1;
SHOW CREATE TABLE t1;
ALTER TABLE t1 ROW_FORMAT=REDUNDANT;
@ -217,7 +197,6 @@ PAGE_COMPRESSED = YES PAGE_COMPRESSION_LEVEL = 1, ALGORITHM = INPLACE;
# Generate some log (delete-mark, delete-unmark, insert etc.)
# while the index creation is blocked. Some of this may run
# in parallel with the clustered index scan.
--echo # session default
connection default;
INSERT INTO t1 SELECT 80 + c1, c2, c3 FROM t1;
INSERT INTO t1 SELECT 160 + c1, c2, c3 FROM t1;
@ -261,7 +240,6 @@ SELECT
# Release con1.
SET DEBUG_SYNC = 'now SIGNAL dml2_done';
--echo # session con1
connection con1;
# If the following fails with the wrong error, it probably means that
# you should rerun with a larger mtr --debug-sync-timeout.
@ -295,7 +273,6 @@ ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(c22f,c1,c4(5)),
CHANGE c2 c22f INT, CHANGE c3 c3 CHAR(255) NULL, CHANGE c1 c1 INT AFTER c22f,
ADD COLUMN c4 VARCHAR(6) DEFAULT 'Online', LOCK=NONE;
--echo # session default
connection default;
SET DEBUG_SYNC = 'now WAIT_FOR rebuilt3';
# Generate some log (delete-mark, delete-unmark, insert etc.)
@ -312,7 +289,6 @@ eval $innodb_metrics_select;
# Release con1.
SET DEBUG_SYNC = 'now SIGNAL dml3_done';
--echo # session con1
connection con1;
reap;
eval $innodb_metrics_select;
@ -365,7 +341,6 @@ ALTER TABLE t1 MODIFY c3 CHAR(255) NOT NULL, DROP COLUMN c22f,
DROP PRIMARY KEY, ADD PRIMARY KEY(c1,c4(5)),
ADD COLUMN c5 CHAR(5) DEFAULT 'tired' FIRST;
--echo # session default
connection default;
SET DEBUG_SYNC = 'now WAIT_FOR c3p5_created0';
@ -374,16 +349,13 @@ INSERT INTO t1 VALUES(347,33101,'Pikku kakkosen posti','YLETV2');
INSERT INTO t1 VALUES(33101,347,NULL,'');
SET DEBUG_SYNC = 'now SIGNAL ins_done0';
--echo # session con1
connection con1;
--error WARN_DATA_TRUNCATED
reap;
--echo # session default
connection default;
ROLLBACK;
--echo # session con1
connection con1;
ALTER TABLE t1 MODIFY c3 CHAR(255) NOT NULL;
@ -394,7 +366,6 @@ ADD COLUMN c6 VARCHAR(1000) DEFAULT
'I love tracking down hard-to-reproduce bugs.',
ADD PRIMARY KEY c3p5(c3(5), c6(2));
--echo # session default
connection default;
SET DEBUG_SYNC = 'now WAIT_FOR c3p5_created';
SET DEBUG_SYNC = 'ib_after_row_insert SIGNAL ins_done WAIT_FOR ddl_timed_out';
@ -403,33 +374,51 @@ INSERT INTO t1 VALUES(347,33101,NULL,'');
--send
INSERT INTO t1 VALUES(347,33101,'Pikku kakkosen posti','');
--echo # session con1
connection con1;
--error ER_LOCK_WAIT_TIMEOUT
reap;
SET DEBUG_SYNC = 'now SIGNAL ddl_timed_out';
eval $innodb_metrics_select;
--echo # session default
connection default;
reap;
SELECT COUNT(*) FROM t1;
ALTER TABLE t1 ROW_FORMAT=REDUNDANT;
SELECT * FROM t1 LIMIT 10;
--echo # session con1
connection con1;
ALTER TABLE t1 DISCARD TABLESPACE;
--echo # Disconnect session con1
disconnect con1;
--echo # session default
connection default;
SHOW CREATE TABLE t1;
SET DEBUG_SYNC = 'RESET';
SET GLOBAL innodb_monitor_disable = module_ddl;
DROP TABLE t1;
--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

View file

@ -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

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,767 @@
include/rpl_init.inc [topology=1->2->3]
connection server_1;
connection server_2;
connection server_3;
connection server_1;
#
# binlog_row_image=FULL should write all columns to the binary log
#
CON: 'server_1', IMG: 'FULL', RESTART SLAVE: 'N'
connection server_1;
SET SESSION binlog_row_image= 'FULL';
SET GLOBAL binlog_row_image= 'FULL';
FLUSH TABLES;
SHOW VARIABLES LIKE 'binlog_row_image';
Variable_name Value
binlog_row_image FULL
CON: 'server_2', IMG: 'FULL', RESTART SLAVE: 'Y'
connection server_2;
SET SESSION binlog_row_image= 'FULL';
SET GLOBAL binlog_row_image= 'FULL';
include/stop_slave.inc
include/start_slave.inc
FLUSH TABLES;
SHOW VARIABLES LIKE 'binlog_row_image';
Variable_name Value
binlog_row_image FULL
CON: 'server_3', IMG: 'FULL', RESTART SLAVE: 'Y'
connection server_3;
SET SESSION binlog_row_image= 'FULL';
SET GLOBAL binlog_row_image= 'FULL';
include/stop_slave.inc
include/start_slave.inc
FLUSH TABLES;
SHOW VARIABLES LIKE 'binlog_row_image';
Variable_name Value
binlog_row_image FULL
connection server_1;
### engines: MyISAM, MyISAM, MyISAM
# Create sequences with specific engines per server
connection server_1;
SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
include/save_master_gtid.inc
connection server_2;
SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
include/sync_with_master_gtid.inc
connection server_3;
SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
include/sync_with_master_gtid.inc
# Pt.1 Ensure SETVAL replicates and binlogs correctly
connection server_1;
SELECT SETVAL(s1, 10);
SETVAL(s1, 10)
10
include/save_master_gtid.inc
# Validate SETVAL replicated correctly to other servers
connection server_3;
include/sync_with_master_gtid.inc
include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
# Validate server_1 binlogged SETVAL with the correct columns
connection server_1;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_2 binlogged SETVAL with the correct columns
connection server_2;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_3 binlogged SETVAL with the correct columns
connection server_3;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Pt.2 Ensure NEXTVAL replicates and binlogs correctly
connection server_1;
SELECT NEXTVAL(s1);
NEXTVAL(s1)
11
include/save_master_gtid.inc
# Validate NEXTVAL replicated correctly to other servers
connection server_3;
include/sync_with_master_gtid.inc
include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
# Validate server_1 binlogged NEXTVAL with the correct columns
connection server_1;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_2 binlogged NEXTVAL with the correct columns
connection server_2;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_3 binlogged NEXTVAL with the correct columns
connection server_3;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Cleanup
connection server_1;
DROP TABLE s1;
include/save_master_gtid.inc
connection server_3;
include/sync_with_master_gtid.inc
### engines: MyISAM, MyISAM, InnoDB
# Create sequences with specific engines per server
connection server_1;
SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
include/save_master_gtid.inc
connection server_2;
SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
include/sync_with_master_gtid.inc
connection server_3;
SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
include/sync_with_master_gtid.inc
# Pt.1 Ensure SETVAL replicates and binlogs correctly
connection server_1;
SELECT SETVAL(s1, 10);
SETVAL(s1, 10)
10
include/save_master_gtid.inc
# Validate SETVAL replicated correctly to other servers
connection server_3;
include/sync_with_master_gtid.inc
include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
# Validate server_1 binlogged SETVAL with the correct columns
connection server_1;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_2 binlogged SETVAL with the correct columns
connection server_2;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_3 binlogged SETVAL with the correct columns
connection server_3;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Pt.2 Ensure NEXTVAL replicates and binlogs correctly
connection server_1;
SELECT NEXTVAL(s1);
NEXTVAL(s1)
11
include/save_master_gtid.inc
# Validate NEXTVAL replicated correctly to other servers
connection server_3;
include/sync_with_master_gtid.inc
include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
# Validate server_1 binlogged NEXTVAL with the correct columns
connection server_1;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_2 binlogged NEXTVAL with the correct columns
connection server_2;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_3 binlogged NEXTVAL with the correct columns
connection server_3;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Cleanup
connection server_1;
DROP TABLE s1;
include/save_master_gtid.inc
connection server_3;
include/sync_with_master_gtid.inc
### engines: MyISAM, InnoDB, MyISAM
# Create sequences with specific engines per server
connection server_1;
SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
include/save_master_gtid.inc
connection server_2;
SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
include/sync_with_master_gtid.inc
connection server_3;
SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
include/sync_with_master_gtid.inc
# Pt.1 Ensure SETVAL replicates and binlogs correctly
connection server_1;
SELECT SETVAL(s1, 10);
SETVAL(s1, 10)
10
include/save_master_gtid.inc
# Validate SETVAL replicated correctly to other servers
connection server_3;
include/sync_with_master_gtid.inc
include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
# Validate server_1 binlogged SETVAL with the correct columns
connection server_1;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_2 binlogged SETVAL with the correct columns
connection server_2;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_3 binlogged SETVAL with the correct columns
connection server_3;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Pt.2 Ensure NEXTVAL replicates and binlogs correctly
connection server_1;
SELECT NEXTVAL(s1);
NEXTVAL(s1)
11
include/save_master_gtid.inc
# Validate NEXTVAL replicated correctly to other servers
connection server_3;
include/sync_with_master_gtid.inc
include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
# Validate server_1 binlogged NEXTVAL with the correct columns
connection server_1;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_2 binlogged NEXTVAL with the correct columns
connection server_2;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_3 binlogged NEXTVAL with the correct columns
connection server_3;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Cleanup
connection server_1;
DROP TABLE s1;
include/save_master_gtid.inc
connection server_3;
include/sync_with_master_gtid.inc
### engines: MyISAM, InnoDB, InnoDB
# Create sequences with specific engines per server
connection server_1;
SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
include/save_master_gtid.inc
connection server_2;
SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
include/sync_with_master_gtid.inc
connection server_3;
SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
include/sync_with_master_gtid.inc
# Pt.1 Ensure SETVAL replicates and binlogs correctly
connection server_1;
SELECT SETVAL(s1, 10);
SETVAL(s1, 10)
10
include/save_master_gtid.inc
# Validate SETVAL replicated correctly to other servers
connection server_3;
include/sync_with_master_gtid.inc
include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
# Validate server_1 binlogged SETVAL with the correct columns
connection server_1;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_2 binlogged SETVAL with the correct columns
connection server_2;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_3 binlogged SETVAL with the correct columns
connection server_3;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Pt.2 Ensure NEXTVAL replicates and binlogs correctly
connection server_1;
SELECT NEXTVAL(s1);
NEXTVAL(s1)
11
include/save_master_gtid.inc
# Validate NEXTVAL replicated correctly to other servers
connection server_3;
include/sync_with_master_gtid.inc
include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
# Validate server_1 binlogged NEXTVAL with the correct columns
connection server_1;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_2 binlogged NEXTVAL with the correct columns
connection server_2;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_3 binlogged NEXTVAL with the correct columns
connection server_3;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Cleanup
connection server_1;
DROP TABLE s1;
include/save_master_gtid.inc
connection server_3;
include/sync_with_master_gtid.inc
### engines: InnoDB, MyISAM, MyISAM
# Create sequences with specific engines per server
connection server_1;
SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
include/save_master_gtid.inc
connection server_2;
SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
include/sync_with_master_gtid.inc
connection server_3;
SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
include/sync_with_master_gtid.inc
# Pt.1 Ensure SETVAL replicates and binlogs correctly
connection server_1;
SELECT SETVAL(s1, 10);
SETVAL(s1, 10)
10
include/save_master_gtid.inc
# Validate SETVAL replicated correctly to other servers
connection server_3;
include/sync_with_master_gtid.inc
include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
# Validate server_1 binlogged SETVAL with the correct columns
connection server_1;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_2 binlogged SETVAL with the correct columns
connection server_2;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_3 binlogged SETVAL with the correct columns
connection server_3;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Pt.2 Ensure NEXTVAL replicates and binlogs correctly
connection server_1;
SELECT NEXTVAL(s1);
NEXTVAL(s1)
11
include/save_master_gtid.inc
# Validate NEXTVAL replicated correctly to other servers
connection server_3;
include/sync_with_master_gtid.inc
include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
# Validate server_1 binlogged NEXTVAL with the correct columns
connection server_1;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_2 binlogged NEXTVAL with the correct columns
connection server_2;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_3 binlogged NEXTVAL with the correct columns
connection server_3;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Cleanup
connection server_1;
DROP TABLE s1;
include/save_master_gtid.inc
connection server_3;
include/sync_with_master_gtid.inc
### engines: InnoDB, MyISAM, InnoDB
# Create sequences with specific engines per server
connection server_1;
SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
include/save_master_gtid.inc
connection server_2;
SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
include/sync_with_master_gtid.inc
connection server_3;
SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
include/sync_with_master_gtid.inc
# Pt.1 Ensure SETVAL replicates and binlogs correctly
connection server_1;
SELECT SETVAL(s1, 10);
SETVAL(s1, 10)
10
include/save_master_gtid.inc
# Validate SETVAL replicated correctly to other servers
connection server_3;
include/sync_with_master_gtid.inc
include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
# Validate server_1 binlogged SETVAL with the correct columns
connection server_1;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_2 binlogged SETVAL with the correct columns
connection server_2;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_3 binlogged SETVAL with the correct columns
connection server_3;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Pt.2 Ensure NEXTVAL replicates and binlogs correctly
connection server_1;
SELECT NEXTVAL(s1);
NEXTVAL(s1)
11
include/save_master_gtid.inc
# Validate NEXTVAL replicated correctly to other servers
connection server_3;
include/sync_with_master_gtid.inc
include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
# Validate server_1 binlogged NEXTVAL with the correct columns
connection server_1;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_2 binlogged NEXTVAL with the correct columns
connection server_2;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_3 binlogged NEXTVAL with the correct columns
connection server_3;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Cleanup
connection server_1;
DROP TABLE s1;
include/save_master_gtid.inc
connection server_3;
include/sync_with_master_gtid.inc
### engines: InnoDB, InnoDB, MyISAM
# Create sequences with specific engines per server
connection server_1;
SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
include/save_master_gtid.inc
connection server_2;
SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
include/sync_with_master_gtid.inc
connection server_3;
SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
include/sync_with_master_gtid.inc
# Pt.1 Ensure SETVAL replicates and binlogs correctly
connection server_1;
SELECT SETVAL(s1, 10);
SETVAL(s1, 10)
10
include/save_master_gtid.inc
# Validate SETVAL replicated correctly to other servers
connection server_3;
include/sync_with_master_gtid.inc
include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
# Validate server_1 binlogged SETVAL with the correct columns
connection server_1;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_2 binlogged SETVAL with the correct columns
connection server_2;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_3 binlogged SETVAL with the correct columns
connection server_3;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Pt.2 Ensure NEXTVAL replicates and binlogs correctly
connection server_1;
SELECT NEXTVAL(s1);
NEXTVAL(s1)
11
include/save_master_gtid.inc
# Validate NEXTVAL replicated correctly to other servers
connection server_3;
include/sync_with_master_gtid.inc
include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
# Validate server_1 binlogged NEXTVAL with the correct columns
connection server_1;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_2 binlogged NEXTVAL with the correct columns
connection server_2;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_3 binlogged NEXTVAL with the correct columns
connection server_3;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Cleanup
connection server_1;
DROP TABLE s1;
include/save_master_gtid.inc
connection server_3;
include/sync_with_master_gtid.inc
### engines: InnoDB, InnoDB, InnoDB
# Create sequences with specific engines per server
connection server_1;
SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
include/save_master_gtid.inc
connection server_2;
SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
include/sync_with_master_gtid.inc
connection server_3;
SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
include/sync_with_master_gtid.inc
# Pt.1 Ensure SETVAL replicates and binlogs correctly
connection server_1;
SELECT SETVAL(s1, 10);
SETVAL(s1, 10)
10
include/save_master_gtid.inc
# Validate SETVAL replicated correctly to other servers
connection server_3;
include/sync_with_master_gtid.inc
include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
# Validate server_1 binlogged SETVAL with the correct columns
connection server_1;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_2 binlogged SETVAL with the correct columns
connection server_2;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_3 binlogged SETVAL with the correct columns
connection server_3;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Pt.2 Ensure NEXTVAL replicates and binlogs correctly
connection server_1;
SELECT NEXTVAL(s1);
NEXTVAL(s1)
11
include/save_master_gtid.inc
# Validate NEXTVAL replicated correctly to other servers
connection server_3;
include/sync_with_master_gtid.inc
include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
# Validate server_1 binlogged NEXTVAL with the correct columns
connection server_1;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_2 binlogged NEXTVAL with the correct columns
connection server_2;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_3 binlogged NEXTVAL with the correct columns
connection server_3;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Cleanup
connection server_1;
DROP TABLE s1;
include/save_master_gtid.inc
connection server_3;
include/sync_with_master_gtid.inc
include/rpl_end.inc
# End of tests

View file

@ -0,0 +1,797 @@
include/rpl_init.inc [topology=1->2->3]
connection server_1;
connection server_2;
connection server_3;
connection server_1;
#
# binlog_row_image=MINIMAL should write only columns 1 and 8 to the
# binary log
#
CON: 'server_1', IMG: 'MINIMAL', RESTART SLAVE: 'N'
connection server_1;
SET SESSION binlog_row_image= 'MINIMAL';
SET GLOBAL binlog_row_image= 'MINIMAL';
FLUSH TABLES;
SHOW VARIABLES LIKE 'binlog_row_image';
Variable_name Value
binlog_row_image MINIMAL
CON: 'server_2', IMG: 'MINIMAL', RESTART SLAVE: 'Y'
connection server_2;
SET SESSION binlog_row_image= 'MINIMAL';
SET GLOBAL binlog_row_image= 'MINIMAL';
include/stop_slave.inc
include/start_slave.inc
FLUSH TABLES;
SHOW VARIABLES LIKE 'binlog_row_image';
Variable_name Value
binlog_row_image MINIMAL
CON: 'server_3', IMG: 'MINIMAL', RESTART SLAVE: 'Y'
connection server_3;
SET SESSION binlog_row_image= 'MINIMAL';
SET GLOBAL binlog_row_image= 'MINIMAL';
include/stop_slave.inc
include/start_slave.inc
FLUSH TABLES;
SHOW VARIABLES LIKE 'binlog_row_image';
Variable_name Value
binlog_row_image MINIMAL
connection server_1;
### engines: MyISAM, MyISAM, MyISAM
# Create sequences with specific engines per server
connection server_1;
SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
include/save_master_gtid.inc
connection server_2;
SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
include/sync_with_master_gtid.inc
connection server_3;
SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
include/sync_with_master_gtid.inc
# Pt.1 Ensure SETVAL replicates and binlogs correctly
connection server_1;
SELECT SETVAL(s1, 10);
SETVAL(s1, 10)
10
include/save_master_gtid.inc
# Validate SETVAL replicated correctly to other servers
connection server_3;
include/sync_with_master_gtid.inc
include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
# Validate server_1 binlogged SETVAL with the correct columns
connection server_1;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_2 binlogged SETVAL with the correct columns
connection server_2;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_3 binlogged SETVAL with the correct columns
connection server_3;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Pt.2 Ensure NEXTVAL replicates and binlogs correctly
connection server_1;
SELECT NEXTVAL(s1);
NEXTVAL(s1)
11
include/save_master_gtid.inc
# Validate NEXTVAL replicated correctly to other servers
connection server_3;
include/sync_with_master_gtid.inc
include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
# Validate server_1 binlogged NEXTVAL with the correct columns
connection server_1;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_2 binlogged NEXTVAL with the correct columns
connection server_2;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_3 binlogged NEXTVAL with the correct columns
connection server_3;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Cleanup
connection server_1;
DROP TABLE s1;
include/save_master_gtid.inc
connection server_3;
include/sync_with_master_gtid.inc
### engines: MyISAM, MyISAM, InnoDB
# Create sequences with specific engines per server
connection server_1;
SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
include/save_master_gtid.inc
connection server_2;
SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
include/sync_with_master_gtid.inc
connection server_3;
SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
include/sync_with_master_gtid.inc
# Pt.1 Ensure SETVAL replicates and binlogs correctly
connection server_1;
SELECT SETVAL(s1, 10);
SETVAL(s1, 10)
10
include/save_master_gtid.inc
# Validate SETVAL replicated correctly to other servers
connection server_3;
include/sync_with_master_gtid.inc
include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
# Validate server_1 binlogged SETVAL with the correct columns
connection server_1;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_2 binlogged SETVAL with the correct columns
connection server_2;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_3 binlogged SETVAL with the correct columns
connection server_3;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Pt.2 Ensure NEXTVAL replicates and binlogs correctly
connection server_1;
SELECT NEXTVAL(s1);
NEXTVAL(s1)
11
include/save_master_gtid.inc
# Validate NEXTVAL replicated correctly to other servers
connection server_3;
include/sync_with_master_gtid.inc
include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
# Validate server_1 binlogged NEXTVAL with the correct columns
connection server_1;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_2 binlogged NEXTVAL with the correct columns
connection server_2;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_3 binlogged NEXTVAL with the correct columns
connection server_3;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Cleanup
connection server_1;
DROP TABLE s1;
include/save_master_gtid.inc
connection server_3;
include/sync_with_master_gtid.inc
### engines: MyISAM, InnoDB, MyISAM
# Create sequences with specific engines per server
connection server_1;
SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
include/save_master_gtid.inc
connection server_2;
SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
include/sync_with_master_gtid.inc
connection server_3;
SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
include/sync_with_master_gtid.inc
# Pt.1 Ensure SETVAL replicates and binlogs correctly
connection server_1;
SELECT SETVAL(s1, 10);
SETVAL(s1, 10)
10
include/save_master_gtid.inc
# Validate SETVAL replicated correctly to other servers
connection server_3;
include/sync_with_master_gtid.inc
include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
# Validate server_1 binlogged SETVAL with the correct columns
connection server_1;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_2 binlogged SETVAL with the correct columns
connection server_2;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_3 binlogged SETVAL with the correct columns
connection server_3;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Pt.2 Ensure NEXTVAL replicates and binlogs correctly
connection server_1;
SELECT NEXTVAL(s1);
NEXTVAL(s1)
11
include/save_master_gtid.inc
# Validate NEXTVAL replicated correctly to other servers
connection server_3;
include/sync_with_master_gtid.inc
include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
# Validate server_1 binlogged NEXTVAL with the correct columns
connection server_1;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_2 binlogged NEXTVAL with the correct columns
connection server_2;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_3 binlogged NEXTVAL with the correct columns
connection server_3;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Cleanup
connection server_1;
DROP TABLE s1;
include/save_master_gtid.inc
connection server_3;
include/sync_with_master_gtid.inc
### engines: MyISAM, InnoDB, InnoDB
# Create sequences with specific engines per server
connection server_1;
SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
include/save_master_gtid.inc
connection server_2;
SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
include/sync_with_master_gtid.inc
connection server_3;
SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
include/sync_with_master_gtid.inc
# Pt.1 Ensure SETVAL replicates and binlogs correctly
connection server_1;
SELECT SETVAL(s1, 10);
SETVAL(s1, 10)
10
include/save_master_gtid.inc
# Validate SETVAL replicated correctly to other servers
connection server_3;
include/sync_with_master_gtid.inc
include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
# Validate server_1 binlogged SETVAL with the correct columns
connection server_1;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_2 binlogged SETVAL with the correct columns
connection server_2;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_3 binlogged SETVAL with the correct columns
connection server_3;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Pt.2 Ensure NEXTVAL replicates and binlogs correctly
connection server_1;
SELECT NEXTVAL(s1);
NEXTVAL(s1)
11
include/save_master_gtid.inc
# Validate NEXTVAL replicated correctly to other servers
connection server_3;
include/sync_with_master_gtid.inc
include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
# Validate server_1 binlogged NEXTVAL with the correct columns
connection server_1;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_2 binlogged NEXTVAL with the correct columns
connection server_2;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_3 binlogged NEXTVAL with the correct columns
connection server_3;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Cleanup
connection server_1;
DROP TABLE s1;
include/save_master_gtid.inc
connection server_3;
include/sync_with_master_gtid.inc
### engines: InnoDB, MyISAM, MyISAM
# Create sequences with specific engines per server
connection server_1;
SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
include/save_master_gtid.inc
connection server_2;
SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
include/sync_with_master_gtid.inc
connection server_3;
SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
include/sync_with_master_gtid.inc
# Pt.1 Ensure SETVAL replicates and binlogs correctly
connection server_1;
SELECT SETVAL(s1, 10);
SETVAL(s1, 10)
10
include/save_master_gtid.inc
# Validate SETVAL replicated correctly to other servers
connection server_3;
include/sync_with_master_gtid.inc
include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
# Validate server_1 binlogged SETVAL with the correct columns
connection server_1;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_2 binlogged SETVAL with the correct columns
connection server_2;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_3 binlogged SETVAL with the correct columns
connection server_3;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Pt.2 Ensure NEXTVAL replicates and binlogs correctly
connection server_1;
SELECT NEXTVAL(s1);
NEXTVAL(s1)
11
include/save_master_gtid.inc
# Validate NEXTVAL replicated correctly to other servers
connection server_3;
include/sync_with_master_gtid.inc
include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
# Validate server_1 binlogged NEXTVAL with the correct columns
connection server_1;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_2 binlogged NEXTVAL with the correct columns
connection server_2;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_3 binlogged NEXTVAL with the correct columns
connection server_3;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Cleanup
connection server_1;
DROP TABLE s1;
include/save_master_gtid.inc
connection server_3;
include/sync_with_master_gtid.inc
### engines: InnoDB, MyISAM, InnoDB
# Create sequences with specific engines per server
connection server_1;
SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
include/save_master_gtid.inc
connection server_2;
SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
include/sync_with_master_gtid.inc
connection server_3;
SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
include/sync_with_master_gtid.inc
# Pt.1 Ensure SETVAL replicates and binlogs correctly
connection server_1;
SELECT SETVAL(s1, 10);
SETVAL(s1, 10)
10
include/save_master_gtid.inc
# Validate SETVAL replicated correctly to other servers
connection server_3;
include/sync_with_master_gtid.inc
include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
# Validate server_1 binlogged SETVAL with the correct columns
connection server_1;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_2 binlogged SETVAL with the correct columns
connection server_2;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_3 binlogged SETVAL with the correct columns
connection server_3;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Pt.2 Ensure NEXTVAL replicates and binlogs correctly
connection server_1;
SELECT NEXTVAL(s1);
NEXTVAL(s1)
11
include/save_master_gtid.inc
# Validate NEXTVAL replicated correctly to other servers
connection server_3;
include/sync_with_master_gtid.inc
include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
# Validate server_1 binlogged NEXTVAL with the correct columns
connection server_1;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_2 binlogged NEXTVAL with the correct columns
connection server_2;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_3 binlogged NEXTVAL with the correct columns
connection server_3;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Cleanup
connection server_1;
DROP TABLE s1;
include/save_master_gtid.inc
connection server_3;
include/sync_with_master_gtid.inc
### engines: InnoDB, InnoDB, MyISAM
# Create sequences with specific engines per server
connection server_1;
SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
include/save_master_gtid.inc
connection server_2;
SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
include/sync_with_master_gtid.inc
connection server_3;
SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
include/sync_with_master_gtid.inc
# Pt.1 Ensure SETVAL replicates and binlogs correctly
connection server_1;
SELECT SETVAL(s1, 10);
SETVAL(s1, 10)
10
include/save_master_gtid.inc
# Validate SETVAL replicated correctly to other servers
connection server_3;
include/sync_with_master_gtid.inc
include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
# Validate server_1 binlogged SETVAL with the correct columns
connection server_1;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_2 binlogged SETVAL with the correct columns
connection server_2;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_3 binlogged SETVAL with the correct columns
connection server_3;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Pt.2 Ensure NEXTVAL replicates and binlogs correctly
connection server_1;
SELECT NEXTVAL(s1);
NEXTVAL(s1)
11
include/save_master_gtid.inc
# Validate NEXTVAL replicated correctly to other servers
connection server_3;
include/sync_with_master_gtid.inc
include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
# Validate server_1 binlogged NEXTVAL with the correct columns
connection server_1;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_2 binlogged NEXTVAL with the correct columns
connection server_2;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_3 binlogged NEXTVAL with the correct columns
connection server_3;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Cleanup
connection server_1;
DROP TABLE s1;
include/save_master_gtid.inc
connection server_3;
include/sync_with_master_gtid.inc
### engines: InnoDB, InnoDB, InnoDB
# Create sequences with specific engines per server
connection server_1;
SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
include/save_master_gtid.inc
connection server_2;
SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
include/sync_with_master_gtid.inc
connection server_3;
SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
include/sync_with_master_gtid.inc
# Pt.1 Ensure SETVAL replicates and binlogs correctly
connection server_1;
SELECT SETVAL(s1, 10);
SETVAL(s1, 10)
10
include/save_master_gtid.inc
# Validate SETVAL replicated correctly to other servers
connection server_3;
include/sync_with_master_gtid.inc
include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
# Validate server_1 binlogged SETVAL with the correct columns
connection server_1;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_2 binlogged SETVAL with the correct columns
connection server_2;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_3 binlogged SETVAL with the correct columns
connection server_3;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Pt.2 Ensure NEXTVAL replicates and binlogs correctly
connection server_1;
SELECT NEXTVAL(s1);
NEXTVAL(s1)
11
include/save_master_gtid.inc
# Validate NEXTVAL replicated correctly to other servers
connection server_3;
include/sync_with_master_gtid.inc
include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
# Validate server_1 binlogged NEXTVAL with the correct columns
connection server_1;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_2 binlogged NEXTVAL with the correct columns
connection server_2;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_3 binlogged NEXTVAL with the correct columns
connection server_3;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Cleanup
connection server_1;
DROP TABLE s1;
include/save_master_gtid.inc
connection server_3;
include/sync_with_master_gtid.inc
CON: 'server_1', IMG: 'FULL', RESTART SLAVE: 'N'
connection server_1;
SET SESSION binlog_row_image= 'FULL';
SET GLOBAL binlog_row_image= 'FULL';
FLUSH TABLES;
SHOW VARIABLES LIKE 'binlog_row_image';
Variable_name Value
binlog_row_image FULL
CON: 'server_2', IMG: 'FULL', RESTART SLAVE: 'Y'
connection server_2;
SET SESSION binlog_row_image= 'FULL';
SET GLOBAL binlog_row_image= 'FULL';
include/stop_slave.inc
include/start_slave.inc
FLUSH TABLES;
SHOW VARIABLES LIKE 'binlog_row_image';
Variable_name Value
binlog_row_image FULL
CON: 'server_3', IMG: 'FULL', RESTART SLAVE: 'Y'
connection server_3;
SET SESSION binlog_row_image= 'FULL';
SET GLOBAL binlog_row_image= 'FULL';
include/stop_slave.inc
include/start_slave.inc
FLUSH TABLES;
SHOW VARIABLES LIKE 'binlog_row_image';
Variable_name Value
binlog_row_image FULL
connection server_3;
include/rpl_end.inc
# End of tests

View file

@ -0,0 +1,796 @@
include/rpl_init.inc [topology=1->2->3]
connection server_1;
connection server_2;
connection server_3;
connection server_1;
#
# binlog_row_image=NOBLOB should write all columns to the binary logs
#
CON: 'server_1', IMG: 'NOBLOB', RESTART SLAVE: 'N'
connection server_1;
SET SESSION binlog_row_image= 'NOBLOB';
SET GLOBAL binlog_row_image= 'NOBLOB';
FLUSH TABLES;
SHOW VARIABLES LIKE 'binlog_row_image';
Variable_name Value
binlog_row_image NOBLOB
CON: 'server_2', IMG: 'NOBLOB', RESTART SLAVE: 'Y'
connection server_2;
SET SESSION binlog_row_image= 'NOBLOB';
SET GLOBAL binlog_row_image= 'NOBLOB';
include/stop_slave.inc
include/start_slave.inc
FLUSH TABLES;
SHOW VARIABLES LIKE 'binlog_row_image';
Variable_name Value
binlog_row_image NOBLOB
CON: 'server_3', IMG: 'NOBLOB', RESTART SLAVE: 'Y'
connection server_3;
SET SESSION binlog_row_image= 'NOBLOB';
SET GLOBAL binlog_row_image= 'NOBLOB';
include/stop_slave.inc
include/start_slave.inc
FLUSH TABLES;
SHOW VARIABLES LIKE 'binlog_row_image';
Variable_name Value
binlog_row_image NOBLOB
connection server_1;
### engines: MyISAM, MyISAM, MyISAM
# Create sequences with specific engines per server
connection server_1;
SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
include/save_master_gtid.inc
connection server_2;
SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
include/sync_with_master_gtid.inc
connection server_3;
SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
include/sync_with_master_gtid.inc
# Pt.1 Ensure SETVAL replicates and binlogs correctly
connection server_1;
SELECT SETVAL(s1, 10);
SETVAL(s1, 10)
10
include/save_master_gtid.inc
# Validate SETVAL replicated correctly to other servers
connection server_3;
include/sync_with_master_gtid.inc
include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
# Validate server_1 binlogged SETVAL with the correct columns
connection server_1;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_2 binlogged SETVAL with the correct columns
connection server_2;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_3 binlogged SETVAL with the correct columns
connection server_3;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Pt.2 Ensure NEXTVAL replicates and binlogs correctly
connection server_1;
SELECT NEXTVAL(s1);
NEXTVAL(s1)
11
include/save_master_gtid.inc
# Validate NEXTVAL replicated correctly to other servers
connection server_3;
include/sync_with_master_gtid.inc
include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
# Validate server_1 binlogged NEXTVAL with the correct columns
connection server_1;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_2 binlogged NEXTVAL with the correct columns
connection server_2;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_3 binlogged NEXTVAL with the correct columns
connection server_3;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Cleanup
connection server_1;
DROP TABLE s1;
include/save_master_gtid.inc
connection server_3;
include/sync_with_master_gtid.inc
### engines: MyISAM, MyISAM, InnoDB
# Create sequences with specific engines per server
connection server_1;
SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
include/save_master_gtid.inc
connection server_2;
SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
include/sync_with_master_gtid.inc
connection server_3;
SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
include/sync_with_master_gtid.inc
# Pt.1 Ensure SETVAL replicates and binlogs correctly
connection server_1;
SELECT SETVAL(s1, 10);
SETVAL(s1, 10)
10
include/save_master_gtid.inc
# Validate SETVAL replicated correctly to other servers
connection server_3;
include/sync_with_master_gtid.inc
include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
# Validate server_1 binlogged SETVAL with the correct columns
connection server_1;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_2 binlogged SETVAL with the correct columns
connection server_2;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_3 binlogged SETVAL with the correct columns
connection server_3;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Pt.2 Ensure NEXTVAL replicates and binlogs correctly
connection server_1;
SELECT NEXTVAL(s1);
NEXTVAL(s1)
11
include/save_master_gtid.inc
# Validate NEXTVAL replicated correctly to other servers
connection server_3;
include/sync_with_master_gtid.inc
include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
# Validate server_1 binlogged NEXTVAL with the correct columns
connection server_1;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_2 binlogged NEXTVAL with the correct columns
connection server_2;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_3 binlogged NEXTVAL with the correct columns
connection server_3;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Cleanup
connection server_1;
DROP TABLE s1;
include/save_master_gtid.inc
connection server_3;
include/sync_with_master_gtid.inc
### engines: MyISAM, InnoDB, MyISAM
# Create sequences with specific engines per server
connection server_1;
SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
include/save_master_gtid.inc
connection server_2;
SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
include/sync_with_master_gtid.inc
connection server_3;
SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
include/sync_with_master_gtid.inc
# Pt.1 Ensure SETVAL replicates and binlogs correctly
connection server_1;
SELECT SETVAL(s1, 10);
SETVAL(s1, 10)
10
include/save_master_gtid.inc
# Validate SETVAL replicated correctly to other servers
connection server_3;
include/sync_with_master_gtid.inc
include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
# Validate server_1 binlogged SETVAL with the correct columns
connection server_1;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_2 binlogged SETVAL with the correct columns
connection server_2;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_3 binlogged SETVAL with the correct columns
connection server_3;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Pt.2 Ensure NEXTVAL replicates and binlogs correctly
connection server_1;
SELECT NEXTVAL(s1);
NEXTVAL(s1)
11
include/save_master_gtid.inc
# Validate NEXTVAL replicated correctly to other servers
connection server_3;
include/sync_with_master_gtid.inc
include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
# Validate server_1 binlogged NEXTVAL with the correct columns
connection server_1;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_2 binlogged NEXTVAL with the correct columns
connection server_2;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_3 binlogged NEXTVAL with the correct columns
connection server_3;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Cleanup
connection server_1;
DROP TABLE s1;
include/save_master_gtid.inc
connection server_3;
include/sync_with_master_gtid.inc
### engines: MyISAM, InnoDB, InnoDB
# Create sequences with specific engines per server
connection server_1;
SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
include/save_master_gtid.inc
connection server_2;
SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
include/sync_with_master_gtid.inc
connection server_3;
SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
include/sync_with_master_gtid.inc
# Pt.1 Ensure SETVAL replicates and binlogs correctly
connection server_1;
SELECT SETVAL(s1, 10);
SETVAL(s1, 10)
10
include/save_master_gtid.inc
# Validate SETVAL replicated correctly to other servers
connection server_3;
include/sync_with_master_gtid.inc
include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
# Validate server_1 binlogged SETVAL with the correct columns
connection server_1;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_2 binlogged SETVAL with the correct columns
connection server_2;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_3 binlogged SETVAL with the correct columns
connection server_3;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Pt.2 Ensure NEXTVAL replicates and binlogs correctly
connection server_1;
SELECT NEXTVAL(s1);
NEXTVAL(s1)
11
include/save_master_gtid.inc
# Validate NEXTVAL replicated correctly to other servers
connection server_3;
include/sync_with_master_gtid.inc
include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
# Validate server_1 binlogged NEXTVAL with the correct columns
connection server_1;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_2 binlogged NEXTVAL with the correct columns
connection server_2;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_3 binlogged NEXTVAL with the correct columns
connection server_3;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Cleanup
connection server_1;
DROP TABLE s1;
include/save_master_gtid.inc
connection server_3;
include/sync_with_master_gtid.inc
### engines: InnoDB, MyISAM, MyISAM
# Create sequences with specific engines per server
connection server_1;
SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
include/save_master_gtid.inc
connection server_2;
SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
include/sync_with_master_gtid.inc
connection server_3;
SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
include/sync_with_master_gtid.inc
# Pt.1 Ensure SETVAL replicates and binlogs correctly
connection server_1;
SELECT SETVAL(s1, 10);
SETVAL(s1, 10)
10
include/save_master_gtid.inc
# Validate SETVAL replicated correctly to other servers
connection server_3;
include/sync_with_master_gtid.inc
include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
# Validate server_1 binlogged SETVAL with the correct columns
connection server_1;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_2 binlogged SETVAL with the correct columns
connection server_2;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_3 binlogged SETVAL with the correct columns
connection server_3;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Pt.2 Ensure NEXTVAL replicates and binlogs correctly
connection server_1;
SELECT NEXTVAL(s1);
NEXTVAL(s1)
11
include/save_master_gtid.inc
# Validate NEXTVAL replicated correctly to other servers
connection server_3;
include/sync_with_master_gtid.inc
include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
# Validate server_1 binlogged NEXTVAL with the correct columns
connection server_1;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_2 binlogged NEXTVAL with the correct columns
connection server_2;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_3 binlogged NEXTVAL with the correct columns
connection server_3;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Cleanup
connection server_1;
DROP TABLE s1;
include/save_master_gtid.inc
connection server_3;
include/sync_with_master_gtid.inc
### engines: InnoDB, MyISAM, InnoDB
# Create sequences with specific engines per server
connection server_1;
SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
include/save_master_gtid.inc
connection server_2;
SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
include/sync_with_master_gtid.inc
connection server_3;
SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
include/sync_with_master_gtid.inc
# Pt.1 Ensure SETVAL replicates and binlogs correctly
connection server_1;
SELECT SETVAL(s1, 10);
SETVAL(s1, 10)
10
include/save_master_gtid.inc
# Validate SETVAL replicated correctly to other servers
connection server_3;
include/sync_with_master_gtid.inc
include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
# Validate server_1 binlogged SETVAL with the correct columns
connection server_1;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_2 binlogged SETVAL with the correct columns
connection server_2;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_3 binlogged SETVAL with the correct columns
connection server_3;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Pt.2 Ensure NEXTVAL replicates and binlogs correctly
connection server_1;
SELECT NEXTVAL(s1);
NEXTVAL(s1)
11
include/save_master_gtid.inc
# Validate NEXTVAL replicated correctly to other servers
connection server_3;
include/sync_with_master_gtid.inc
include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
# Validate server_1 binlogged NEXTVAL with the correct columns
connection server_1;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_2 binlogged NEXTVAL with the correct columns
connection server_2;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_3 binlogged NEXTVAL with the correct columns
connection server_3;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Cleanup
connection server_1;
DROP TABLE s1;
include/save_master_gtid.inc
connection server_3;
include/sync_with_master_gtid.inc
### engines: InnoDB, InnoDB, MyISAM
# Create sequences with specific engines per server
connection server_1;
SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
include/save_master_gtid.inc
connection server_2;
SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
include/sync_with_master_gtid.inc
connection server_3;
SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=MyISAM;
include/sync_with_master_gtid.inc
# Pt.1 Ensure SETVAL replicates and binlogs correctly
connection server_1;
SELECT SETVAL(s1, 10);
SETVAL(s1, 10)
10
include/save_master_gtid.inc
# Validate SETVAL replicated correctly to other servers
connection server_3;
include/sync_with_master_gtid.inc
include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
# Validate server_1 binlogged SETVAL with the correct columns
connection server_1;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_2 binlogged SETVAL with the correct columns
connection server_2;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_3 binlogged SETVAL with the correct columns
connection server_3;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Pt.2 Ensure NEXTVAL replicates and binlogs correctly
connection server_1;
SELECT NEXTVAL(s1);
NEXTVAL(s1)
11
include/save_master_gtid.inc
# Validate NEXTVAL replicated correctly to other servers
connection server_3;
include/sync_with_master_gtid.inc
include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
# Validate server_1 binlogged NEXTVAL with the correct columns
connection server_1;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_2 binlogged NEXTVAL with the correct columns
connection server_2;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_3 binlogged NEXTVAL with the correct columns
connection server_3;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Cleanup
connection server_1;
DROP TABLE s1;
include/save_master_gtid.inc
connection server_3;
include/sync_with_master_gtid.inc
### engines: InnoDB, InnoDB, InnoDB
# Create sequences with specific engines per server
connection server_1;
SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
include/save_master_gtid.inc
connection server_2;
SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
include/sync_with_master_gtid.inc
connection server_3;
SET STATEMENT sql_log_bin=0 FOR create sequence s1 cache=0 engine=InnoDB;
include/sync_with_master_gtid.inc
# Pt.1 Ensure SETVAL replicates and binlogs correctly
connection server_1;
SELECT SETVAL(s1, 10);
SETVAL(s1, 10)
10
include/save_master_gtid.inc
# Validate SETVAL replicated correctly to other servers
connection server_3;
include/sync_with_master_gtid.inc
include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
# Validate server_1 binlogged SETVAL with the correct columns
connection server_1;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_2 binlogged SETVAL with the correct columns
connection server_2;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_3 binlogged SETVAL with the correct columns
connection server_3;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Pt.2 Ensure NEXTVAL replicates and binlogs correctly
connection server_1;
SELECT NEXTVAL(s1);
NEXTVAL(s1)
11
include/save_master_gtid.inc
# Validate NEXTVAL replicated correctly to other servers
connection server_3;
include/sync_with_master_gtid.inc
include/diff_tables.inc [server_1:test.s1,server_2:test.s1,server_3:test.s1]
# Validate server_1 binlogged NEXTVAL with the correct columns
connection server_1;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_2 binlogged NEXTVAL with the correct columns
connection server_2;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Validate server_3 binlogged NEXTVAL with the correct columns
connection server_3;
FLUSH LOGS;
include/ensure_binlog_row_event_columns.inc [(1,2,3,4,5,6,7,8)]
# MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
# Verifying all expected column ids appear in binlog event output..
# ..success
# Verifying only expected column ids appear in binlog event output..
# ..success
# Cleanup
connection server_1;
DROP TABLE s1;
include/save_master_gtid.inc
connection server_3;
include/sync_with_master_gtid.inc
CON: 'server_1', IMG: 'FULL', RESTART SLAVE: 'N'
connection server_1;
SET SESSION binlog_row_image= 'FULL';
SET GLOBAL binlog_row_image= 'FULL';
FLUSH TABLES;
SHOW VARIABLES LIKE 'binlog_row_image';
Variable_name Value
binlog_row_image FULL
CON: 'server_2', IMG: 'FULL', RESTART SLAVE: 'Y'
connection server_2;
SET SESSION binlog_row_image= 'FULL';
SET GLOBAL binlog_row_image= 'FULL';
include/stop_slave.inc
include/start_slave.inc
FLUSH TABLES;
SHOW VARIABLES LIKE 'binlog_row_image';
Variable_name Value
binlog_row_image FULL
CON: 'server_3', IMG: 'FULL', RESTART SLAVE: 'Y'
connection server_3;
SET SESSION binlog_row_image= 'FULL';
SET GLOBAL binlog_row_image= 'FULL';
include/stop_slave.inc
include/start_slave.inc
FLUSH TABLES;
SHOW VARIABLES LIKE 'binlog_row_image';
Variable_name Value
binlog_row_image FULL
connection server_3;
include/rpl_end.inc
# End of tests

View file

@ -13,6 +13,7 @@
# during this window while forcing a rotation in the binlog.
#
--source include/have_debug.inc
--source include/have_debug_sync.inc
--source include/master-slave.inc
--connection master

View file

@ -0,0 +1,48 @@
#
# Purpose:
# The rpl_row_img_sequence group of tests verify that sequence MDL updates,
# i.e. NEXTVAL and SETVAL, respect the binlog_row_image variable value when
# written into the binary log. In particular, it ensures that only changed
# columns are written with MINIMAL image mode, and all columns are written
# otherwise. This test focuses on validating the behavior of
# binlog_row_img=FULL.
#
# Methodology
# After issuing a sequence update, ensure that both 1) it was replicated
# correctly, and 2) it was binlogged respective to the binlog_row_image value.
# The sequence table does not use caching to ensure each update is immediately
# binlogged. Each command is binlogged into its own unique log file, and the
# entirety of the file is analyzed for correctness of its sequence event.
# Specifically, mysqlbinlog is used in verbose mode so it outputs the columns
# which belong to the event, and the columns are analyzed to ensure the correct
# ones were logged. rpl_row_img_general_loop.inc is used to test with multiple
# chained replicas, varying engines between InnoDB and MyISAM.
#
# References:
# MDEV-28487: sequences not respect value of binlog_row_image with select
# nextval(seq_gen)
#
--let $rpl_topology= 1->2->3
--source include/rpl_init.inc
--source include/have_binlog_format_row.inc
--connection server_1
--source include/have_innodb.inc
--connection server_2
--source include/have_innodb.inc
--connection server_3
--source include/have_innodb.inc
--connection server_1
--echo #
--echo # binlog_row_image=FULL should write all columns to the binary log
--echo #
--let $row_img_set=server_1:FULL:N,server_2:FULL:Y,server_3:FULL:Y
--source include/rpl_row_img_set.inc
--let $expected_columns=(1,2,3,4,5,6,7,8)
--let row_img_test_script= include/rpl_row_img_sequence.inc
--source include/rpl_row_img_general_loop.inc
--source include/rpl_end.inc
--echo # End of tests

View file

@ -0,0 +1,21 @@
!include include/default_mysqld.cnf
[mysqld.1]
log-slave-updates
innodb
gtid_domain_id=0
[mysqld.2]
log-slave-updates
innodb
gtid_domain_id=1
[mysqld.3]
log-slave-updates
innodb
gtid_domain_id=2
[ENV]
SERVER_MYPORT_1= @mysqld.1.port
SERVER_MYPORT_2= @mysqld.2.port
SERVER_MYPORT_3= @mysqld.3.port

View file

@ -1,9 +1,11 @@
#
# Purpose:
# This test verifies that sequence DML updates, i.e. NEXTVAL and SETVAL,
# respect the binlog_row_image variable value when written into the binary log.
# In particular, it ensures that only changed columns are written with MINIMAL
# image mode, and all columns are written otherwise.
# The rpl_row_img_sequence group of tests verify that sequence MDL updates,
# i.e. NEXTVAL and SETVAL, respect the binlog_row_image variable value when
# written into the binary log. In particular, it ensures that only changed
# columns are written with MINIMAL image mode, and all columns are written
# otherwise. This test focuses on validating the behavior of
# binlog_row_img=MINIMAL.
#
# Methodology
# After issuing a sequence update, ensure that both 1) it was replicated
@ -34,8 +36,8 @@
--connection server_1
--echo #
--echo # Test Case 1) binlog_row_image=MINIMAL should write only columns
--echo # 1 and 8 to the binary log
--echo # binlog_row_image=MINIMAL should write only columns 1 and 8 to the
--echo # binary log
--echo #
--let $row_img_set=server_1:MINIMAL:N,server_2:MINIMAL:Y,server_3:MINIMAL:Y
--source include/rpl_row_img_set.inc
@ -43,23 +45,8 @@
--let row_img_test_script= include/rpl_row_img_sequence.inc
--source include/rpl_row_img_general_loop.inc
--echo #
--echo # Test Case 2) binlog_row_image=NOBLOB should write all columns to the
--echo # binary log
--echo #
--let $row_img_set=server_1:NOBLOB:N,server_2:NOBLOB:Y,server_3:NOBLOB:Y
--source include/rpl_row_img_set.inc
--let $expected_columns=(1,2,3,4,5,6,7,8)
--source include/rpl_row_img_general_loop.inc
--echo #
--echo # Test Case 3) binlog_row_image=NOBLOB should write all columns to the
--echo # binary log
--echo #
--let $row_img_set=server_1:FULL:N,server_2:FULL:Y,server_3:FULL:Y
--source include/rpl_row_img_set.inc
--let $expected_columns=(1,2,3,4,5,6,7,8)
--source include/rpl_row_img_general_loop.inc
--source include/rpl_end.inc
--echo # End of tests

View file

@ -0,0 +1,21 @@
!include include/default_mysqld.cnf
[mysqld.1]
log-slave-updates
innodb
gtid_domain_id=0
[mysqld.2]
log-slave-updates
innodb
gtid_domain_id=1
[mysqld.3]
log-slave-updates
innodb
gtid_domain_id=2
[ENV]
SERVER_MYPORT_1= @mysqld.1.port
SERVER_MYPORT_2= @mysqld.2.port
SERVER_MYPORT_3= @mysqld.3.port

View file

@ -0,0 +1,51 @@
#
# Purpose:
# The rpl_row_img_sequence group of tests verify that sequence MDL updates,
# i.e. NEXTVAL and SETVAL, respect the binlog_row_image variable value when
# written into the binary log. In particular, it ensures that only changed
# columns are written with MINIMAL image mode, and all columns are written
# otherwise. This test focuses on validating the behavior of
# binlog_row_img=NOBLOB.
#
# Methodology
# After issuing a sequence update, ensure that both 1) it was replicated
# correctly, and 2) it was binlogged respective to the binlog_row_image value.
# The sequence table does not use caching to ensure each update is immediately
# binlogged. Each command is binlogged into its own unique log file, and the
# entirety of the file is analyzed for correctness of its sequence event.
# Specifically, mysqlbinlog is used in verbose mode so it outputs the columns
# which belong to the event, and the columns are analyzed to ensure the correct
# ones were logged. rpl_row_img_general_loop.inc is used to test with multiple
# chained replicas, varying engines between InnoDB and MyISAM.
#
# References:
# MDEV-28487: sequences not respect value of binlog_row_image with select
# nextval(seq_gen)
#
--let $rpl_topology= 1->2->3
--source include/rpl_init.inc
--source include/have_binlog_format_row.inc
--connection server_1
--source include/have_innodb.inc
--connection server_2
--source include/have_innodb.inc
--connection server_3
--source include/have_innodb.inc
--connection server_1
--echo #
--echo # binlog_row_image=NOBLOB should write all columns to the binary logs
--echo #
--let $row_img_set=server_1:NOBLOB:N,server_2:NOBLOB:Y,server_3:NOBLOB:Y
--source include/rpl_row_img_set.inc
--let $expected_columns=(1,2,3,4,5,6,7,8)
--let row_img_test_script= include/rpl_row_img_sequence.inc
--source include/rpl_row_img_general_loop.inc
--let $row_img_set=server_1:FULL:N,server_2:FULL:Y,server_3:FULL:Y
--source include/rpl_row_img_set.inc
--source include/rpl_end.inc
--echo # End of tests

View file

@ -20,6 +20,7 @@
# MDEV-16091: Seconds_Behind_Master spikes to millions of seconds
#
--source include/have_debug.inc
--source include/have_debug_sync.inc
--source include/have_innodb.inc
--source include/master-slave.inc

View file

@ -1,4 +1,5 @@
--source include/have_debug.inc
--source include/have_debug_sync.inc
--source include/word_size.inc
--vertical_results

View file

@ -1,5 +1,5 @@
/* Copyright (c) 2000, 2013, Oracle and/or its affiliates.
Copyright (c) 2017, MariaDB Corporation.
Copyright (c) 2017, 2022, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -377,7 +377,7 @@ static void keycache_debug_print(const char *fmt,...);
#define KEYCACHE_DBUG_ASSERT(a) DBUG_ASSERT(a)
#endif /* defined(KEYCACHE_DEBUG_LOG) && defined(KEYCACHE_DEBUG) */
#if defined(KEYCACHE_DEBUG) || !defined(DBUG_OFF)
#if defined(KEYCACHE_DEBUG) || defined(DBUG_TRACE)
static long keycache_thread_id;
#define KEYCACHE_THREAD_TRACE(l) \
KEYCACHE_DBUG_PRINT(l,("|thread %ld",keycache_thread_id))
@ -393,7 +393,7 @@ static long keycache_thread_id;
#define KEYCACHE_THREAD_TRACE_BEGIN(l)
#define KEYCACHE_THREAD_TRACE_END(l)
#define KEYCACHE_THREAD_TRACE(l)
#endif /* defined(KEYCACHE_DEBUG) || !defined(DBUG_OFF) */
#endif /* defined(KEYCACHE_DEBUG) || defined(DBUG_TRACE) */
#define BLOCK_NUMBER(b) \
((uint) (((char*)(b)-(char *) keycache->block_root)/sizeof(BLOCK_LINK)))

View file

@ -1,5 +1,5 @@
/* Copyright (c) 2009, 2013, Oracle and/or its affiliates.
Copyright (c) 2009, 2020, MariaDB Corporation.
Copyright (c) 2009, 2022, MariaDB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -354,7 +354,7 @@ static char *debug_sync_bmove_len(char *to, char *to_end,
}
#if !defined(DBUG_OFF)
#ifdef DBUG_TRACE
/**
Create a string that describes an action.
@ -444,8 +444,7 @@ static void debug_sync_print_actions(THD *thd)
DBUG_VOID_RETURN;
}
#endif /* !defined(DBUG_OFF) */
#endif /* defined(DBUG_TRACE) */
/**
@ -776,6 +775,7 @@ static bool debug_sync_set_action(THD *thd, st_debug_sync_action *action)
else
{
const char *dsp_name= action->sync_point.c_ptr();
#ifdef DBUG_TRACE
DBUG_EXECUTE("debug_sync", {
/* Functions as DBUG_PRINT args can change keyword and line nr. */
const char *sig_emit= action->signal.c_ptr();
@ -786,6 +786,7 @@ static bool debug_sync_set_action(THD *thd, st_debug_sync_action *action)
dsp_name, action->activation_count,
action->hit_limit, action->execute, action->timeout,
sig_emit, sig_wait));});
#endif
/* Check this before sorting the array. action may move. */
is_dsp_now= !my_strcasecmp(system_charset_info, dsp_name, "now");
@ -798,7 +799,9 @@ static bool debug_sync_set_action(THD *thd, st_debug_sync_action *action)
sizeof(st_debug_sync_action), debug_sync_qsort_cmp);
}
}
#ifdef DBUG_TRACE
DBUG_EXECUTE("debug_sync_list", debug_sync_print_actions(thd););
#endif
/* Execute the special sync point 'now' if activated above. */
if (is_dsp_now)
@ -1359,7 +1362,7 @@ uchar *debug_sync_value_ptr(THD *thd)
static void debug_sync_execute(THD *thd, st_debug_sync_action *action)
{
#ifndef DBUG_OFF
#ifdef DBUG_TRACE
const char *dsp_name= action->sync_point.c_ptr();
const char *sig_emit= action->signal.c_ptr();
const char *sig_wait= action->wait_for.c_ptr();
@ -1450,12 +1453,12 @@ static void debug_sync_execute(THD *thd, st_debug_sync_action *action)
restore_current_mutex = false;
set_timespec(abstime, action->timeout);
DBUG_EXECUTE("debug_sync_exec", {
DBUG_EXECUTE("debug_sync_exec",
/* Functions as DBUG_PRINT args can change keyword and line nr. */
const char *sig_glob= debug_sync_global.ds_signal.c_ptr();
DBUG_PRINT("debug_sync_exec",
("wait for '%s' at: '%s' curr: '%s'",
sig_wait, dsp_name, sig_glob));});
sig_wait, dsp_name,
debug_sync_global.ds_signal.c_ptr())););
/*
Wait until global signal string matches the wait_for string.
@ -1469,12 +1472,12 @@ static void debug_sync_execute(THD *thd, st_debug_sync_action *action)
error= mysql_cond_timedwait(&debug_sync_global.ds_cond,
&debug_sync_global.ds_mutex,
&abstime);
DBUG_EXECUTE("debug_sync", {
DBUG_EXECUTE("debug_sync",
/* Functions as DBUG_PRINT args can change keyword and line nr. */
const char *sig_glob= debug_sync_global.ds_signal.c_ptr();
DBUG_PRINT("debug_sync",
("awoke from %s global: %s error: %d",
sig_wait, sig_glob, error));});
sig_wait, debug_sync_global.ds_signal.c_ptr(),
error)););
if (unlikely(error == ETIMEDOUT || error == ETIME))
{
// We should not make the statement fail, even if in strict mode.

View file

@ -542,7 +542,7 @@ Event_queue::empty_queue()
void
Event_queue::dbug_dump_queue(my_time_t when)
{
#ifndef DBUG_OFF
#ifdef DBUG_TRACE
my_time_t now= when;
Event_queue_element *et;
uint i;

View file

@ -3377,7 +3377,7 @@ bool Field_new_decimal::store_value(const my_decimal *decimal_value,
DBUG_ASSERT(marked_for_write_or_computed());
int error= 0;
DBUG_ENTER("Field_new_decimal::store_value");
#ifndef DBUG_OFF
#ifdef DBUG_TRACE
{
char dbug_buff[DECIMAL_MAX_STR_LENGTH+2];
DBUG_PRINT("enter", ("value: %s", dbug_decimal_as_string(dbug_buff, decimal_value)));
@ -3392,7 +3392,7 @@ bool Field_new_decimal::store_value(const my_decimal *decimal_value,
error= 1;
decimal_value= &decimal_zero;
}
#ifndef DBUG_OFF
#ifdef DBUG_TRACE
{
char dbug_buff[DECIMAL_MAX_STR_LENGTH+2];
DBUG_PRINT("info", ("saving with precision %d scale: %d value %s",
@ -3484,7 +3484,7 @@ int Field_new_decimal::store(const char *from, size_t length,
}
}
#ifndef DBUG_OFF
#ifdef DBUG_TRACE
char dbug_buff[DECIMAL_MAX_STR_LENGTH+2];
DBUG_PRINT("enter", ("value: %s",
dbug_decimal_as_string(dbug_buff, &decimal_value)));

View file

@ -116,16 +116,20 @@ static void GCALC_DBUG_PRINT_PI(const Gcalc_heap::Info *pi)
int n_buf;
if (pi->type == Gcalc_heap::nt_intersection)
{
#ifdef DBUG_TRACE
const Gcalc_scan_iterator::intersection_info *ic= i_data(pi);
GCALC_DBUG_PRINT(("intersection point %d %d",
ic->edge_a->thread, ic->edge_b->thread));
#endif
return;
}
if (pi->type == Gcalc_heap::nt_eq_node)
{
#ifdef DBUG_TRACE
const Gcalc_scan_iterator::point *e= eq_sp(pi);
GCALC_DBUG_PRINT(("eq point %d", e->thread));
#endif
return;
}
n_buf= gcalc_pi_str(buf, pi, "");

View file

@ -5689,7 +5689,7 @@ int item_create_init()
DBUG_RETURN(1);
#endif
#ifndef DBUG_OFF
#ifdef DBUG_TRACE
for (uint i=0 ; i < native_functions_hash.records ; i++)
{
Native_func_registry *func;

View file

@ -4616,10 +4616,12 @@ longlong Item_func_sleep::val_int()
mysql_cond_destroy(&cond);
#ifdef ENABLED_DEBUG_SYNC
DBUG_EXECUTE_IF("sleep_inject_query_done_debug_sync", {
debug_sync_set_action
(thd, STRING_WITH_LEN("dispatch_command_end SIGNAL query_done"));
};);
#endif
return MY_TEST(!error); // Return 1 killed
}

View file

@ -8218,10 +8218,12 @@ MYSQL_BIN_LOG::trx_group_commit_leader(group_commit_entry *leader)
DBUG_ENTER("MYSQL_BIN_LOG::trx_group_commit_leader");
{
#ifdef ENABLED_DEBUG_SYNC
DBUG_EXECUTE_IF("inject_binlog_commit_before_get_LOCK_log",
DBUG_ASSERT(!debug_sync_set_action(leader->thd, STRING_WITH_LEN
("commit_before_get_LOCK_log SIGNAL waiting WAIT_FOR cont TIMEOUT 1")));
);
#endif
/*
Lock the LOCK_log(), and once we get it, collect any additional writes
that queued up while we were waiting.
@ -10399,6 +10401,7 @@ binlog_background_thread(void *arg __attribute__((unused)))
mysql_mutex_unlock(&mysql_bin_log.LOCK_binlog_background_thread);
/* Process any incoming commit_checkpoint_notify() calls. */
#ifdef ENABLED_DEBUG_SYNC
DBUG_EXECUTE_IF("inject_binlog_background_thread_before_mark_xid_done",
DBUG_ASSERT(!debug_sync_set_action(
thd,
@ -10407,6 +10410,7 @@ binlog_background_thread(void *arg __attribute__((unused)))
"WAIT_FOR something_that_will_never_happen "
"TIMEOUT 2")));
);
#endif
while (queue)
{
long count= queue->notify_count;
@ -10421,11 +10425,13 @@ binlog_background_thread(void *arg __attribute__((unused)))
mysql_bin_log.mark_xid_done(queue->binlog_id, true);
queue= next;
#ifdef ENABLED_DEBUG_SYNC
DBUG_EXECUTE_IF("binlog_background_checkpoint_processed",
DBUG_ASSERT(!debug_sync_set_action(
thd,
STRING_WITH_LEN("now SIGNAL binlog_background_checkpoint_processed")));
);
#endif
}
if (stop)

View file

@ -734,7 +734,7 @@ public:
}
void harvest_bytes_written(Atomic_counter<uint64> *counter)
{
#ifndef DBUG_OFF
#ifdef DBUG_TRACE
char buf1[22],buf2[22];
#endif
DBUG_ENTER("harvest_bytes_written");

View file

@ -1,6 +1,6 @@
/*
Copyright (c) 2000, 2018, Oracle and/or its affiliates.
Copyright (c) 2009, 2021, MariaDB
Copyright (c) 2009, 2022, MariaDB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -1376,7 +1376,7 @@ static void copy_str_and_move(const char **src,
}
#ifndef DBUG_OFF
#ifdef DBUG_TRACE
static char const *
code_name(int code)
{

View file

@ -1187,6 +1187,7 @@ MDL_wait::timed_wait(MDL_context_owner *owner, struct timespec *abs_timeout,
wait_result != ETIMEDOUT && wait_result != ETIME)
{
#ifdef WITH_WSREP
# ifdef ENABLED_DEBUG_SYNC
// Allow tests to block the applier thread using the DBUG facilities
DBUG_EXECUTE_IF("sync.wsrep_before_mdl_wait",
{
@ -1196,6 +1197,7 @@ MDL_wait::timed_wait(MDL_context_owner *owner, struct timespec *abs_timeout,
DBUG_ASSERT(!debug_sync_set_action((owner->get_thd()),
STRING_WITH_LEN(act)));
};);
# endif
if (WSREP_ON && wsrep_thd_is_BF(owner->get_thd(), false))
{
wait_result= mysql_cond_wait(&m_COND_wait_status, &m_LOCK_wait_status);
@ -2279,7 +2281,7 @@ MDL_context::acquire_lock(MDL_request *mdl_request, double lock_wait_timeout)
MDL_ticket *ticket;
MDL_wait::enum_wait_status wait_status;
DBUG_ENTER("MDL_context::acquire_lock");
#ifndef DBUG_OFF
#ifdef DBUG_TRACE
const char *mdl_lock_name= get_mdl_lock_name(
mdl_request->key.mdl_namespace(), mdl_request->type)->str;
#endif
@ -2305,7 +2307,7 @@ MDL_context::acquire_lock(MDL_request *mdl_request, double lock_wait_timeout)
DBUG_RETURN(FALSE);
}
#ifndef DBUG_OFF
#ifdef DBUG_TRACE
const char *ticket_msg= dbug_print_mdl(ticket);
#endif

View file

@ -1674,6 +1674,7 @@ void kill_mysql(THD *thd)
DBUG_EXECUTE_IF("mysql_admin_shutdown_wait_for_slaves",
thd->lex->is_shutdown_wait_for_slaves= true;);
#ifdef ENABLED_DEBUG_SYNC
DBUG_EXECUTE_IF("simulate_delay_at_shutdown",
{
DBUG_ASSERT(binlog_dump_thread_count == 3);
@ -1683,6 +1684,7 @@ void kill_mysql(THD *thd)
DBUG_ASSERT(!debug_sync_set_action(thd,
STRING_WITH_LEN(act)));
};);
#endif
if (thd->lex->is_shutdown_wait_for_slaves)
shutdown_wait_for_slaves= true;

View file

@ -1,5 +1,5 @@
/* Copyright (c) 2000, 2016, Oracle and/or its affiliates.
Copyright (c) 2012, 2020, MariaDB Corporation.
Copyright (c) 2012, 2022, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -507,6 +507,7 @@ net_write_command(NET *net,uchar command,
DBUG_ENTER("net_write_command");
DBUG_PRINT("enter",("length: %lu", (ulong) len));
#ifdef ENABLED_DEBUG_SYNC
DBUG_EXECUTE_IF("simulate_error_on_packet_write",
{
if (command == COM_BINLOG_DUMP)
@ -518,6 +519,7 @@ net_write_command(NET *net,uchar command,
DBUG_RETURN(true);
}
};);
#endif
MYSQL_NET_WRITE_START(length);
buff[4]=command; /* For first packet */

View file

@ -1,6 +1,6 @@
/*
Copyright (c) 2000, 2010, Oracle and/or its affiliates.
Copyright (c) 2009, 2017, MariaDB Corporation
Copyright (c) 2009, 2022, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -568,7 +568,7 @@ template<bool Packed_addon_fields>
static int rr_unpack_from_tempfile(READ_RECORD *info)
{
uchar *destination= info->rec_buf;
#ifndef DBUG_OFF
#ifdef DBUG_TRACE
my_off_t where= my_b_tell(info->io_cache);
#endif
if (Packed_addon_fields)

View file

@ -264,14 +264,14 @@ public:
*/
int check_state(enum_state const target_state)
{
#ifndef DBUG_OFF
#ifdef DBUG_TRACE
static char const *state_name[] = {
"START_STATE", "TABLE_STATE", "ROW_STATE", "STATE_COUNT"
};
DBUG_ASSERT(target_state <= STATE_COUNT);
DBUG_PRINT("info", ("In state %s", state_name[m_state]));
#endif
DBUG_ASSERT(target_state <= STATE_COUNT);
if (m_state <= target_state && target_state <= m_state + 1 &&
m_state < STATE_COUNT)

View file

@ -247,6 +247,7 @@ finish_event_group(rpl_parallel_thread *rpt, uint64 sub_id,
entry->stop_on_error_sub_id == (uint64)ULONGLONG_MAX)
entry->stop_on_error_sub_id= sub_id;
mysql_mutex_unlock(&entry->LOCK_parallel_entry);
#ifdef ENABLED_DEBUG_SYNC
DBUG_EXECUTE_IF("hold_worker_on_schedule", {
if (entry->stop_on_error_sub_id < (uint64)ULONGLONG_MAX)
{
@ -261,6 +262,7 @@ finish_event_group(rpl_parallel_thread *rpt, uint64 sub_id,
STRING_WITH_LEN("now WAIT_FOR proceed_by_1000"));
}
});
#endif
if (rgi->killed_for_retry == rpl_group_info::RETRY_KILL_PENDING)
wait_for_pending_deadlock_kill(thd, rgi);
@ -774,6 +776,7 @@ do_retry:
rgi->killed_for_retry= rpl_group_info::RETRY_KILL_KILLED;
thd->set_killed(KILL_CONNECTION);
});
#ifdef ENABLED_DEBUG_SYNC
DBUG_EXECUTE_IF("rpl_parallel_simulate_wait_at_retry", {
if (rgi->current_gtid.seq_no == 1001) {
debug_sync_set_action(thd,
@ -781,6 +784,7 @@ do_retry:
}
DEBUG_SYNC(thd, "rpl_parallel_simulate_wait_at_retry");
});
#endif
rgi->cleanup_context(thd, 1);
wait_for_pending_deadlock_kill(thd, rgi);
@ -1191,6 +1195,7 @@ handle_rpl_parallel_thread(void *arg)
bool did_enter_cond= false;
PSI_stage_info old_stage;
#ifdef ENABLED_DEBUG_SYNC
DBUG_EXECUTE_IF("hold_worker_on_schedule", {
if (rgi->current_gtid.domain_id == 0 &&
rgi->current_gtid.seq_no == 100) {
@ -1205,6 +1210,7 @@ handle_rpl_parallel_thread(void *arg)
STRING_WITH_LEN("now SIGNAL scheduled_gtid_0_x_100"));
}
});
#endif
if(unlikely(thd->wait_for_commit_ptr) && group_rgi != NULL)
{
@ -2184,11 +2190,13 @@ rpl_parallel_entry::choose_thread(rpl_group_info *rgi, bool *did_enter_cond,
unlock_or_exit_cond(rli->sql_driver_thd, &thr->LOCK_rpl_thread,
did_enter_cond, old_stage);
my_error(ER_CONNECTION_KILLED, MYF(0));
#ifdef ENABLED_DEBUG_SYNC
DBUG_EXECUTE_IF("rpl_parallel_wait_queue_max",
{
debug_sync_set_action(rli->sql_driver_thd,
STRING_WITH_LEN("now SIGNAL wait_queue_killed"));
};);
#endif
slave_output_error_info(rgi, rli->sql_driver_thd);
return NULL;
}
@ -2206,11 +2214,13 @@ rpl_parallel_entry::choose_thread(rpl_group_info *rgi, bool *did_enter_cond,
Because debug_sync changes the thd->mysys_var->current_mutex,
and this can cause THD::awake to use the wrong mutex.
*/
#ifdef ENABLED_DEBUG_SYNC
DBUG_EXECUTE_IF("rpl_parallel_wait_queue_max",
{
debug_sync_set_action(rli->sql_driver_thd,
STRING_WITH_LEN("now SIGNAL wait_queue_ready"));
};);
#endif
rli->sql_driver_thd->ENTER_COND(&thr->COND_rpl_thread_queue,
&thr->LOCK_rpl_thread,
&stage_waiting_for_room_in_worker_thread,
@ -2365,11 +2375,13 @@ rpl_parallel::wait_for_done(THD *thd, Relay_log_info *rli)
}
}
}
#ifdef ENABLED_DEBUG_SYNC
DBUG_EXECUTE_IF("rpl_parallel_wait_for_done_trigger",
{
debug_sync_set_action(thd,
STRING_WITH_LEN("now SIGNAL wait_for_done_waiting"));
};);
#endif
for (i= 0; i < domain_hash.records; ++i)
{

View file

@ -1,5 +1,5 @@
/* Copyright (c) 2007, 2013, Oracle and/or its affiliates.
Copyright (c) 2008, 2019, MariaDB Corporation.
Copyright (c) 2008, 2022, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -319,7 +319,9 @@ unpack_row(rpl_group_info *rgi,
normal unpack operation.
*/
uint16 const metadata= tabledef->field_metadata(i);
IF_DBUG(uchar const *const old_pack_ptr= pack_ptr;,)
#ifdef DBUG_TRACE
uchar const *const old_pack_ptr= pack_ptr;
#endif
pack_ptr= f->unpack(f->ptr, pack_ptr, row_end, metadata);
DBUG_PRINT("debug", ("field: %s; metadata: 0x%x;"

View file

@ -226,7 +226,7 @@ extern "C" my_bool wsrep_thd_bf_abort(THD *bf_thd, THD *victim_thd,
{
mysql_mutex_assert_owner(&victim_thd->LOCK_thd_kill);
mysql_mutex_assert_owner(&victim_thd->LOCK_thd_data);
#ifdef ENABLED_DEBUG_SYNC
DBUG_EXECUTE_IF("sync.before_wsrep_thd_abort",
{
const char act[]=
@ -236,7 +236,7 @@ extern "C" my_bool wsrep_thd_bf_abort(THD *bf_thd, THD *victim_thd,
DBUG_ASSERT(!debug_sync_set_action(bf_thd,
STRING_WITH_LEN(act)));
};);
#endif
my_bool ret= wsrep_bf_abort(bf_thd, victim_thd);
/*
Send awake signal if victim was BF aborted or does not

View file

@ -3841,12 +3841,14 @@ apply_event_and_update_pos_apply(Log_event* ev, THD* thd, rpl_group_info *rgi,
Relay_log_info* rli= rgi->rli;
DBUG_ENTER("apply_event_and_update_pos_apply");
#ifdef ENABLED_DEBUG_SYNC
DBUG_EXECUTE_IF("inject_slave_sql_before_apply_event",
{
DBUG_ASSERT(!debug_sync_set_action
(thd, STRING_WITH_LEN("now WAIT_FOR continue")));
DBUG_SET_INITIAL("-d,inject_slave_sql_before_apply_event");
};);
#endif
if (reason == Log_event::EVENT_SKIP_NOT)
exec_res= ev->apply_event(rgi);
@ -3875,7 +3877,7 @@ apply_event_and_update_pos_apply(Log_event* ev, THD* thd, rpl_group_info *rgi,
}
#endif
#ifndef DBUG_OFF
#ifdef DBUG_TRACE
/*
This only prints information to the debug trace.
@ -3901,7 +3903,7 @@ apply_event_and_update_pos_apply(Log_event* ev, THD* thd, rpl_group_info *rgi,
if (exec_res == 0)
{
int error= ev->update_pos(rgi);
#ifndef DBUG_OFF
#ifdef DBUG_TRACE
DBUG_PRINT("info", ("update_pos error = %d", error));
if (!rli->belongs_to_client())
{
@ -4432,6 +4434,7 @@ static int exec_relay_log_event(THD* thd, Relay_log_info* rli,
#ifdef WITH_WSREP
wsrep_after_statement(thd);
#endif /* WITH_WSREP */
#ifdef ENABLED_DEBUG_SYNC
DBUG_EXECUTE_IF(
"pause_sql_thread_on_fde",
if (ev && typ == FORMAT_DESCRIPTION_EVENT) {
@ -4440,6 +4443,7 @@ static int exec_relay_log_event(THD* thd, Relay_log_info* rli,
STRING_WITH_LEN(
"now SIGNAL paused_on_fde WAIT_FOR sql_thread_continue")));
});
#endif
DBUG_RETURN(exec_res);
}

View file

@ -41,14 +41,13 @@ static int check_event_type(int type, Relay_log_info *rli)
*/
if (fd_event && fd_event->event_type_permutation)
{
IF_DBUG({
int new_type= fd_event->event_type_permutation[type];
DBUG_PRINT("info",
("converting event type %d to %d (%s)",
type, new_type,
Log_event::get_type_str((Log_event_type)new_type)));
},
(void)0);
#ifdef DBUG_TRACE
int new_type= fd_event->event_type_permutation[type];
DBUG_PRINT("info",
("converting event type %d to %d (%s)",
type, new_type,
Log_event::get_type_str((Log_event_type)new_type)));
#endif
type= fd_event->event_type_permutation[type];
}

View file

@ -4767,7 +4767,7 @@ void Query_cache::cache_dump()
void Query_cache::queries_dump()
{
#ifdef DBUG_TRACE
if (!initialized)
{
DBUG_PRINT("qcache", ("Query Cache not initialized"));
@ -4828,11 +4828,13 @@ void Query_cache::queries_dump()
DBUG_PRINT("qcache", ("no queries in list"));
}
DBUG_PRINT("qcache", ("------------------"));
#endif
}
void Query_cache::tables_dump()
{
#ifdef DBUG_TRACE
if (!initialized || query_cache_size == 0)
{
DBUG_PRINT("qcache", ("Query Cache not initialized"));
@ -4855,6 +4857,7 @@ void Query_cache::tables_dump()
else
DBUG_PRINT("qcache", ("no tables in list"));
DBUG_PRINT("qcache", ("--------------------"));
#endif
}

View file

@ -7352,7 +7352,7 @@ int THD::binlog_flush_pending_rows_event(bool stmt_end, bool is_transactional)
}
#if !defined(DBUG_OFF) && !defined(_lint)
#if defined(DBUG_TRACE) && !defined(_lint)
static const char *
show_query_type(THD::enum_binlog_query_type qtype)
{

View file

@ -7941,6 +7941,7 @@ static bool wsrep_mysql_parse(THD *thd, char *rawbuf, uint length,
thd->lex->sql_command != SQLCOM_SELECT &&
thd->wsrep_retry_counter < thd->variables.wsrep_retry_autocommit)
{
#ifdef ENABLED_DEBUG_SYNC
DBUG_EXECUTE_IF("sync.wsrep_retry_autocommit",
{
const char act[]=
@ -7949,6 +7950,7 @@ static bool wsrep_mysql_parse(THD *thd, char *rawbuf, uint length,
"WAIT_FOR wsrep_retry_autocommit_continue";
DBUG_ASSERT(!debug_sync_set_action(thd, STRING_WITH_LEN(act)));
});
#endif
WSREP_DEBUG("wsrep retrying AC query: %lu %s",
thd->wsrep_retry_counter, wsrep_thd_query(thd));
wsrep_prepare_for_autocommit_retry(thd, rawbuf, length, parser_state);

View file

@ -1,5 +1,5 @@
/* Copyright (c) 2000, 2018, Oracle and/or its affiliates.
Copyright (c) 2008, 2020, MariaDB Corporation
Copyright (c) 2008, 2022, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -2866,6 +2866,7 @@ void mysql_binlog_send(THD* thd, char* log_ident, my_off_t pos,
info->error= ER_UNKNOWN_ERROR;
goto err;
}
#ifdef ENABLED_DEBUG_SYNC
DBUG_EXECUTE_IF("simulate_delay_at_shutdown",
{
const char act[]=
@ -2874,6 +2875,7 @@ void mysql_binlog_send(THD* thd, char* log_ident, my_off_t pos,
DBUG_ASSERT(!debug_sync_set_action(thd,
STRING_WITH_LEN(act)));
};);
#endif
/*
heartbeat_period from @master_heartbeat_period user variable
@ -2963,12 +2965,14 @@ void mysql_binlog_send(THD* thd, char* log_ident, my_off_t pos,
if (should_stop(info))
break;
#ifdef ENABLED_DEBUG_SYNC
DBUG_EXECUTE_IF("wait_after_binlog_EOF",
{
const char act[]= "now wait_for signal.rotate_finished";
DBUG_ASSERT(!debug_sync_set_action(current_thd,
STRING_WITH_LEN(act)));
};);
#endif
THD_STAGE_INFO(thd,
stage_finished_reading_one_binlog_switching_to_next_binlog);

View file

@ -10129,7 +10129,7 @@ bool mysql_alter_table(THD *thd, const LEX_CSTRING *new_db,
DEBUG_SYNC(thd, "alter_opened_table");
#ifdef WITH_WSREP
#if defined WITH_WSREP && defined ENABLED_DEBUG_SYNC
DBUG_EXECUTE_IF("sync.alter_opened_table",
{
const char act[]=

View file

@ -615,7 +615,7 @@ bool mysql_create_or_drop_trigger(THD *thd, TABLE_LIST *tables, bool create)
goto end;
}
#ifdef WITH_WSREP
#if defined WITH_WSREP && defined ENABLED_DEBUG_SYNC
DBUG_EXECUTE_IF("sync.mdev_20225",
{
const char act[]=
@ -624,7 +624,7 @@ bool mysql_create_or_drop_trigger(THD *thd, TABLE_LIST *tables, bool create)
DBUG_ASSERT(!debug_sync_set_action(thd,
STRING_WITH_LEN(act)));
};);
#endif /* WITH_WSREP */
#endif /* WITH_WSREP && ENABLED_DEBUG_SYNC */
result= (create ?
table->triggers->create_trigger(thd, tables, &stmt_query):

View file

@ -620,7 +620,7 @@ int mysql_create_function(THD *thd,udf_func *udf)
/* Allow creation of functions even if we can't open func table */
if (unlikely(!table))
goto err;
goto err_open_func_table;
table->use_all_columns();
restore_record(table, s->default_values); // Default values for fields
table->field[0]->store(u_d->name.str, u_d->name.length, system_charset_info);
@ -634,7 +634,7 @@ int mysql_create_function(THD *thd,udf_func *udf)
{
my_error(ER_ERROR_ON_WRITE, MYF(0), "mysql.func", error);
del_udf(u_d);
goto err;
goto err_open_func_table;
}
done:
@ -649,6 +649,7 @@ done:
err:
if (new_dl)
dlclose(dl);
err_open_func_table:
mysql_rwlock_unlock(&THR_LOCK_udf);
DBUG_RETURN(1);
}

View file

@ -8763,7 +8763,7 @@ int TABLE::update_virtual_fields(handler *h, enum_vcol_update_mode update_mode)
{
/* Compute the actual value of the virtual fields */
DBUG_FIX_WRITE_SET(vf);
# ifndef DBUG_OFF
# ifdef DBUG_TRACE
int field_error=
# endif
vcol_info->expr->save_in_field(vf, 0);

View file

@ -405,6 +405,7 @@ int Wsrep_high_priority_service::apply_toi(const wsrep::ws_meta& ws_meta,
WSREP_DEBUG("Wsrep_high_priority_service::apply_toi: %lld",
client_state.toi_meta().seqno().get());
#ifdef ENABLED_DEBUG_SYNC
DBUG_EXECUTE_IF("sync.wsrep_apply_toi",
{
const char act[]=
@ -414,6 +415,7 @@ int Wsrep_high_priority_service::apply_toi(const wsrep::ws_meta& ws_meta,
DBUG_ASSERT(!debug_sync_set_action(thd,
STRING_WITH_LEN(act)));
};);
#endif
int ret= apply_events(thd, m_rli, data, err);
wsrep_thd_set_ignored_error(thd, false);
@ -459,6 +461,7 @@ int Wsrep_high_priority_service::log_dummy_write_set(const wsrep::ws_handle& ws_
DBUG_PRINT("info",
("Wsrep_high_priority_service::log_dummy_write_set: seqno=%lld",
ws_meta.seqno().get()));
#ifdef ENABLED_DEBUG_SYNC
DBUG_EXECUTE_IF("sync.wsrep_log_dummy_write_set",
{
const char act[]=
@ -467,6 +470,7 @@ int Wsrep_high_priority_service::log_dummy_write_set(const wsrep::ws_handle& ws_
DBUG_ASSERT(!debug_sync_set_action(m_thd,
STRING_WITH_LEN(act)));
};);
#endif
if (ws_meta.ordered())
{
@ -562,8 +566,8 @@ int Wsrep_applier_service::apply_write_set(const wsrep::ws_meta& ws_meta,
/* moved dbug sync point here, after possible THD switch for SR transactions
has ben done
*/
/* Allow tests to block the applier thread using the DBUG facilities */
#ifdef ENABLED_DEBUG_SYNC
/* Allow tests to block the applier thread using the DBUG facilities */
DBUG_EXECUTE_IF("sync.wsrep_apply_cb",
{
const char act[]=
@ -716,6 +720,7 @@ int Wsrep_replayer_service::apply_write_set(const wsrep::ws_meta& ws_meta,
DBUG_ASSERT(thd->wsrep_trx().active());
DBUG_ASSERT(thd->wsrep_trx().state() == wsrep::transaction::s_replaying);
#ifdef ENABLED_DEBUG_SYNC
/* Allow tests to block the replayer thread using the DBUG facilities */
DBUG_EXECUTE_IF("sync.wsrep_replay_cb",
{
@ -726,6 +731,7 @@ int Wsrep_replayer_service::apply_write_set(const wsrep::ws_meta& ws_meta,
DBUG_ASSERT(!debug_sync_set_action(thd,
STRING_WITH_LEN(act)));
};);
#endif
wsrep_setup_uk_and_fk_checks(thd);

View file

@ -709,11 +709,14 @@ static std::string wsrep_server_incoming_address()
/*
In case port is not specified in wsrep_node_incoming_address, we use
mysqld_port.
Note that we might get here before we execute set_ports().
*/
int port= (addr.get_port() > 0) ? addr.get_port() : (int) mysqld_port;
int local_port= (addr.get_port() > 0) ? addr.get_port() : (int) mysqld_port;
if (!local_port)
local_port= MYSQL_PORT;
const char *fmt= (addr.is_ipv6()) ? "[%s]:%u" : "%s:%u";
snprintf(inc_addr, inc_addr_max, fmt, addr.get_address(), port);
snprintf(inc_addr, inc_addr_max, fmt, addr.get_address(), local_port);
}
done:

View file

@ -386,6 +386,7 @@ int Wsrep_server_service::wait_committing_transactions(int timeout)
void Wsrep_server_service::debug_sync(const char* sync_point)
{
#ifdef ENABLED_DEBUG_SYNC
DBUG_EXECUTE_IF(sync_point, {
std::stringstream dbug_action;
dbug_action << "now "
@ -396,4 +397,5 @@ void Wsrep_server_service::debug_sync(const char* sync_point)
action.c_str(),
action.length()));
};);
#endif
}

View file

@ -1739,6 +1739,7 @@ wait_signal:
WSREP_INFO("Donor state reached");
#ifdef ENABLED_DEBUG_SYNC
DBUG_EXECUTE_IF("sync.wsrep_donor_state",
{
const char act[]=
@ -1748,6 +1749,7 @@ wait_signal:
assert(!debug_sync_set_action(thd.ptr,
STRING_WITH_LEN(act)));
};);
#endif
goto wait_signal;
}

View file

@ -348,6 +348,7 @@ bool wsrep_bf_abort(THD* bf_thd, THD* victim_thd)
mysql_mutex_assert_owner(&victim_thd->LOCK_thd_data);
mysql_mutex_assert_owner(&victim_thd->LOCK_thd_kill);
#ifdef ENABLED_DEBUG_SYNC
DBUG_EXECUTE_IF("sync.wsrep_bf_abort",
{
const char act[]=
@ -357,6 +358,7 @@ bool wsrep_bf_abort(THD* bf_thd, THD* victim_thd)
DBUG_ASSERT(!debug_sync_set_action(bf_thd,
STRING_WITH_LEN(act)));
};);
#endif
if (WSREP(victim_thd) && !victim_thd->wsrep_trx().active())
{

View file

@ -800,7 +800,7 @@ que_node_get_containing_loop_node(
return(node);
}
#ifndef DBUG_OFF
#ifdef DBUG_TRACE
/** Gets information of an SQL query graph node.
@return type description */
static MY_ATTRIBUTE((warn_unused_result, nonnull))
@ -857,7 +857,7 @@ que_node_type_string(
return("UNKNOWN NODE TYPE");
}
}
#endif /* !DBUG_OFF */
#endif /* DBUG_TRACE */
/**********************************************************************//**
Performs an execution step on a query thread.

View file

@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 2011, 2018, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2017, 2021, MariaDB Corporation.
Copyright (c) 2017, 2022, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
@ -2173,6 +2173,7 @@ func_exit:
}
func_exit_committed:
ut_ad(mtr.has_committed());
ut_free(pcur.old_rec_buf);
if (error != DB_SUCCESS) {
/* Report the erroneous row using the new
@ -2360,7 +2361,8 @@ func_exit_committed:
entry = row_build_index_entry(old_row, old_ext, index, heap);
if (!entry) {
ut_ad(0);
return(DB_CORRUPTION);
error = DB_CORRUPTION;
goto func_exit_committed;
}
mtr_start(&mtr);

View file

@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 1997, 2017, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2017, 2021, MariaDB Corporation.
Copyright (c) 2017, 2022, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software

View file

@ -1069,7 +1069,7 @@ static int chk_index(HA_CHECK *param, MARIA_HA *info, MARIA_KEYDEF *keyinfo,
share->state.state.data_file_length) ||
(share->data_file_type == NO_RECORD && record != 0))
{
#ifndef DBUG_OFF
#ifdef DBUG_TRACE
char llbuff2[22], llbuff3[22];
#endif
_ma_check_print_error(param,

View file

@ -2661,7 +2661,7 @@ static my_bool translog_buffer_flush(struct st_translog_buffer *buffer)
i < buffer->size;
i+= TRANSLOG_PAGE_SIZE, pg++)
{
#ifndef DBUG_OFF
#ifdef DBUG_TRACE
TRANSLOG_ADDRESS addr= (buffer->offset + i);
#endif
DBUG_PRINT("info", ("send log form %lu till %lu address: " LSN_FMT " "
@ -2908,7 +2908,7 @@ static my_bool translog_page_validator(int res, PAGECACHE_IO_HOOK_ARGS *args)
uint flags;
uchar *page_pos;
TRANSLOG_FILE *data= (TRANSLOG_FILE *) args->data;
#ifndef DBUG_OFF
#ifdef DBUG_TRACE
pgcache_page_no_t offset= page_no * TRANSLOG_PAGE_SIZE;
#endif
DBUG_ENTER("translog_page_validator");
@ -3268,7 +3268,7 @@ static my_bool translog_get_last_page_addr(TRANSLOG_ADDRESS *addr,
my_off_t file_size;
uint32 file_no= LSN_FILE_NO(*addr);
TRANSLOG_FILE *file;
#ifndef DBUG_OFF
#ifdef DBUG_TRACE
char buff[21];
#endif
DBUG_ENTER("translog_get_last_page_addr");

View file

@ -190,7 +190,7 @@ struct st_pagecache_hash_link
enum PCBLOCK_TEMPERATURE { PCBLOCK_COLD /*free*/ , PCBLOCK_WARM , PCBLOCK_HOT };
/* debug info */
#ifndef DBUG_OFF
#ifdef DBUG_TRACE
static const char *page_cache_page_type_str[]=
{
/* used only for control page type changing during debugging */
@ -225,8 +225,9 @@ static const char *page_cache_page_pin_str[]=
"unpinned -> pinned",
"pinned -> unpinned"
};
#endif /* DBUG_TRACE */
#ifndef DBUG_OFF
typedef struct st_pagecache_pin_info
{
struct st_pagecache_pin_info *next, **prev;
@ -563,7 +564,7 @@ static void pagecache_debug_print _VARARGS((const char *fmt, ...));
#define KEYCACHE_DBUG_ASSERT(a) DBUG_ASSERT(a)
#endif /* defined(PAGECACHE_DEBUG) */
#if defined(PAGECACHE_DEBUG) || !defined(DBUG_OFF)
#if defined(PAGECACHE_DEBUG) || defined(DBUG_TRACE)
static my_thread_id pagecache_thread_id;
#define KEYCACHE_THREAD_TRACE(l) \
KEYCACHE_DBUG_PRINT(l,("|thread %lld",pagecache_thread_id))
@ -581,7 +582,7 @@ static my_thread_id pagecache_thread_id;
#define KEYCACHE_THREAD_TRACE_BEGIN(l)
#define KEYCACHE_THREAD_TRACE_END(l)
#define KEYCACHE_THREAD_TRACE(l)
#endif /* defined(PAGECACHE_DEBUG) || !defined(DBUG_OFF) */
#endif /* defined(PAGECACHE_DEBUG) || defined(DBUG_TRACE) */
#define PCBLOCK_NUMBER(p, b) \
((uint) (((char*)(b)-(char *) p->block_root)/sizeof(PAGECACHE_BLOCK_LINK)))
@ -3714,8 +3715,9 @@ uchar *pagecache_read(PAGECACHE *pagecache,
unlock_pin= lock_to_pin[buff==0][lock].unlock_pin;
PAGECACHE_BLOCK_LINK *fake_link;
my_bool reg_request;
#ifndef DBUG_OFF
#ifdef DBUG_TRACE
char llbuf[22];
#endif
DBUG_ENTER("pagecache_read");
DBUG_PRINT("enter", ("fd: %u page: %s buffer: %p level: %u "
"t:%s (%d)%s->%s %s->%s big block: %d",
@ -3731,7 +3733,6 @@ uchar *pagecache_read(PAGECACHE *pagecache,
DBUG_ASSERT(buff != 0 || (buff == 0 && (unlock_pin == PAGECACHE_PIN ||
unlock_pin == PAGECACHE_PIN_LEFT_PINNED)));
DBUG_ASSERT(pageno < ((1ULL) << 40));
#endif
if (!page_link)
page_link= &fake_link;
@ -4375,8 +4376,9 @@ my_bool pagecache_write_part(PAGECACHE *pagecache,
my_bool error= 0;
int need_lock_change= write_lock_change_table[lock].need_lock_change;
my_bool reg_request;
#ifndef DBUG_OFF
#ifdef DBUG_TRACE
char llbuf[22];
#endif
DBUG_ENTER("pagecache_write_part");
DBUG_PRINT("enter", ("fd: %u page: %s level: %u type: %s lock: %s "
"pin: %s mode: %s offset: %u size %u",
@ -4392,7 +4394,6 @@ my_bool pagecache_write_part(PAGECACHE *pagecache,
DBUG_ASSERT(offset + size <= pagecache->block_size);
DBUG_ASSERT(pageno < ((1ULL) << 40));
DBUG_ASSERT(pagecache->big_block_read == 0);
#endif
if (!page_link)
page_link= &fake_link;

View file

@ -661,14 +661,10 @@ err:
static void *test_thread(void *arg)
{
#ifndef DBUG_OFF
int param= *((int*) arg);
#endif
my_thread_init();
{
DBUG_ENTER("test_thread");
DBUG_PRINT("enter", ("param: %d", param));
DBUG_PRINT("enter", ("param: %d", *(int*) arg));
if (!simple_read_write_test() ||
!simple_read_change_write_read_test() ||

View file

@ -858,7 +858,7 @@ static int chk_index(HA_CHECK *param, MI_INFO *info, MI_KEYDEF *keyinfo,
}
if (record >= info->state->data_file_length)
{
#ifndef DBUG_OFF
#ifdef DBUG_TRACE
char llbuff2[22], llbuff3[22];
#endif
mi_check_print_error(param,"Found key at page %s that points to record outside datafile",llstr(page,llbuff));

View file

@ -704,7 +704,7 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs,
if (mi_state_info_write(file, &share.state, 2) ||
mi_base_info_write(file, &share.base))
goto err;
#ifndef DBUG_OFF
#ifdef DBUG_TRACE
if ((uint) mysql_file_tell(file, MYF(0)) != base_pos + MI_BASE_INFO_SIZE)
{
uint pos=(uint) mysql_file_tell(file, MYF(0));
@ -804,12 +804,12 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs,
if (mi_recinfo_write(file, &recinfo[i]))
goto err;
#ifndef DBUG_OFF
if ((uint) mysql_file_tell(file, MYF(0)) != info_length)
#ifdef DBUG_TRACE
{
uint pos= (uint) mysql_file_tell(file, MYF(0));
DBUG_PRINT("warning",("info_length: %d != used_length: %d",
info_length, pos));
if (pos != info_length)
DBUG_PRINT("warning",("info_length: %d != used_length: %d",
info_length, pos));
}
#endif

View file

@ -0,0 +1,8 @@
--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.1.1.expect
--exec echo "wait" > $_expect_file_name
--shutdown_server
--source include/wait_until_disconnected.inc
--exec echo "restart" > $_expect_file_name
--enable_reconnect
--source include/wait_until_connected_again.inc

View file

@ -0,0 +1,12 @@
CREATE TABLE t (c INT);
SHOW CREATE TABLE t;
Table Create Table
t CREATE TABLE `t` (
`c` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
FLUSH TABLES WITH READ LOCK;
CREATE FUNCTION spider_bg_direct_sql RETURNS INT SONAME 'ha_spider.so';
ERROR HY000: Can't execute the query because you have a conflicting read lock
SELECT * FROM t;
c
DROP TABLE t;

View file

@ -0,0 +1,11 @@
CREATE TABLE t (c INT);
SHOW CREATE TABLE t;
FLUSH TABLES WITH READ LOCK;
--error ER_CANT_UPDATE_WITH_READLOCK
CREATE FUNCTION spider_bg_direct_sql RETURNS INT SONAME 'ha_spider.so';
SELECT * FROM t;
--source include/restart_spider.inc
DROP TABLE t;

View file

@ -1858,6 +1858,8 @@ group_by_handler *spider_create_group_by_handler(
{
for (order = query->order_by; order; order = order->next)
{
if ((*order->item)->type() == Item::SUM_FUNC_ITEM)
continue;
if (spider_db_print_item_type((*order->item), NULL, spider, NULL, NULL, 0,
roop_count, TRUE, fields_arg))
{