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/long_unique_bugs_replication.test
#
# Long unique bugs related to master slave replication
#

--echo #
--echo # MDEV-22722 Assertion "inited==NONE" failed in handler::ha_index_init on the slave during UPDATE
--echo #

--source include/have_binlog_format_row.inc
--source include/master-slave.inc

create table t1 (i1 int, a1 text, unique key i1 (a1)) engine=myisam;
insert into t1 values (1,1);
insert into t1 values (2,2);
update t1 set a1 = 'd' limit 1;
update t1 set a1 = 'd2' where i1= 2;

sync_slave_with_master;
connection slave;
select * from t1;
connection master;
drop table t1;

sync_slave_with_master;
connection master;


--echo #
--echo # MDEV-32093 long uniques break old->new replication
--echo #

# this is techically a bug in replication, but it needs an old master
# so we'll run it as a non-replicated test with BINLOG command
create table t1 (id int not null, b1 varchar(255) not null, b2 varchar(2550) not null, unique (id), unique key (b1,b2) using hash) default charset utf8mb3;
set global slave_exec_mode=idempotent;

# Format_description_log_event, MariaDB-10.5.15
binlog 'aRf2ZA8BAAAA/AAAAAABAAAAAAQAMTAuNS4xNS1NYXJpYURCLWxvZwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABpF/ZkEzgNAAgAEgAEBAQEEgAA5AAEGggAAAAICAgCAAAACgoKAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEEwQADQgICAoKCgFRmTlk';

### INSERT t1 VALUES (42127, 'b', 'e', 39952170926)
binlog 'bBf2ZBMBAAAANAAAAJgHAAAAAHEAAAAAAAEABHRlc3QAAnQxAAQDDw8IBP0C4h0AeqMD4A==bBf2ZBcBAAAANAAAAMwHAAAAAHEAAAAAAAEABP/wj6QAAAEAYgEAZa6/VU0JAAAANteqUw==';
binlog 'bBf2ZBMBAAAANAAAAJgHAAAAAHEAAAAAAAEABHRlc3QAAnQxAAQDDw8IBP0C4h0AeqMD4A==bBf2ZBcBAAAANAAAAMwHAAAAAHEAAAAAAAEABP/wj6QAAAEAYgEAZa6/VU0JAAAANteqUw==';

### UPDATE t1 WHERE (42127, 'b', 'e', 39952170926) SET (23406, 'b', 'e', 39952170926)
binlog 'bBf2ZBMBAAAANAAAAHUkAAAAAHEAAAAAAAEABHRlc3QAAnQxAAQDDw8IBP0C4h0AaTGFIg==bBf2ZBgBAAAASAAAAL0kAAAAAHEAAAAAAAEABP//8I+kAAABAGIBAGWuv1VNCQAAAPBuWwAAAQBiAQBlrr9VTQkAAADxS9Lu';

sync_slave_with_master;
select * from t1;
connection master;
set global slave_exec_mode=default;
drop table t1;

--echo #
--echo # End of 10.4 tests
--echo #

--echo # Idempotent scenario, which triggers REPLACE code to be used in the
--echo # event, i.e. duplicated record will be deleted and then re-inserted.
create table t1 (i1 int, a1 text, unique key i1 (a1)) engine=myisam;

sync_slave_with_master;
connection slave;
set @save_slave_exec_mode= @@slave_exec_mode;
set global slave_exec_mode = idempotent;
insert into t1 values (1,1);
connection master;
insert into t1 values (2,1);
sync_slave_with_master;
connection slave;
select * from t1;
connection master;
insert into t1 values (3,3);
update t1 set a1 = 'd' limit 1;
update t1 set a1 = 'd2' where i1= 3;
sync_slave_with_master;

connection slave;
select * from t1;
set global slave_exec_mode = @save_slave_exec_mode;
connection master;
drop table t1;
sync_slave_with_master;
connection master;

--echo #
--echo # End of 10.4 tests
--echo #

--source include/rpl_end.inc

Youez - 2016 - github.com/yon3zu
LinuXploit