Skip to content

Commit

Permalink
Merge branch '10.4' into 10.5
Browse files Browse the repository at this point in the history
  • Loading branch information
vuvova committed May 13, 2022
2 parents 3fabdc3 + 2ab6983 commit 4b10917
Show file tree
Hide file tree
Showing 17 changed files with 267 additions and 73 deletions.
7 changes: 3 additions & 4 deletions mysql-test/include/have_log_bin.inc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

source include/not_embedded.inc;

-- require include/have_log_bin.require
disable_query_log;
show variables like 'log_bin';
enable_query_log;
if (`select not @@log_bin`) {
skip Test requires: 'have_log_bin';
}
2 changes: 0 additions & 2 deletions mysql-test/include/have_log_bin.require

This file was deleted.

3 changes: 3 additions & 0 deletions mysql-test/suite/galera/r/MDEV-26575.result
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
connection node_2;
connection node_1;
connection node_2;
call mtr.add_suppression("WSREP: Failed to scan the last segment to the end. Last events may be missing. Last recovered event:.*");
connection node_1;
connection node_1;
connection node_2;
connection node_2;
Expand Down
88 changes: 61 additions & 27 deletions mysql-test/suite/galera/r/galera_binlog_stmt_autoinc.result
Original file line number Diff line number Diff line change
@@ -1,33 +1,44 @@
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 AUTO_INCREMENT,
c char(32) DEFAULT 'dummy_text',
PRIMARY KEY (i)
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;
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;
select * from t1 order by i;
i c
1 dummy_text
3 dummy_text
5 dummy_text
7 dummy_text
connection node_2;
select * from t1;
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
Expand All @@ -45,27 +56,34 @@ 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 AUTO_INCREMENT,
c char(32) DEFAULT 'dummy_text',
PRIMARY KEY (i)
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;
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;
select * from t1 order by i;
i c
1 dummy_text
4 dummy_text
7 dummy_text
10 dummy_text
connection node_2;
select * from t1;
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
Expand All @@ -74,6 +92,7 @@ i c
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
Expand All @@ -89,29 +108,37 @@ 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 AUTO_INCREMENT,
c char(32) DEFAULT 'dummy_text',
PRIMARY KEY (i)
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;
select * from t1 order by i;
i c
1 dummy_text
insert into t1(i) values(null), (null), (null);
select * from t1;
select * from t1 order by i;
i c
1 dummy_text
3 dummy_text
5 dummy_text
7 dummy_text
connection node_2;
select * from t1;
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
Expand All @@ -129,23 +156,30 @@ 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 AUTO_INCREMENT,
c char(32) DEFAULT 'dummy_text',
PRIMARY KEY (i)
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;
select * from t1 order by i;
i c
1 dummy_text
insert into t1(i) values(null), (null), (null);
select * from t1;
select * from t1 order by i;
i c
1 dummy_text
4 dummy_text
7 dummy_text
10 dummy_text
connection node_2;
select * from t1;
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
Expand All @@ -159,13 +193,13 @@ binlog_format ROW
show variables like '%auto_increment%';
Variable_name Value
auto_increment_increment 2
auto_increment_offset 1
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 3
auto_increment_offset 1
auto_increment_increment 1
auto_increment_offset 2
wsrep_auto_increment_control OFF
SET GLOBAL wsrep_auto_increment_control='ON';
drop table t1;
4 changes: 4 additions & 0 deletions mysql-test/suite/galera/t/MDEV-26575.test
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@

--source include/galera_cluster.inc

--connection node_2
call mtr.add_suppression("WSREP: Failed to scan the last segment to the end. Last events may be missing. Last recovered event:.*");
--connection node_1

# Save original auto_increment_offset values.
--let $node_1=node_1
--let $node_2=node_2
Expand Down
2 changes: 2 additions & 0 deletions mysql-test/suite/galera/t/galera_binlog_stmt_autoinc.cnf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

[mysqld.1]
auto_increment_offset=1
auto_increment_increment=1

[mysqld.2]
auto_increment_offset=2
auto_increment_increment=1

0 comments on commit 4b10917

Please sign in to comment.