403Webshell
Server IP : 104.21.38.3  /  Your IP : 172.70.92.246
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 :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/server/mysql/src/mysql-test/suite/ndb/t/ndb_alter_table_dml.test
# 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

#
# Testing' alter table partition by key' with concurrent dml.
# 

--source include/not_embedded.inc
--source include/have_multi_ndb.inc

connect (j1,localhost,root,,test);
connect (j2,localhost,root,,test);
connect (j3,localhost,root,,test);
connect (j4,localhost,root,,test);

connect (ddl,localhost,root,,test);

connection ddl;
call mtr.add_suppression(".*NDB_SHARE.*Moving away for safety, but possible memleak");

use test;

create table parent(a int primary key, b int, key(b)) engine=ndb;
create table child(a int primary key, b int) engine=ndb;

insert into parent values (1,1), (2,2), (3,3), (4,4);
insert into parent select a+4, b+4 from parent;
insert into parent select a+8, b+8 from parent;
insert into parent select a+16, b+16 from parent;
insert into parent select a+32, b+32 from parent;
insert into parent select a+64, b+64 from parent;
insert into parent select a+128, b+128 from parent;
insert into parent select a+256, b+256 from parent;
insert into parent select a+512, b+512 from parent;
insert into parent select a+1024, b+1024 from parent;
insert into parent select a+2048, b+2048 from parent;
insert into parent select a+4096, b+4096 from parent;

insert into child select * from parent;

connection j1;
set ndb_join_pushdown = false;

explain
  select count(*)
  from parent join child
  on (parent.b = child.a)
  where parent.b > 5;

--disable_query_log
delimiter %;
create procedure queryload (seconds int)
begin
  set @x=time_to_sec(current_time()) + seconds;
  set ndb_join_pushdown = false;
  repeat
    select count(*)
    from parent join child
    on (parent.b = child.a)
    where parent.b > 5;
  until @x <= time_to_sec(current_time())
  end repeat;
end%

delimiter ;%
--enable_query_log

--echo Starting engines...

connection j1;
send call queryload(10);

connection j2;
send call queryload(10);

connection j3;
send call queryload(10);

connection j4;
send call queryload(10);

sleep 3;

connection server2;

--echo Beginning alter table child  partition by key(a) partitions 4;

alter table child  partition by key(a) partitions 4;

--echo  Completed.

connection j1;
--disable_result_log
--error 0,ER_NO_SUCH_TABLE,ER_TABLE_DEF_CHANGED
reap;
--enable_result_log

connection j2;
--disable_result_log
--error 0,ER_NO_SUCH_TABLE,ER_TABLE_DEF_CHANGED
reap;
--enable_result_log

connection j3;
--disable_result_log
--error 0,ER_NO_SUCH_TABLE,ER_TABLE_DEF_CHANGED
reap;
--enable_result_log

connection j4;
--disable_result_log
--error 0,ER_NO_SUCH_TABLE,ER_TABLE_DEF_CHANGED
reap;
--enable_result_log

connection ddl;
--echo Ending test. Droping table parent
drop table parent;
drop table child;
drop procedure queryload;

Youez - 2016 - github.com/yon3zu
LinuXploit