Server IP : 104.21.38.3 / Your IP : 162.158.163.121 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 : |
--source include/not_embedded.inc --source include/not_gtid_enabled.inc # default value RESET MASTER; SET @start_global_value = @@global.gtid_mode; SELECT @start_global_value; SET @start_enforce_gtid_consistency= @@global.enforce_gtid_consistency; SET @@global.enforce_gtid_consistency = ON; # # exists as global only # select @@global.gtid_mode; --error ER_INCORRECT_GLOBAL_LOCAL_VAR select @@session.gtid_mode; --error ER_GLOBAL_VARIABLE set gtid_mode = @start_global_value; --error ER_GLOBAL_VARIABLE set @@session.gtid_mode = @start_global_value; show global variables like 'gtid_mode'; show session variables like 'gtid_mode'; --disable_warnings select * from information_schema.global_variables where variable_name='gtid_mode'; select * from information_schema.session_variables where variable_name='gtid_mode'; --enable_warnings # # show that it is settable and can only change at most one step at a time # set global gtid_mode = OFF; --error ER_GTID_MODE_CAN_ONLY_CHANGE_ONE_STEP_AT_A_TIME set global gtid_mode = ON_PERMISSIVE; --error ER_GTID_MODE_CAN_ONLY_CHANGE_ONE_STEP_AT_A_TIME set global gtid_mode = ON; set global gtid_mode = OFF_PERMISSIVE; set global gtid_mode = OFF_PERMISSIVE; --error ER_GTID_MODE_CAN_ONLY_CHANGE_ONE_STEP_AT_A_TIME set global gtid_mode = ON; set global gtid_mode = ON_PERMISSIVE; set global gtid_mode = ON_PERMISSIVE; --error ER_GTID_MODE_CAN_ONLY_CHANGE_ONE_STEP_AT_A_TIME set global gtid_mode = OFF; set global gtid_mode = ON; set global gtid_mode = ON; --error ER_GTID_MODE_CAN_ONLY_CHANGE_ONE_STEP_AT_A_TIME set global gtid_mode = OFF; --error ER_GTID_MODE_CAN_ONLY_CHANGE_ONE_STEP_AT_A_TIME set global gtid_mode = OFF_PERMISSIVE; set global gtid_mode = ON_PERMISSIVE; set global gtid_mode = OFF_PERMISSIVE; set global gtid_mode = OFF; --error ER_WRONG_VALUE_FOR_VAR set global gtid_mode = NULL; select @@global.gtid_mode; set global gtid_mode = default; select @@global.gtid_mode; set global gtid_mode = OFF_PERMISSIVE; set global gtid_mode = default; select @@global.gtid_mode; set global gtid_mode = OFF_PERMISSIVE; set global gtid_mode = ON_PERMISSIVE; --error ER_GTID_MODE_CAN_ONLY_CHANGE_ONE_STEP_AT_A_TIME set global gtid_mode = default; select @@global.gtid_mode; set global gtid_mode = ON; --error ER_GTID_MODE_CAN_ONLY_CHANGE_ONE_STEP_AT_A_TIME set global gtid_mode = default; select @@global.gtid_mode; --error ER_GLOBAL_VARIABLE set session gtid_mode = ON; # can't set ON when sql_slave_skip_counter > 0 set global gtid_mode = on_permissive; set global sql_slave_skip_counter = 1; --error ER_CANT_SET_GTID_MODE set global gtid_mode = on; set global sql_slave_skip_counter = 0; set global gtid_mode = on; # can set everything except ON when enforce_gtid_consistency!=ON set global gtid_mode = on_permissive; SET @@global.enforce_gtid_consistency = OFF; set global gtid_mode = off_permissive; set global gtid_mode = off; set global gtid_mode = off_permissive; set global gtid_mode = on_permissive; --error ER_CANT_SET_GTID_MODE set global gtid_mode = on; SET @@global.enforce_gtid_consistency = WARN; set global gtid_mode = off_permissive; set global gtid_mode = off; set global gtid_mode = off_permissive; set global gtid_mode = on_permissive; --error ER_CANT_SET_GTID_MODE set global gtid_mode = on; # test gtid_mode changes with autocommit off CREATE TABLE t1 (a INT); SET AUTOCOMMIT = 0; ## Confirm that gtid_mode cannot be changed when a transaction ## is in progress and gtid_next is set to 'UUID:No'. SET SESSION GTID_NEXT = 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:1'; INSERT INTO t1 VALUES (1); # transaction in progress, gtid_mode variable cannot be changed --error ER_VARIABLE_NOT_SETTABLE_IN_TRANSACTION SET GLOBAL GTID_MODE = 'off_permissive'; COMMIT; ## Confirm that gtid_mode cannot be changed when gtid_mode is ## set to 'UUID:No'. SET SESSION GTID_NEXT = 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:2'; # GTID_NEXT was set, gtid_mode variable cannot be changed --error ER_CANT_SET_VARIABLE_WHEN_OWNING_GTID SET GLOBAL GTID_MODE = 'off_permissive'; COMMIT; ## Confirm that gtid_mode cannot be changed during an anonymous ## transaction. SET GTID_NEXT = 'ANONYMOUS'; --error ER_CANT_SET_VARIABLE_WHEN_OWNING_GTID SET GLOBAL GTID_MODE = 'off_permissive'; COMMIT; # Set back to default and cleanup SET AUTOCOMMIT = 1; SET SESSION GTID_NEXT = 'AUTOMATIC'; DROP TABLE t1; SET GLOBAL GTID_MODE ='off_permissive'; SET GLOBAL GTID_MODE = 'off'; SET @@global.enforce_gtid_consistency = @start_enforce_gtid_consistency; # # See rpl_gtid_mode.test for a comprehensive test case. #