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/suite/sql_sequence/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/local/mysql/mysql-test/suite/sql_sequence/slave_nextval.test
--source include/master-slave.inc
--source include/have_binlog_format_row.inc

#
# MDEV-14092  NEXTVAL() fails on slave
#

--disable_ps2_protocol
CREATE SEQUENCE s;
INSERT INTO s VALUES (1,1,4,1,1,1,0,0);
show create sequence s;
SELECT NEXTVAL(s);

--sync_slave_with_master
SELECT NEXTVAL(s);
SELECT NEXTVAL(s);

--connection master
SELECT NEXTVAL(s);
SELECT NEXTVAL(s);
SELECT NEXTVAL(s);

select * from s;

--sync_slave_with_master

select * from s;
--connection master
DROP SEQUENCE s;

#
# Same as above, but with cycles
#

CREATE SEQUENCE s;
INSERT INTO s VALUES (1,1,3,1,1,1,1,0);
show create sequence s;
SELECT NEXTVAL(s);

--sync_slave_with_master
SELECT NEXTVAL(s);
SELECT NEXTVAL(s);

--connection master
SELECT NEXTVAL(s);
SELECT NEXTVAL(s);
SELECT NEXTVAL(s);

select * from s;

--sync_slave_with_master

select * from s;

--connection master
DROP SEQUENCE s;

# Here is a bit more complicated concurrent scenario that
# causes the same effect without any updates on the slave. You might
# need to replace 100 with a bigger value if it doesn't happen on your
# machine right away.

CREATE SEQUENCE s;
INSERT INTO s VALUES (1,1,3,1,1,1,1,0);
SELECT NEXTVAL(s);

--delimiter $
CREATE PROCEDURE pr(n INT)
BEGIN
DECLARE i INT DEFAULT 0;
WHILE i < n
DO
SELECT NEXTVAL(s);
SELECT NEXTVAL(s);
SELECT NEXTVAL(s);
SET i= i+1;
END WHILE;
END $
--delimiter ;

--connect (con1,localhost,root,,)
--send CALL pr(100)
--connect (con2,localhost,root,,)
--send CALL pr(100)
--connect (con3,localhost,root,,)
--send CALL pr(100)
--connect (con4,localhost,root,,)
--send CALL pr(100)
--connect (con5,localhost,root,,)
--send CALL pr(100)
--connect (con6,localhost,root,,)
--send CALL pr(100)
--connect (con7,localhost,root,,)
--send CALL pr(100)
--connect (con8,localhost,root,,)
--send CALL pr(100)


--disable_query_log
--disable_result_log

--connection con1
--reap
--connection con2
--reap
--connection con3
--reap
--connection con4
--reap
--connection con5
--reap
--connection con6
--reap
--connection con7
--reap
--connection con8
--reap

--enable_query_log
--enable_result_log

--connection master

--sync_slave_with_master

--connection master
DROP SEQUENCE s;
DROP PROCEDURE pr;
--enable_ps2_protocol

#
# Cleanup
#
--source include/rpl_end.inc

Youez - 2016 - github.com/yon3zu
LinuXploit