403Webshell
Server IP : 88.99.149.37  /  Your IP : 216.73.216.141
Web Server : nginx/1.31.2
System : Linux server-88-99-149-37 6.12.0-124.56.5.el10_1.x86_64 #1 SMP PREEMPT_DYNAMIC Fri May 15 06:12:08 EDT 2026 x86_64
User : muralimurth ( 1015)
PHP Version : 8.4.23
Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/local/mysql/mysql-test/suite/galera/t/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/local/mysql/mysql-test/suite/galera/t/galera_as_slave_ctas.test
#
# Test Galera as a slave to a MySQL master
#
# The galera/galera_2node_slave.cnf describes the setup of the nodes
# also, for this test, master server must have binlog_format=ROW
#

--source include/have_innodb.inc
--source include/have_log_bin.inc
--source include/galera_cluster.inc

# As node #3 is not a Galera node, and galera_cluster.inc does not open connetion to it
# we open the node_3 connection here
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
SELECT @@wsrep_on;

--connection node_1
--disable_query_log
--eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root', MASTER_PORT=$NODE_MYPORT_3;
--enable_query_log
START SLAVE;

# make sure master server has binlog_format=ROW
--connection node_3
SHOW VARIABLES LIKE 'binlog_format';

#
# test phase one, issue CTAS with empty source table
#

CREATE TABLE source (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;

CREATE TABLE target AS SELECT * FROM source;

--connection node_1
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'target';
--let $wait_condition_on_error_output = SELECT * FROM INFORMATION_SCHEMA.TABLES
--source include/wait_condition_with_debug.inc

--connection node_2
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'target';
--let $wait_condition_on_error_output = SELECT * FROM INFORMATION_SCHEMA.TABLES
--source include/wait_condition_with_debug.inc

#
# test phase two, issue CTAS with populated source table
#
--connection node_3
DROP TABLE target;
INSERT INTO source VALUES(1);

CREATE TABLE target AS SELECT * FROM source;

--connection node_1
--let $wait_condition = SELECT COUNT(*) = 1 FROM target;
--source include/wait_condition.inc

--connection node_2
--let $wait_condition = SELECT COUNT(*) = 1 FROM target;
--source include/wait_condition.inc

--connection node_3
DROP TABLE source;
DROP TABLE target;

--connection node_2
--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'target';
--source include/wait_condition.inc
call mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on");
call mtr.add_suppression("WSREP: Failed to apply write set: gtid:");

--connection node_1
STOP SLAVE;
RESET SLAVE ALL;
call mtr.add_suppression("WSREP: unexpected async replication event: 0");

--connection node_3
RESET MASTER;

Youez - 2016 - github.com/yon3zu
LinuXploit