403Webshell
Server IP : 88.99.149.37  /  Your IP : 216.73.216.141
Web Server : nginx/1.31.2
System : Linux server-88-99-149-37 6.12.0-124.56.5.el10_1.x86_64 #1 SMP PREEMPT_DYNAMIC Fri May 15 06:12:08 EDT 2026 x86_64
User : muralimurth ( 1015)
PHP Version : 8.4.23
Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/local/mysql/mysql-test/main/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/local/mysql/mysql-test/main/multi_update_binlog.test
#
# Test of update statement that uses many tables.
#

source include/have_log_bin.inc;

CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT.");

#
# Bug#27716 multi-update did partially and has not binlogged
#

CREATE TABLE `t1` (
  `a` int(11) NOT NULL auto_increment,
  `b` int(11) default NULL,
  PRIMARY KEY  (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ;

CREATE TABLE `t2` (
  `a` int(11) NOT NULL auto_increment,
  `b` int(11) default NULL,
  PRIMARY KEY  (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ;

# as the test is about to see erroed queries in binlog
set @sav_binlog_format=  @@session.binlog_format;
set @@session.binlog_format= mixed;


# A. testing multi_update::send_error() effective update
insert into t1 values (1,1),(2,2);
insert into t2 values (1,1),(4,4);
reset master;
--error ER_DUP_ENTRY
UPDATE t2,t1 SET t2.a=t1.a+2;
# check
select * from t2 /* must be (3,1), (4,4) */;
source include/show_binlog_events.inc;

# B. testing multi_update::send_error() ineffective update
# (as there is a policy described at mysql_update() still go to binlog)
delete from t1;
delete from t2;
insert into t1 values (1,2),(3,4),(4,4);
insert into t2 values (1,2),(3,4),(4,4);
reset master;
--error ER_DUP_ENTRY
UPDATE t2,t1  SET t2.a=t2.b where t2.a=t1.a;
source include/show_binlog_events.inc;

# cleanup
drop table t1, t2;
set @@session.binlog_format= @sav_binlog_format;

#
# Bug#29136 erred multi-delete on trans table does not rollback
#

# prepare
CREATE TABLE t1 (a int, PRIMARY KEY (a));
CREATE TABLE t2 (a int, PRIMARY KEY (a));
CREATE TABLE t3 (a int, PRIMARY KEY (a)) ENGINE=MyISAM;
create trigger trg_del_t3 before  delete on t3 for each row insert into t1 values (1);

insert into t2 values (1),(2);
insert into t3 values (1),(2);
reset master;

# exec cases B, A - see innodb.test

# B. send_eof() and send_error() afterward

--error ER_DUP_ENTRY
delete t3.* from t2,t3 where t2.a=t3.a;

# check
select count(*) from t1 /* must be 1 */;
select count(*) from t3 /* must be 1 */;

# cleanup
drop table t1, t2, t3;


Youez - 2016 - github.com/yon3zu
LinuXploit