403Webshell
Server IP : 172.67.216.182  /  Your IP : 162.158.88.53
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_mta_rows_query_event_double_free.test
# ==== Purpose ====
#
# The purpose of this script is to test if there isn't any double-free
# corruption when a Rows_query_event is retried by the MTA.
#
# ==== Requirements ====
#
# R1. After a Rows_log_event is retried, the event is re-read from the
#     relay log but the reference to the original event shouldn't be
#     disposed during context cleanup because is further accessed.
#
# ==== Implementation ====
#
# 1. Enable `binlog_rows_query_log_events` option.
# 2. On the source, create a table.
# 3. On the source, insert a record into the table.
# 4. On the replica, activate a debug symbol that will force failure while
#    applying Rows_query_event 3 times.
# 5. On the replica, wait for a debug sync signal that notifies that the
#    Rows_query_event was sucessfully applied.
# 6. On the replica, remove the debug point and sync with the source.
# 7. Clean up.
#
# ==== References ====
#
# BUG#32590974 MTS: SEGFAULT OR HEAP-USE-AFTER-FREE IN
#              SLAVE_WORKER_EXEC_JOB_GROUP
#

--source include/have_debug_sync.inc
--source include/have_binlog_format_row.inc
--source include/only_mts_slave_parallel_workers.inc
--let $option_name = slave_transaction_retries
--let $option_operator = >
--let $option_value = 2
--source include/only_with_option.inc
--source include/master-slave.inc

# 1. Enable `binlog_rows_query_log_events` option.
--let $saved_binlog_rows_query_log_events = `SELECT @@SESSION.binlog_rows_query_log_events`
SET SESSION binlog_rows_query_log_events = ON;

# 2. On the source, create a table.
CREATE TABLE t1 (c1 INT PRIMARY KEY, c2 INT, INDEX(c2)) ENGINE = InnoDB;
--source include/sync_slave_sql_with_master.inc
--source include/stop_slave.inc

# 3. On the source, insert a record into the table.
--source include/rpl_connection_master.inc
INSERT INTO t1 VALUES (0, 0);

# 4. On the replica, activate a debug symbol that will force failure while
#    applying Rows_query_event 3 times.
--source include/rpl_connection_slave.inc
--let $debug_point = error_on_rows_query_event_apply
--source include/add_debug_point.inc
--source include/start_slave.inc

# 5. On the replica, wait for a debug sync signal that notifies that the
#    Rows_query_event was sucessfully applied.
SET DEBUG_SYNC = "now WAIT_FOR end_retries_on_rows_query_event_apply";

# 6. On the replica, remove the debug point and sync with the source.
--source include/rpl_connection_master.inc
--source include/sync_slave_sql_with_master.inc
--let $debug_point = error_on_rows_query_event_apply
--source include/remove_debug_point.inc

# 7. Clean up.
--source include/rpl_connection_master.inc
DROP TABLE t1;
--replace_result $saved_binlog_rows_query_log_events BINLOG_ROWS_QUERY_LOG_EVENTS
--eval SET SESSION binlog_rows_query_log_events = $saved_binlog_rows_query_log_events
--source include/rpl_end.inc

Youez - 2016 - github.com/yon3zu
LinuXploit