mariadb/mysql-test/suite/galera/r/galera_binlog_stmt_autoinc.result
2022-05-18 01:25:30 +02:00

205 lines
5.8 KiB
Text

connection node_2;
connection node_1;
connection node_1;
SET GLOBAL auto_increment_offset=1;
connection node_2;
SET GLOBAL auto_increment_offset=2;
connection node_1;
connection node_2;
connection node_2;
SET GLOBAL wsrep_forced_binlog_format='STATEMENT';
connection node_1;
SET GLOBAL wsrep_forced_binlog_format='STATEMENT';
CREATE TABLE t1 (
i int(11) NOT NULL primary key AUTO_INCREMENT,
c char(32) DEFAULT 'dummy_text'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
show variables like 'auto_increment%';
Variable_name Value
auto_increment_increment 2
auto_increment_offset 1
insert into t1(i) values(null);
Warnings:
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the slave
select * from t1 order by i;
i c
1 dummy_text
insert into t1(i) values(null), (null), (null);
Warnings:
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the slave
select * from t1 order by i;
i c
1 dummy_text
3 dummy_text
5 dummy_text
7 dummy_text
connection node_2;
show variables like 'auto_increment%';
Variable_name Value
auto_increment_increment 2
auto_increment_offset 2
select * from t1 order by i;
i c
1 dummy_text
3 dummy_text
5 dummy_text
7 dummy_text
SET GLOBAL wsrep_forced_binlog_format='none';
connection node_1;
SET GLOBAL wsrep_forced_binlog_format='none';
drop table t1;
SET SESSION binlog_format='STATEMENT';
show variables like 'binlog_format';
Variable_name Value
binlog_format STATEMENT
SET GLOBAL wsrep_auto_increment_control='OFF';
SET SESSION auto_increment_increment = 3;
SET SESSION auto_increment_offset = 1;
CREATE TABLE t1 (
i int(11) NOT NULL primary key AUTO_INCREMENT,
c char(32) DEFAULT 'dummy_text'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
show variables like 'auto_increment%';
Variable_name Value
auto_increment_increment 3
auto_increment_offset 1
insert into t1(i) values(null);
Warnings:
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the slave
select * from t1 order by i;
i c
1 dummy_text
insert into t1(i) values(null), (null), (null);
Warnings:
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the slave
select * from t1 order by i;
i c
1 dummy_text
4 dummy_text
7 dummy_text
10 dummy_text
connection node_2;
show variables like 'auto_increment%';
Variable_name Value
auto_increment_increment 2
auto_increment_offset 2
select * from t1 order by i;
i c
1 dummy_text
4 dummy_text
7 dummy_text
10 dummy_text
connection node_1;
SET GLOBAL wsrep_auto_increment_control='ON';
SET SESSION binlog_format='ROW';
connection node_1;
show variables like 'binlog_format';
Variable_name Value
binlog_format ROW
show variables like '%auto_increment%';
Variable_name Value
auto_increment_increment 2
auto_increment_offset 1
wsrep_auto_increment_control ON
SET GLOBAL wsrep_auto_increment_control='OFF';
show variables like '%auto_increment%';
Variable_name Value
auto_increment_increment 3
auto_increment_offset 1
wsrep_auto_increment_control OFF
SET GLOBAL wsrep_auto_increment_control='ON';
connection node_1;
drop table t1;
connection node_2;
SET GLOBAL wsrep_forced_binlog_format='ROW';
connection node_1;
SET GLOBAL wsrep_forced_binlog_format='ROW';
CREATE TABLE t1 (
i int(11) NOT NULL primary key AUTO_INCREMENT,
c char(32) DEFAULT 'dummy_text'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
show variables like 'auto_increment%';
Variable_name Value
auto_increment_increment 2
auto_increment_offset 1
insert into t1(i) values(null);
select * from t1 order by i;
i c
1 dummy_text
insert into t1(i) values(null), (null), (null);
select * from t1 order by i;
i c
1 dummy_text
3 dummy_text
5 dummy_text
7 dummy_text
connection node_2;
show variables like 'auto_increment%';
Variable_name Value
auto_increment_increment 2
auto_increment_offset 2
select * from t1 order by i;
i c
1 dummy_text
3 dummy_text
5 dummy_text
7 dummy_text
SET GLOBAL wsrep_forced_binlog_format='none';
connection node_1;
SET GLOBAL wsrep_forced_binlog_format='none';
drop table t1;
SET SESSION binlog_format='ROW';
show variables like 'binlog_format';
Variable_name Value
binlog_format ROW
SET GLOBAL wsrep_auto_increment_control='OFF';
SET SESSION auto_increment_increment = 3;
SET SESSION auto_increment_offset = 1;
CREATE TABLE t1 (
i int(11) NOT NULL primary key AUTO_INCREMENT,
c char(32) DEFAULT 'dummy_text'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
show variables like 'auto_increment%';
Variable_name Value
auto_increment_increment 3
auto_increment_offset 1
insert into t1(i) values(null);
select * from t1 order by i;
i c
1 dummy_text
insert into t1(i) values(null), (null), (null);
select * from t1 order by i;
i c
1 dummy_text
4 dummy_text
7 dummy_text
10 dummy_text
connection node_2;
show variables like 'auto_increment%';
Variable_name Value
auto_increment_increment 2
auto_increment_offset 2
select * from t1 order by i;
i c
1 dummy_text
4 dummy_text
7 dummy_text
10 dummy_text
connection node_1;
SET GLOBAL wsrep_auto_increment_control='ON';
show variables like 'binlog_format';
Variable_name Value
binlog_format ROW
show variables like '%auto_increment%';
Variable_name Value
auto_increment_increment 2
auto_increment_offset 2
wsrep_auto_increment_control ON
SET GLOBAL wsrep_auto_increment_control='OFF';
show variables like '%auto_increment%';
Variable_name Value
auto_increment_increment 1
auto_increment_offset 2
wsrep_auto_increment_control OFF
SET GLOBAL wsrep_auto_increment_control='ON';
drop table t1;