Details
Description
Test case:
--source include/have_debug_sync.inc
# Note that this test is meaningful only with valgrind.
let $op= XA COMMIT 'xatest';
let $i= 2;
while ($i)
{
connect con1, localhost, root;
connect con2, localhost, root;
connection con1;
XA START 'xatest';
XA END 'xatest';
XA PREPARE 'xatest';
connection con2;
SET debug_sync='xa_after_search SIGNAL parked WAIT_FOR go';
send_eval $op;
connection default;
SET debug_sync='now WAIT_FOR parked';
disconnect con1;
disable_query_log;
echo # Waiting for thread to get deleted;
while (`SELECT VARIABLE_VALUE!=2 FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='max_used_connections'`)
{
real_sleep 0.1;
FLUSH STATUS;
}
enable_query_log;
SET debug_sync='now SIGNAL go';
connection con2;
--error ER_XAER_NOTA
reap;
disconnect con2;
connection default;
SET debug_sync='RESET';
let $op= XA ROLLBACK 'xatest';
dec $i;
}
Debug sync patch:
diff --git a/sql/sql_class.cc b/sql/sql_class.cc
index 3071ba6..5f744d5 100644
--- a/sql/sql_class.cc
+++ b/sql/sql_class.cc
@@ -5312,6 +5312,7 @@ XID_STATE *xid_cache_search(THD *thd, XID *xid)
if (element)
{
lf_hash_search_unpin(thd->xid_hash_pins);
+ DEBUG_SYNC(current_thd, "xa_after_search");
return element->m_xid_state;
}
return 0;
Gliffy Diagrams
Attachments
Issue Links
- links to
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions
Sergei Golubchik, please review fix for this bug.