Server IP : 172.67.216.182 / Your IP : 172.69.176.31 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 : |
############################################################################# # BUG#43579 mysql_upgrade tries to alter log tables on replicated database # Master and slave should be upgraded separately. All statements executed by # mysql_upgrade will not be binlogged. --write-binlog and --skip-write-binlog # options are added into mysql_upgrade. These options control whether sql # statements are binlogged or not. ############################################################################# --source include/not_group_replication_plugin.inc --source include/master-slave.inc # Only run test if "mysql_upgrade" is found --source include/have_mysql_upgrade.inc call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); connection master; --disable_warnings DROP DATABASE IF EXISTS `#mysql50#mysqltest-1`; CREATE DATABASE `#mysql50#mysqltest-1`; --enable_warnings --source include/sync_slave_sql_with_master.inc connection master; let $before_position= query_get_value(SHOW MASTER STATUS, Position, 1); #With '--force' option, mysql_upgrade always executes all sql statements for upgrading. #binlog is disabled by default. --exec $MYSQL_UPGRADE --skip-verbose --force --user=root > $MYSQLTEST_VARDIR/log/mysql_upgrade.log 2>&1 --source include/sync_slave_sql_with_master.inc connection master; let $after_position= query_get_value(SHOW MASTER STATUS, Position, 1); if ($before_position == $after_position) { echo Master position is not changed; } #Some log events of the mysql_upgrade's will cause errors on slave. connection slave; STOP SLAVE SQL_THREAD; source include/wait_for_slave_sql_to_stop.inc; connection master; #With '--force' option, mysql_upgrade always executes all sql statements for upgrading. #--write-binlog option enables binlog. --exec $MYSQL_UPGRADE --write-binlog --skip-verbose --force --user=root > $MYSQLTEST_VARDIR/log/mysql_upgrade.log 2>&1 connection master; let $after_file= query_get_value(SHOW MASTER STATUS, File, 1); let $after_position= query_get_value(SHOW MASTER STATUS, Position, 1); if ($before_position != $after_position) { echo Master position has been changed; } DROP DATABASE `mysqltest-1`; connection slave; DROP DATABASE `#mysql50#mysqltest-1`; --let $rpl_only_running_threads= 1 --source include/rpl_end.inc --source include/mysql_upgrade_cleanup.inc