Server IP : 172.67.216.182 / Your IP : 162.158.88.37 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/r/ |
Upload File : |
DROP TABLE IF EXISTS t1; CREATE DATABASE IF NOT EXISTS mysqlslap; CREATE TEMPORARY TABLE IF NOT EXISTS ndb_show_tables_results ( id INT, type VARCHAR(20), state VARCHAR(20), logging VARCHAR(20), _database VARCHAR(255), _schema VARCHAR(20), name VARCHAR(255) ); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~ basic online alter test during load ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ create table t1 (pk int key, a int) engine ndb; insert into t1 values (1,0); ndb_show_tables completed..... set @t1_id = (select id from ndb_show_tables_results where name like '%t1%' and type like '%UserTable%'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~ Starting mysqlslap ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~ Alter table t1 add column b ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ALTER TABLE t1 algorithm=inplace, ADD b INT; Warnings: Warning 1478 Converted FIXED field 'b' to DYNAMIC to enable on-line ADD COLUMN ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~ Check table t1 ID has not changed ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ndb_show_tables completed..... select name from ndb_show_tables_results where id = @t1_id and name like '%t1%' and type like '%UserTable%'; name 't1' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~ Starting mysqlslap using column b ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ update t1 set b = 0 where pk = 1; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~ Alter table t1 add column c ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ALTER TABLE t1 algorithm=inplace, ADD c INT; Warnings: Warning 1478 Converted FIXED field 'c' to DYNAMIC to enable on-line ADD COLUMN ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~ Check table t1 ID has not changed ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ndb_show_tables completed..... select name from ndb_show_tables_results where id = @t1_id and name like '%t1%' and type like '%UserTable%'; name 't1' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~ Starting mysqlslap using column c ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ update t1 set c = 0 where pk = 1; select * from t1; pk a b c 1 2000 2000 2000 BUG#17400320 algorithm= is not supported for ALTER TABLE with <partition_options> - thus disabling parts of this test ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~ Check table t1 ID has not changed ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ndb_show_tables completed..... select name from ndb_show_tables_results where id = @t1_id and name like '%t1%' and type like '%UserTable%'; name 't1' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~ test that aborted online alter rollback DDL transaction ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Connection default START TRANSACTION; SELECT * FROM t1; pk a b c 1 2000 2000 2000 # Connection con1 SET lock_wait_timeout=1; ALTER TABLE t1 algorithm=inplace, ADD d INT; ERROR HY000: Lock wait timeout exceeded; try restarting transaction ALTER TABLE t1 algorithm=inplace, ADD d INT; ERROR HY000: Lock wait timeout exceeded; try restarting transaction SELECT * FROM t1; pk a b c 1 2000 2000 2000 COMMIT; ndb_show_tables completed..... select name from ndb_show_tables_results where id = @t1_id and name like '%t1%' and type like '%UserTable%'; name 't1' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~ cleanup section ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drop table t1, ndb_show_tables_results; drop database mysqlslap;