Server IP : 104.21.38.3 / Your IP : 162.158.190.98 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/ndb/t/ |
Upload File : |
# The include statement below is a temp one for tests that are yet to #be ported to run with InnoDB, #but needs to be kept for tests that would need MyISAM in future. --source include/force_myisam_default.inc # uses 'send' and 'reap' which seems not supported for emb testing -- source include/not_embedded.inc -- source include/have_ndb.inc # We are using some debug-only features in this test --source include/have_debug.inc --disable_warnings drop table if exists t1; --enable_warnings --connect (another_con, localhost, root,,) --connect (yet_another_con, localhost, root,,) --echo # --echo # Test that alter during lock table aborts with error if --echo # global schema lock already exists --echo # --connection default create table t1 (a int key) engine ndb row_format dynamic; # delay after lock set session debug="+d,sleep_after_global_schema_lock"; --send alter table t1 add column (b int) --sleep 2 --connection another_con lock tables t1 write; --error ER_LOCK_OR_ACTIVE_TRANSACTION alter table t1 add column (c int); # make sure it continues to block --error ER_LOCK_OR_ACTIVE_TRANSACTION alter table t1 add column (c int); --error ER_LOCK_OR_ACTIVE_TRANSACTION alter table t1 add column (c int); unlock tables; --connection default --reap --echo # --echo # Test that alter during lock works without global schema lock --echo # and that an alter done in parallell test serialized --echo # --connection default lock tables t1 write; --echo # delay is still set after lock --send alter table t1 add column (c int) --sleep 2 --echo # issue alter in parallell, which should be hanging waiting on --connection another_con --send alter table t1 add column (d int) --sleep 1 --echo # check thread state which should be: --echo # "Waiting for allowed to take ndbcluster global schema lock" --echo # _not_ "Waiting for ndbcluster global schema lock" --connection yet_another_con select state from information_schema.processlist where info = "alter table t1 add column (d int)"; # wait for alter to complete --connection default --reap unlock tables; --connection another_con --reap show create table t1; --echo # Cleanup --connection default set session debug="-d,"; drop table t1;