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/rpl/t/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/local/mysql/mysql-test/suite/rpl/t/rpl_create_or_replace_fail.test
# ==== Purpose ====
#
# Test verifies that failed CREATE OR REPLACE TEMPORARY TABLE statement which
# dropped the table but failed at a later stage of creation of temporary table
# is written to binarylog in row based replication.
#
# ==== Implementation ====
#
# Steps:
#    0 - Have mixed based replication mode.
#    1 - Create a temporary table. It will be replicated as mixed replication
#        mode is in use.
#    2 - Execute an unsafe statement which will switch current statement
#        binlog format to 'ROW'. i.e If binlog_format=MIXED, there are open
#        temporary tables, and an unsafe statement is executed, then subsequent
#        statements are logged in row format.
#    3 - Execute a CREATE OR REPLACE TEMPORARY TABLE statement which tries to
#        create partitions on temporary table. Since it is not supported it will
#        fail.
#    4 - Check the binary log output to ensure that the failed statement is
#        written to the binary log.
#    5 - Slave should be up and running and in sync with master.
#
# ==== References ====
#
# MDEV-18930: Failed CREATE OR REPLACE TEMPORARY not written into binary log
# makes data on master and slave diverge
#

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

CREATE TEMPORARY TABLE t1 (a INT NOT NULL);

# Execute an unsafe statement which switches replication mode internally from
# "STATEMENT" to "ROW".
--error ER_NO_SUCH_TABLE
LOAD DATA INFILE 'x' INTO TABLE x;

--error ER_FEATURE_NOT_SUPPORTED_WITH_PARTITIONING
CREATE OR REPLACE TEMPORARY TABLE t1 (x INT) PARTITION BY HASH(x);

--echo "************** DROP TEMPORARY TABLE Should be present in Binary log **************"
--source include/show_binlog_events.inc

CREATE TABLE t1 (b INT);
INSERT INTO t1 VALUES (NULL);
--sync_slave_with_master

# Cleanup
--connection master
DROP TABLE t1;

--source include/rpl_end.inc


Youez - 2016 - github.com/yon3zu
LinuXploit