403Webshell
Server IP : 104.21.38.3  /  Your IP : 108.162.227.64
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_multi_update_delete.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

-- source include/have_ndb.inc

--echo
--echo # Bug#12728221 - MULTI-TABLE DELETE ON UNIQUE INDEX REMOVES WRONG ROWS IN CLUSTER
--echo

CREATE TABLE t1 (
  a int(11) NOT NULL,
  b int(11) DEFAULT NULL,
  c varchar(64) DEFAULT NULL,
  PRIMARY KEY (a),
  UNIQUE KEY c (c),
  KEY b (b)
) ENGINE=ndbcluster DEFAULT CHARSET=latin1;

CREATE TABLE t2 (
  a int(11) NOT NULL,
  b text,
  PRIMARY KEY (a)
) ENGINE=ndbcluster DEFAULT CHARSET=latin1;

INSERT INTO t1 VALUES (1,3,'test3'),(2,2,'test2'),(3,1,'test1');
INSERT INTO t2 VALUES (1,''),(2,''),(3,'');

delete t1,t2 from t1,t2 where t1.b=t2.a and t1.c='test1';
delete t1,t2 from t1,t2 where t1.b=t2.a and t1.c='test2';
delete t1,t2 from t1,t2 where t1.b=t2.a and t1.c='test3'; 
select * from t1,t2;
drop table t1,t2;


--echo
--echo # Bug#12718336 - 61705: TRIGGER WORKS IMPROPERLY IN MYSQL CLUSTER.
--echo

CREATE TABLE t1 (a int(11) NOT NULL, b int(11) DEFAULT NULL, c
varchar(64) DEFAULT NULL, d char(10), j int, PRIMARY KEY (a),
UNIQUE KEY c (c),  KEY b (b)) ENGINE=ndbcluster DEFAULT
CHARSET=latin1;
CREATE TABLE t2 (  e int(11) NOT NULL,  f char(10),  PRIMARY KEY
(e)) ENGINE=ndbcluster DEFAULT CHARSET=latin1;
CREATE TABLE t3 (t3_id int(11) NOT NULL AUTO_INCREMENT,g int(11)
DEFAULT NULL,  h char(10), PRIMARY KEY (t3_id)) ENGINE=ndbcluster
DEFAULT CHARSET=latin1;
CREATE TRIGGER trg1 AFTER UPDATE ON t1 FOR EACH ROW INSERT INTO
t3(g,h) values (old.b,  old.d);
INSERT INTO t1 VALUES (11,1,'test1', 'hei1',111),(22,2,'test2',
'hei2',222),(33,3,'test3', 'hei3',333);
INSERT INTO t2 VALUES (1,'xx'),(2,'yy'),(3,'zz');
--sorted_result
select * from t1;
--sorted_result
select * from t2;
--sorted_result
select * from t3;
update t1,t2 set t1.d=t2.f where t1.b=t2.e and t1.c='test1';
--sorted_result
select * from t1;
--sorted_result
select * from t2;
--sorted_result
select * from t3;

drop table t1,t2,t3;

Youez - 2016 - github.com/yon3zu
LinuXploit