Server IP : 104.21.38.3 / Your IP : 172.70.189.36 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 ###################################################################### # Test restoring backups with blob columns ###################################################################### -- source include/have_ndb.inc --disable_warnings use test; drop table if exists t1,t2; --enable_warnings # length 61 set @s0 = 'rggurloniukyehuxdbfkkyzlceixzrehqhvxvxbpwizzvjzpucqmzrhzxzfau'; set @s1 = 'ykyymbzqgqlcjhlhmyqelfoaaohvtbekvifukdtnvcrrjveevfakxarxexomz'; set @s2 = 'dbnfqyzgtqxalcrwtfsqabknvtfcbpoonxsjiqvmhnfikxxhcgoexlkoezvah'; set @v1 = repeat(@s0, 100); # 1d42dd9090cf78314a06665d4ea938c35cc760f4 set @v2 = repeat(@s1, 200); # 10d3c783026b310218d10b7188da96a2401648c6 set @v3 = repeat(@s2, 300); # a33549d9844092289a58ac348dd59f09fc28406a set @v4 = repeat(@s0, 400); # daa61c6de36a0526f0d47dc29d6b9de7e6d2630c set @v5 = repeat(@s1, 500); # 70fc9a7d08beebc522258bfb02000a30c77a8f1d set @v6 = repeat(@s2, 600); # 090565c580809efed3d369481a4bbb168b20713e create table t1 ( a int auto_increment, b text, primary key (a) ) engine ndbcluster; insert into t1(b) values(@v1); insert into t1(b) values(@v2); insert into t1(b) values(@v3); create table t2 ( a text, b varchar(8), c mediumblob, d int, e tinyblob, f varchar(2), primary key (b, d, f) ) engine ndbcluster; insert into t2 values(@v1, 'a', @v2, 1, 'xx1', 'u'); insert into t2 values(@v3, 'a', @v4, 1, 'yy1', 'v'); insert into t2 values(@v5, 'a', @v6, 2, 'zz1', 'v'); insert into t2 values(@v1, 'abc', @v2, 1, 'xx2', 'u'); insert into t2 values(@v3, 'abc', @v4, 1, 'yy2', 'v'); insert into t2 values(@v5, 'abc', @v6, 2, 'zz2', 'v'); insert into t2 values(@v1, 'abcdefgh', @v2, 1, 'xx3', 'u'); insert into t2 values(@v3, 'abcdefgh', @v4, 1, 'yy3', 'v'); insert into t2 values(@v5, 'abcdefgh', @v6, 2, 'zz3', 'v'); # grmbl # select TABLE_NAME,ENGINE from INFORMATION_SCHEMA.TABLES # where TABLE_SCHEMA = 'test' and TABLE_NAME in ('t1','t2'); select a, sha1(b) from t1 order by a; select sha1(a), sha1(c), e from t2 order by b, d, f; --source include/ndb_backup.inc drop table t1, t2; --exec $NDB_RESTORE --no-defaults -b $the_backup_id -n 1 -m -r --print --print_meta $NDB_BACKUPS-$the_backup_id >> $NDB_TOOLS_OUTPUT --exec $NDB_RESTORE --no-defaults -b $the_backup_id -n 2 -r --print --print_meta $NDB_BACKUPS-$the_backup_id >> $NDB_TOOLS_OUTPUT select a, sha1(b) from t1 order by a; select sha1(a), sha1(c), e from t2 order by b, d, f; drop table t1,t2; # same on disk create logfile group lg1 add undofile 'undofile.dat' initial_size 16M undo_buffer_size 1M engine=ndb; create tablespace ts1 add datafile 'datafile.dat' use logfile group lg1 initial_size 64M engine=ndb; create table t1 ( a int, b text, primary key (a) ) tablespace ts1 storage disk engine ndbcluster; insert into t1 values(1, @v1); insert into t1 values(2, @v2); insert into t1 values(3, @v3); create table t2 ( a text, b varchar(8), c mediumblob, d int, e tinyblob, f varchar(2), primary key (b, d, f) ) tablespace ts1 storage disk engine ndbcluster; insert into t2 values(@v1, 'a', @v2, 1, 'xx1', 'u'); insert into t2 values(@v3, 'a', @v4, 1, 'yy1', 'v'); insert into t2 values(@v5, 'a', @v6, 2, 'zz1', 'v'); insert into t2 values(@v1, 'abc', @v2, 1, 'xx2', 'u'); insert into t2 values(@v3, 'abc', @v4, 1, 'yy2', 'v'); insert into t2 values(@v5, 'abc', @v6, 2, 'zz2', 'v'); insert into t2 values(@v1, 'abcdefgh', @v2, 1, 'xx3', 'u'); insert into t2 values(@v3, 'abcdefgh', @v4, 1, 'yy3', 'v'); insert into t2 values(@v5, 'abcdefgh', @v6, 2, 'zz3', 'v'); # grmbl # select TABLE_NAME,ENGINE from INFORMATION_SCHEMA.TABLES # where TABLE_SCHEMA = 'test' and TABLE_NAME in ('t1','t2'); select a, sha1(b) from t1 order by a; select sha1(a), sha1(c), e from t2 order by b, d, f; --source include/ndb_backup.inc drop table t1, t2; --exec $NDB_RESTORE --no-defaults -d -b $the_backup_id -n 1 -m -r --print --print_meta $NDB_BACKUPS-$the_backup_id >> $NDB_TOOLS_OUTPUT --exec $NDB_RESTORE --no-defaults -d -b $the_backup_id -n 2 -r --print --print_meta $NDB_BACKUPS-$the_backup_id >> $NDB_TOOLS_OUTPUT select a, sha1(b) from t1 order by a; select sha1(a), sha1(c), e from t2 order by b, d, f; drop table t1,t2; alter tablespace ts1 drop datafile 'datafile.dat' engine=ndb; drop tablespace ts1 engine=ndb; drop logfile group lg1 engine=ndb;