summaryrefslogtreecommitdiffstats
path: root/mysql-test/suite/galera/r/galera_temporary_sequences.result
blob: af80551c40b5aba2cad2f295b0fe837abe7fd9a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
connection node_2;
connection node_1;
connection node_2;
SET AUTOCOMMIT=0;
SET SESSION wsrep_OSU_method='RSU';
CREATE TABLE t (i int primary key, j int);
CREATE TEMPORARY SEQUENCE seq2 NOCACHE ENGINE=InnoDB;
COMMIT;
SET SESSION wsrep_OSU_method='RSU';
CREATE SEQUENCE seq1 NOCACHE ENGINE=InnoDB;
SET SESSION wsrep_OSU_method='TOI';
DROP TABLE t;
DROP SEQUENCE seq2;
DROP SEQUENCE seq1;
connection node_1;
CREATE TABLE t (i int primary key, j int) ENGINE=InnoDB;
SET AUTOCOMMIT=0;
INSERT INTO t VALUES (3,0);
CREATE TEMPORARY SEQUENCE seq1 NOCACHE ENGINE=InnoDB;
COMMIT;
INSERT INTO t VALUES (4,0);
CREATE SEQUENCE seq2 NOCACHE ENGINE=InnoDB;
commit;
connection node_2;
SELECT * FROM t;
i	j
3	0
4	0
SHOW CREATE TABLE seq1;
ERROR 42S02: Table 'test.seq1' doesn't exist
SHOW CREATE TABLE seq2;
Table	Create Table
seq2	CREATE TABLE `seq2` (
  `next_not_cached_value` bigint(21) NOT NULL,
  `minimum_value` bigint(21) NOT NULL,
  `maximum_value` bigint(21) NOT NULL,
  `start_value` bigint(21) NOT NULL COMMENT 'start value when sequences is created or value if RESTART is used',
  `increment` bigint(21) NOT NULL COMMENT 'increment value',
  `cache_size` bigint(21) unsigned NOT NULL,
  `cycle_option` tinyint(1) unsigned NOT NULL COMMENT '0 if no cycles are allowed, 1 if the sequence should begin a new cycle when maximum_value is passed',
  `cycle_count` bigint(21) NOT NULL COMMENT 'How many cycles have been done'
) ENGINE=InnoDB SEQUENCE=1
connection node_1;
DROP TABLE t;
DROP SEQUENCE seq1;
DROP SEQUENCE seq2;