Server IP : 172.67.216.182 / Your IP : 162.158.170.29 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 : |
# Test for BUG#1858 "OPTIMIZE TABLE done by a client # thread stops the slave SQL thread". # You can replace OPTIMIZE by REPAIR. ##################################### # Change Author: JBM # Change Date: 2006-02-09 # Change: NDB does not and will not support # OPTIMIZE for memory tables. If and when # it does support for Disk Data, a new # version of this test will be need. # Skipping this test if default engine = ndb ##################################### --source include/not_group_replication_plugin.inc # Bug#18128323: On SLOW Solaris/WINT machines and debug # builds test is failing due to timeout (if InnoDB engine). # Hence, we will be using MyISAM engine as default until # that issue is sorted out. -- source include/have_myisam.inc -- source include/not_ndb_default.inc -- source include/master-slave.inc disable_query_log; call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); enable_query_log; create table t1 (a int not null auto_increment primary key, b int, key(b)); INSERT INTO t1 (a) VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); --disable_warnings INSERT INTO t1 (a) SELECT null FROM t1; INSERT INTO t1 (a) SELECT null FROM t1; INSERT INTO t1 (a) SELECT null FROM t1; INSERT INTO t1 (a) SELECT null FROM t1; INSERT INTO t1 (a) SELECT null FROM t1; INSERT INTO t1 (a) SELECT null FROM t1; INSERT INTO t1 (a) SELECT null FROM t1; INSERT INTO t1 (a) SELECT null FROM t1; INSERT INTO t1 (a) SELECT null FROM t1; INSERT INTO t1 (a) SELECT null FROM t1; INSERT INTO t1 (a) SELECT null FROM t1; INSERT INTO t1 (a) SELECT null FROM t1; INSERT INTO t1 (a) SELECT null FROM t1; --enable_warnings save_master_pos; # a few updates to force OPTIMIZE to do something --disable_warnings update t1 set b=(a/2*rand()); delete from t1 order by b limit 10000; --enable_warnings connection slave; sync_with_master; --disable_result_log optimize table t1; --enable_result_log connection master; save_master_pos; connection slave; # Bug was that when the INSERT terminated on slave, # the slave SQL thread got killed by OPTIMIZE. sync_with_master; # won't work if slave SQL thread stopped connection master; # cleanup drop table t1; --source include/sync_slave_sql_with_master.inc # If the machine is so fast that slave syncs before OPTIMIZE # starts, this test wil demonstrate nothing but will pass. # End of 4.1 tests --source include/rpl_end.inc