Server IP : 104.21.38.3 / Your IP : 108.162.226.158 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/sys_vars/t/ |
Upload File : |
# Variable Name: replication_sender_observe_commit_only # Scope: Global # Access Type: Static # Data Type: boolean # # Creation Date: 2019-12-22 # Author : Pedro Figueiredo --source include/not_embedded.inc --let $saved_global_replication_sender_observe_commit_only = `SELECT @@global.replication_sender_observe_commit_only` #################################################################### # Displaying default value # #################################################################### --let $assert_text = Default GLOBAL value is FALSE --let $assert_cond = [SELECT @@global.replication_sender_observe_commit_only = 0] --source include/assert.inc #################################################################### # Check if Value can set and that P_S reports the correct value # #################################################################### # 1, TRUE, ON, 0, FALSE, OFF --let $j=6 while($j>0) { if ($j == 6) { --let $to_set = OFF --let $expected = OFF } if ($j == 5) { --let $to_set = FALSE --let $expected = OFF } if ($j == 4) { --let $to_set = 0 --let $expected = OFF } if ($j == 3) { --let $to_set = ON --let $expected = ON } if ($j == 2) { --let $to_set = TRUE --let $expected = ON } if ($j == 1) { --let $to_set = 1 --let $expected = ON } --let $scope = GLOBAL --let $ps_table = global_variables --eval SET @@$scope.replication_sender_observe_commit_only = $to_set --let $reported=`SELECT variable_value FROM performance_schema.$ps_table WHERE variable_name = 'replication_sender_observe_commit_only'` --let $assert_text= Reported value matches the one set (set $to_set in $scope scope) --let $assert_cond = "$reported" = "$expected" --source include/assert.inc --dec $j } #################################################################### # Privileges # #################################################################### CREATE USER user1; --connect(conn_user1,localhost,user1,,) # assert that one cannot change the value without privileges --error ER_SPECIFIC_ACCESS_DENIED_ERROR SET GLOBAL replication_sender_observe_commit_only = 1; # assert that one can change the value if SUPER is given --connection default GRANT SUPER ON *.* TO user1@'%'; FLUSH PRIVILEGES; --connect(conn2_user1,localhost,user1,,) SET GLOBAL replication_sender_observe_commit_only = 1; --connection default DROP USER user1; #################################################################### # Transactional context # #################################################################### BEGIN; # can change the variable's value in global scope while inside a transaction SET GLOBAL replication_sender_observe_commit_only = ON; ROLLBACK; #################################################################### # End of tests # #################################################################### --eval SET @@global.replication_sender_observe_commit_only = $saved_global_replication_sender_observe_commit_only