Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/MariaDB/mysql-test/suite/binlog/t/   (MariaDB Server Version 8.1-8.4©)  Datei vom 1.9.2026 mit Größe 1 kB image not shown  

Quelle  binlog_xa_checkpoint.test  Sprache: unbekannt

 
Spracherkennung für: .test vermutete Sprache: SQL {SQL[84] Lisp[42] Masm[42]} [Methode: maximale Elemente, drei Dimensionen]

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

RESET MASTER;

CREATE TABLE t1 (a INT PRIMARY KEY, b MEDIUMTEXT) ENGINE=Innodb;

# Test that
# 1. XA PREPARE is binlogged before the XA has been prepared in Engine
# 2. While XA PREPARE already binlogged in an old binlog file which has been rotated,
#    Binlog checkpoint is not generated for the latest log until
#    XA PREPARE returns, e.g OK to the client.


# con1 will hang before doing commit checkpoint, blocking RESET MASTER.
connect(con1,localhost,root,,);
SET DEBUG_SYNC= "at_unlog_xa_prepare SIGNAL con1_ready WAIT_FOR con1_go";
XA START '1';
INSERT INTO t1 SET a=1;
XA END '1';
--send XA PREPARE '1';


connection default;
SET DEBUG_SYNC= "now WAIT_FOR con1_ready";
FLUSH LOGS;
FLUSH LOGS;
FLUSH LOGS;

--source include/show_binary_logs.inc
--let $binlog_file= master-bin.000004
--let $binlog_start= 4
--source include/show_binlog_events.inc

SET DEBUG_SYNC= "now SIGNAL con1_go";

connection con1;
reap;
--echo *** master-bin.000004 checkpoint must show up now ***
--source include/wait_for_binlog_checkpoint.inc

# Todo: think about the error code returned, move to an appropriate test, or remove
# connection default;
#--error 1399
# DROP TABLE t1;

connection con1;
XA ROLLBACK '1';
SET debug_sync = 'reset';

# Clean up.
connection default;

DROP TABLE t1;
SET debug_sync = 'reset';

[Dauer der Verarbeitung: 0.16 Sekunden, vorverarbeitet 2026-10-08]