summaryrefslogtreecommitdiffstats
path: root/mysql-test/suite/sql_sequence/slave_nextval.result
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 18:00:34 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 18:00:34 +0000
commit3f619478f796eddbba6e39502fe941b285dd97b1 (patch)
treee2c7b5777f728320e5b5542b6213fd3591ba51e2 /mysql-test/suite/sql_sequence/slave_nextval.result
parentInitial commit. (diff)
downloadmariadb-upstream.tar.xz
mariadb-upstream.zip
Adding upstream version 1:10.11.6.upstream/1%10.11.6upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/suite/sql_sequence/slave_nextval.result')
-rw-r--r--mysql-test/suite/sql_sequence/slave_nextval.result108
1 files changed, 108 insertions, 0 deletions
diff --git a/mysql-test/suite/sql_sequence/slave_nextval.result b/mysql-test/suite/sql_sequence/slave_nextval.result
new file mode 100644
index 00000000..bfbc472e
--- /dev/null
+++ b/mysql-test/suite/sql_sequence/slave_nextval.result
@@ -0,0 +1,108 @@
+include/master-slave.inc
+[connection master]
+CREATE SEQUENCE s;
+INSERT INTO s VALUES (1,1,4,1,1,1,0,0);
+show create sequence s;
+Table Create Table
+s CREATE SEQUENCE `s` start with 1 minvalue 1 maxvalue 4 increment by 1 cache 1 nocycle ENGINE=MyISAM
+SELECT NEXTVAL(s);
+NEXTVAL(s)
+1
+connection slave;
+SELECT NEXTVAL(s);
+NEXTVAL(s)
+2
+SELECT NEXTVAL(s);
+NEXTVAL(s)
+3
+connection master;
+SELECT NEXTVAL(s);
+NEXTVAL(s)
+2
+SELECT NEXTVAL(s);
+NEXTVAL(s)
+3
+SELECT NEXTVAL(s);
+NEXTVAL(s)
+4
+select * from s;
+next_not_cached_value minimum_value maximum_value start_value increment cache_size cycle_option cycle_count
+5 1 4 1 1 1 0 0
+connection slave;
+select * from s;
+next_not_cached_value minimum_value maximum_value start_value increment cache_size cycle_option cycle_count
+5 1 4 1 1 1 0 0
+connection master;
+DROP SEQUENCE s;
+CREATE SEQUENCE s;
+INSERT INTO s VALUES (1,1,3,1,1,1,1,0);
+show create sequence s;
+Table Create Table
+s CREATE SEQUENCE `s` start with 1 minvalue 1 maxvalue 3 increment by 1 cache 1 cycle ENGINE=MyISAM
+SELECT NEXTVAL(s);
+NEXTVAL(s)
+1
+connection slave;
+SELECT NEXTVAL(s);
+NEXTVAL(s)
+2
+SELECT NEXTVAL(s);
+NEXTVAL(s)
+3
+connection master;
+SELECT NEXTVAL(s);
+NEXTVAL(s)
+2
+SELECT NEXTVAL(s);
+NEXTVAL(s)
+3
+SELECT NEXTVAL(s);
+NEXTVAL(s)
+1
+select * from s;
+next_not_cached_value minimum_value maximum_value start_value increment cache_size cycle_option cycle_count
+2 1 3 1 1 1 1 1
+connection slave;
+select * from s;
+next_not_cached_value minimum_value maximum_value start_value increment cache_size cycle_option cycle_count
+2 1 3 1 1 1 1 1
+connection master;
+DROP SEQUENCE s;
+CREATE SEQUENCE s;
+INSERT INTO s VALUES (1,1,3,1,1,1,1,0);
+SELECT NEXTVAL(s);
+NEXTVAL(s)
+1
+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 $
+connect con1,localhost,root,,;
+CALL pr(100);
+connect con2,localhost,root,,;
+CALL pr(100);
+connect con3,localhost,root,,;
+CALL pr(100);
+connect con4,localhost,root,,;
+CALL pr(100);
+connect con5,localhost,root,,;
+CALL pr(100);
+connect con6,localhost,root,,;
+CALL pr(100);
+connect con7,localhost,root,,;
+CALL pr(100);
+connect con8,localhost,root,,;
+CALL pr(100);
+connection master;
+connection slave;
+connection master;
+DROP SEQUENCE s;
+DROP PROCEDURE pr;
+include/rpl_end.inc