Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.3(EOL), 10.4(EOL), 10.5, 10.6
-
None
Description
Hit this when working on MDEV-25304:
Apply this patch:
diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc
|
index 084259d863d..fbc1e637abc 100644
|
--- a/sql/sql_repl.cc
|
+++ b/sql/sql_repl.cc
|
@@ -3966,6 +3966,8 @@ int reset_master(THD* thd, rpl_gtid *init_state, uint32 init_state_len,
|
ret= mysql_bin_log.reset_logs(thd, 1, init_state, init_state_len,
|
next_log_number);
|
repl_semisync_master.after_reset_master();
|
+ DBUG_EXECUTE_IF("reset_master_done", DBUG_SUICIDE(););
|
+
|
return ret;
|
}
|
|
then run this testcase (put in storage/rocksdb/mysql-test/rocksdb/t/binlog_rotate.test ):
--source include/have_rocksdb.inc
|
--source include/have_log_bin.inc
|
|
set global rocksdb_flush_log_at_trx_commit=1; |
|
create table t1 (a int, b int, key(a)) engine=rocksdb; |
insert into t1 values (1,1),(2,2); |
select * from t1; |
flush tables;
|
|
--write_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
restart
|
EOF
|
|
set @@debug_dbug="+d,reset_master_done"; |
|
--disable_reconnect
|
--error 0,2013
|
RESET MASTER;
|
--enable_reconnect
|
--source include/wait_until_connected_again.inc
|
select * from t1; |
|
drop table t1; |
and observe:
...
|
set global rocksdb_flush_log_at_trx_commit=1;
|
create table t1 (a int, b int, key(a)) engine=rocksdb;
|
insert into t1 values (1,1),(2,2);
|
select * from t1;
|
a b
|
1 1
|
2 2
|
flush tables;
|
set @@debug_dbug="+d,reset_master_done";
|
RESET MASTER;
|
select * from t1;
|
a b
|
drop table t1;
|
The INSERTs are lost.
Attachments
Issue Links
- relates to
-
MDEV-25304 Atomic ALTER TABLE: MyRocks support
-
- Closed
-
Activity
Field | Original Value | New Value |
---|---|---|
Component/s | Storage Engine - RocksDB [ 13901 ] |
Component/s | Replication [ 10100 ] |
Affects Version/s | 10.6 [ 24028 ] |
Fix Version/s | 10.6 [ 24028 ] |
Description |
Apply this patch:
{code:diff} diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc index 084259d863d..fbc1e637abc 100644 --- a/sql/sql_repl.cc +++ b/sql/sql_repl.cc @@ -3966,6 +3966,8 @@ int reset_master(THD* thd, rpl_gtid *init_state, uint32 init_state_len, ret= mysql_bin_log.reset_logs(thd, 1, init_state, init_state_len, next_log_number); repl_semisync_master.after_reset_master(); + DBUG_EXECUTE_IF("reset_master_done", DBUG_SUICIDE();); + return ret; } {code} and |
Description |
Apply this patch:
{code:diff} diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc index 084259d863d..fbc1e637abc 100644 --- a/sql/sql_repl.cc +++ b/sql/sql_repl.cc @@ -3966,6 +3966,8 @@ int reset_master(THD* thd, rpl_gtid *init_state, uint32 init_state_len, ret= mysql_bin_log.reset_logs(thd, 1, init_state, init_state_len, next_log_number); repl_semisync_master.after_reset_master(); + DBUG_EXECUTE_IF("reset_master_done", DBUG_SUICIDE();); + return ret; } {code} and |
Apply this patch:
{code:diff} diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc index 084259d863d..fbc1e637abc 100644 --- a/sql/sql_repl.cc +++ b/sql/sql_repl.cc @@ -3966,6 +3966,8 @@ int reset_master(THD* thd, rpl_gtid *init_state, uint32 init_state_len, ret= mysql_bin_log.reset_logs(thd, 1, init_state, init_state_len, next_log_number); repl_semisync_master.after_reset_master(); + DBUG_EXECUTE_IF("reset_master_done", DBUG_SUICIDE();); + return ret; } {code} then run this testcase (put in {{storage/rocksdb/mysql-test/rocksdb/t/binlog_rotate.test}} ): {code:sql} --source include/have_rocksdb.inc --source include/have_log_bin.inc set global rocksdb_flush_log_at_trx_commit=1; create table t1 (a int, b int, key(a)) engine=rocksdb; insert into t1 values (1,1),(2,2); select * from t1; flush tables; --write_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect restart EOF set @@debug_dbug="+d,reset_master_done"; --disable_reconnect --error 0,2013 RESET MASTER; --enable_reconnect --source include/wait_until_connected_again.inc select * from t1; drop table t1; {code} and observe: |
Description |
Apply this patch:
{code:diff} diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc index 084259d863d..fbc1e637abc 100644 --- a/sql/sql_repl.cc +++ b/sql/sql_repl.cc @@ -3966,6 +3966,8 @@ int reset_master(THD* thd, rpl_gtid *init_state, uint32 init_state_len, ret= mysql_bin_log.reset_logs(thd, 1, init_state, init_state_len, next_log_number); repl_semisync_master.after_reset_master(); + DBUG_EXECUTE_IF("reset_master_done", DBUG_SUICIDE();); + return ret; } {code} then run this testcase (put in {{storage/rocksdb/mysql-test/rocksdb/t/binlog_rotate.test}} ): {code:sql} --source include/have_rocksdb.inc --source include/have_log_bin.inc set global rocksdb_flush_log_at_trx_commit=1; create table t1 (a int, b int, key(a)) engine=rocksdb; insert into t1 values (1,1),(2,2); select * from t1; flush tables; --write_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect restart EOF set @@debug_dbug="+d,reset_master_done"; --disable_reconnect --error 0,2013 RESET MASTER; --enable_reconnect --source include/wait_until_connected_again.inc select * from t1; drop table t1; {code} and observe: |
Apply this patch:
{code:diff} diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc index 084259d863d..fbc1e637abc 100644 --- a/sql/sql_repl.cc +++ b/sql/sql_repl.cc @@ -3966,6 +3966,8 @@ int reset_master(THD* thd, rpl_gtid *init_state, uint32 init_state_len, ret= mysql_bin_log.reset_logs(thd, 1, init_state, init_state_len, next_log_number); repl_semisync_master.after_reset_master(); + DBUG_EXECUTE_IF("reset_master_done", DBUG_SUICIDE();); + return ret; } {code} then run this testcase (put in {{storage/rocksdb/mysql-test/rocksdb/t/binlog_rotate.test}} ): {code:sql} --source include/have_rocksdb.inc --source include/have_log_bin.inc set global rocksdb_flush_log_at_trx_commit=1; create table t1 (a int, b int, key(a)) engine=rocksdb; insert into t1 values (1,1),(2,2); select * from t1; flush tables; --write_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect restart EOF set @@debug_dbug="+d,reset_master_done"; --disable_reconnect --error 0,2013 RESET MASTER; --enable_reconnect --source include/wait_until_connected_again.inc select * from t1; drop table t1; {code} and observe: {code} ... set global rocksdb_flush_log_at_trx_commit=1; create table t1 (a int, b int, key(a)) engine=rocksdb; insert into t1 values (1,1),(2,2); select * from t1; a b 1 1 2 2 flush tables; set @@debug_dbug="+d,reset_master_done"; RESET MASTER; select * from t1; a b drop table t1; {code} The INSERTs are lost. |
Link |
This issue relates to |
Description |
Apply this patch:
{code:diff} diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc index 084259d863d..fbc1e637abc 100644 --- a/sql/sql_repl.cc +++ b/sql/sql_repl.cc @@ -3966,6 +3966,8 @@ int reset_master(THD* thd, rpl_gtid *init_state, uint32 init_state_len, ret= mysql_bin_log.reset_logs(thd, 1, init_state, init_state_len, next_log_number); repl_semisync_master.after_reset_master(); + DBUG_EXECUTE_IF("reset_master_done", DBUG_SUICIDE();); + return ret; } {code} then run this testcase (put in {{storage/rocksdb/mysql-test/rocksdb/t/binlog_rotate.test}} ): {code:sql} --source include/have_rocksdb.inc --source include/have_log_bin.inc set global rocksdb_flush_log_at_trx_commit=1; create table t1 (a int, b int, key(a)) engine=rocksdb; insert into t1 values (1,1),(2,2); select * from t1; flush tables; --write_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect restart EOF set @@debug_dbug="+d,reset_master_done"; --disable_reconnect --error 0,2013 RESET MASTER; --enable_reconnect --source include/wait_until_connected_again.inc select * from t1; drop table t1; {code} and observe: {code} ... set global rocksdb_flush_log_at_trx_commit=1; create table t1 (a int, b int, key(a)) engine=rocksdb; insert into t1 values (1,1),(2,2); select * from t1; a b 1 1 2 2 flush tables; set @@debug_dbug="+d,reset_master_done"; RESET MASTER; select * from t1; a b drop table t1; {code} The INSERTs are lost. |
Hit this when working on Apply this patch: {code:diff} diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc index 084259d863d..fbc1e637abc 100644 --- a/sql/sql_repl.cc +++ b/sql/sql_repl.cc @@ -3966,6 +3966,8 @@ int reset_master(THD* thd, rpl_gtid *init_state, uint32 init_state_len, ret= mysql_bin_log.reset_logs(thd, 1, init_state, init_state_len, next_log_number); repl_semisync_master.after_reset_master(); + DBUG_EXECUTE_IF("reset_master_done", DBUG_SUICIDE();); + return ret; } {code} then run this testcase (put in {{storage/rocksdb/mysql-test/rocksdb/t/binlog_rotate.test}} ): {code:sql} --source include/have_rocksdb.inc --source include/have_log_bin.inc set global rocksdb_flush_log_at_trx_commit=1; create table t1 (a int, b int, key(a)) engine=rocksdb; insert into t1 values (1,1),(2,2); select * from t1; flush tables; --write_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect restart EOF set @@debug_dbug="+d,reset_master_done"; --disable_reconnect --error 0,2013 RESET MASTER; --enable_reconnect --source include/wait_until_connected_again.inc select * from t1; drop table t1; {code} and observe: {code} ... set global rocksdb_flush_log_at_trx_commit=1; create table t1 (a int, b int, key(a)) engine=rocksdb; insert into t1 values (1,1),(2,2); select * from t1; a b 1 1 2 2 flush tables; set @@debug_dbug="+d,reset_master_done"; RESET MASTER; select * from t1; a b drop table t1; {code} The INSERTs are lost. |
Affects Version/s | 10.3 [ 22126 ] | |
Affects Version/s | 10.4 [ 22408 ] | |
Affects Version/s | 10.5 [ 23123 ] |
Fix Version/s | 10.5 [ 23123 ] |
Fix Version/s | 10.5.10 [ 25204 ] | |
Fix Version/s | 10.6.0 [ 24431 ] | |
Fix Version/s | 10.5 [ 23123 ] | |
Fix Version/s | 10.6 [ 24028 ] | |
Resolution | Fixed [ 1 ] | |
Status | Open [ 1 ] | Closed [ 6 ] |
Workflow | MariaDB v3 [ 120614 ] | MariaDB v4 [ 159100 ] |