Commit 58c293f2 authored by Yuchen Pei's avatar Yuchen Pei

[demo][debug] spider: debugging MDEV-27438

parent 70e3c144
...@@ -77,7 +77,8 @@ if ($wait_for_all != 1) ...@@ -77,7 +77,8 @@ if ($wait_for_all != 1)
while ($do_loop) while ($do_loop)
{ {
let $field_value= query_get_value($show_statement, $field, $rowno); let $field_value= query_get_value($show_statement, $field, $rowno);
if (`SELECT '$field_value' $condition`) # let $field_value= `select quote($field_value)`;
if (`SELECT "$field_value" $condition`)
{ {
let $found= 1; let $found= 1;
let $do_loop= 0; let $do_loop= 0;
......
...@@ -54,7 +54,7 @@ SET DEBUG_SYNC= "now SIGNAL default_go"; ...@@ -54,7 +54,7 @@ SET DEBUG_SYNC= "now SIGNAL default_go";
connection default; connection default;
--enable_reconnect --enable_reconnect
--error 0,2013 --error 0,2013
--reap --reap # sigabrt
--echo Must be tree logs in the list: --echo Must be tree logs in the list:
--source include/show_binary_logs.inc --source include/show_binary_logs.inc
......
...@@ -10,7 +10,11 @@ SET GLOBAL max_binlog_size= 4096; ...@@ -10,7 +10,11 @@ SET GLOBAL max_binlog_size= 4096;
SET GLOBAL innodb_flush_log_at_trx_commit= 1; SET GLOBAL innodb_flush_log_at_trx_commit= 1;
RESET MASTER; RESET MASTER;
CREATE TABLE t1 (a INT PRIMARY KEY, b MEDIUMTEXT) ENGINE=Innodb; install soname 'ha_spider';
set spider_same_server_link=1;
evalp CREATE SERVER srv FOREIGN DATA WRAPPER MYSQL OPTIONS (SOCKET "$MASTER_MYSOCK", DATABASE 'test',user 'root');
create table t2 (a INT PRIMARY KEY, b MEDIUMTEXT);
CREATE TABLE t1 (a INT PRIMARY KEY, b MEDIUMTEXT) ENGINE=Spider COMMENT="srv 'srv', table 't2'";
# MDEV-515 takes X-lock on the table for the first insert # MDEV-515 takes X-lock on the table for the first insert
# In that case, Concurrent DML will get blocked # In that case, Concurrent DML will get blocked
INSERT INTO t1 VALUES(100, "MDEV-515"); INSERT INTO t1 VALUES(100, "MDEV-515");
...@@ -44,7 +48,7 @@ EOF ...@@ -44,7 +48,7 @@ EOF
SET DEBUG_SYNC= "now SIGNAL con1_cont"; SET DEBUG_SYNC= "now SIGNAL con1_cont";
connection con1; connection con1;
--error 2006,2013 --error 2006,2013
reap; reap; # sigabrt
--append_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect --append_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
restart-binlog_mdev342.test restart-binlog_mdev342.test
......
...@@ -63,6 +63,7 @@ SELECT @@global.gtid_binlog_state; ...@@ -63,6 +63,7 @@ SELECT @@global.gtid_binlog_state;
# #
# Server restart # Server restart
# #
# sigabrt somewhere here
--let $restart_parameters= --init-rpl-role=SLAVE --sync-binlog=1 --log-warnings=3 --let $restart_parameters= --init-rpl-role=SLAVE --sync-binlog=1 --log-warnings=3
--source include/start_mysqld.inc --source include/start_mysqld.inc
......
...@@ -94,6 +94,7 @@ SELECT @@global.gtid_binlog_state; ...@@ -94,6 +94,7 @@ SELECT @@global.gtid_binlog_state;
--error 1 --error 1
--exec $MYSQLD_LAST_CMD --init-rpl-role=SLAVE >> $MYSQLTEST_VARDIR/log/mysqld.1.err 2>&1 --exec $MYSQLD_LAST_CMD --init-rpl-role=SLAVE >> $MYSQLTEST_VARDIR/log/mysqld.1.err 2>&1
# somewhere below: sigabrt
--echo # Normal restart --echo # Normal restart
--source include/start_mysqld.inc --source include/start_mysqld.inc
......
...@@ -2609,6 +2609,7 @@ static void xarecover_do_commit_or_rollback(handlerton *hton, ...@@ -2609,6 +2609,7 @@ static void xarecover_do_commit_or_rollback(handlerton *hton,
else else
x= *member->full_xid; x= *member->full_xid;
// abort();
rc= xarecover_decide_to_commit(member, ptr_commit_max) ? rc= xarecover_decide_to_commit(member, ptr_commit_max) ?
hton->commit_by_xid(hton, &x) : hton->rollback_by_xid(hton, &x); hton->commit_by_xid(hton, &x) : hton->rollback_by_xid(hton, &x);
......
...@@ -11680,11 +11680,13 @@ int TC_LOG_BINLOG::recover(LOG_INFO *linfo, const char *last_log_name, ...@@ -11680,11 +11680,13 @@ int TC_LOG_BINLOG::recover(LOG_INFO *linfo, const char *last_log_name,
{ {
if (!binlog_checkpoint_found) if (!binlog_checkpoint_found)
break; break;
DBUG_EXECUTE_IF("xa_recover_expect_master_bin_000004", /*
if (0 != strcmp("./master-bin.000004", binlog_checkpoint_name) && DBUG_EXECUTE_IF("xa_recover_expect_master_bin_000004",
0 != strcmp(".\\master-bin.000004", binlog_checkpoint_name)) if (0 != strcmp("./master-bin.000004", binlog_checkpoint_name) &&
DBUG_SUICIDE(); 0 != strcmp(".\\master-bin.000004", binlog_checkpoint_name))
); DBUG_SUICIDE();
);
*/
if (find_log_pos(linfo, binlog_checkpoint_name, 1)) if (find_log_pos(linfo, binlog_checkpoint_name, 1))
{ {
sql_print_error("Binlog file '%s' not found in binlog index, needed " sql_print_error("Binlog file '%s' not found in binlog index, needed "
......
...@@ -3287,6 +3287,9 @@ int spider_xa_commit_by_xid( ...@@ -3287,6 +3287,9 @@ int spider_xa_commit_by_xid(
THD* thd = current_thd; THD* thd = current_thd;
DBUG_ENTER("spider_xa_commit_by_xid"); DBUG_ENTER("spider_xa_commit_by_xid");
/*
abort();
*/
if (!(trx = spider_get_trx(thd, TRUE, &error_num))) if (!(trx = spider_get_trx(thd, TRUE, &error_num)))
goto error_get_trx; goto error_get_trx;
...@@ -3309,6 +3312,9 @@ int spider_xa_rollback_by_xid( ...@@ -3309,6 +3312,9 @@ int spider_xa_rollback_by_xid(
THD* thd = current_thd; THD* thd = current_thd;
DBUG_ENTER("spider_xa_rollback_by_xid"); DBUG_ENTER("spider_xa_rollback_by_xid");
/*
abort();
*/
if (!(trx = spider_get_trx(thd, TRUE, &error_num))) if (!(trx = spider_get_trx(thd, TRUE, &error_num)))
goto error_get_trx; goto error_get_trx;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment