Skip to content

Commit

Permalink
Merge branch '10.5' into 10.6
Browse files Browse the repository at this point in the history
  • Loading branch information
vuvova committed May 18, 2022
2 parents 98ca71a + 7970ac7 commit b218766
Show file tree
Hide file tree
Showing 68 changed files with 2,319 additions and 409 deletions.
2 changes: 2 additions & 0 deletions cmake/maintainer.cmake
Expand Up @@ -23,6 +23,8 @@ ENDIF()
SET(MY_WARNING_FLAGS
-Wall
-Wdeclaration-after-statement
-Wenum-compare
-Wenum-conversion
-Wextra
-Wformat-security
-Wno-format-truncation
Expand Down
7 changes: 3 additions & 4 deletions mysql-test/include/have_log_bin.inc
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.

8 changes: 8 additions & 0 deletions mysql-test/main/insert.result
Expand Up @@ -776,6 +776,14 @@ select 1 in (select count(*) from t t1 join (t t2 join t t3 on (t1.a != 0)));
ERROR 42S22: Unknown column 't1.a' in 'on clause'
drop table t;
#
# MDEV-28578 Server crashes in Item_field::fix_outer_field after CREATE SELECT
#
create table t1 (i int) ;
create table t2 (j int) ;
create table t4 select * from t1 join t2 on (select t3.i);
ERROR 42S22: Unknown column 't3.i' in 'field list'
drop table t1, t2;
#
# End of 10.4 tests
#
#
Expand Down
10 changes: 9 additions & 1 deletion mysql-test/main/insert.test
Expand Up @@ -640,6 +640,15 @@ create table t (a int);
select 1 in (select count(*) from t t1 join (t t2 join t t3 on (t1.a != 0)));
drop table t;

--echo #
--echo # MDEV-28578 Server crashes in Item_field::fix_outer_field after CREATE SELECT
--echo #
create table t1 (i int) ;
create table t2 (j int) ;
--error ER_BAD_FIELD_ERROR
create table t4 select * from t1 join t2 on (select t3.i);
drop table t1, t2;

--echo #
--echo # End of 10.4 tests
--echo #
Expand All @@ -660,4 +669,3 @@ drop table t1;
--echo #
--echo # End of 10.5 tests
--echo #

9 changes: 9 additions & 0 deletions mysql-test/suite/compat/oracle/r/events.result
Expand Up @@ -16,3 +16,12 @@ COUNT(*)
1
DROP TABLE t1;
SET GLOBAL event_scheduler=off;
#
# MDEV-28588 SIGSEGV in __memmove_avx_unaligned_erms, strmake_root
#
CREATE EVENT ev ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR DO BEGIN END;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SELECT EVENT_DEFINITION FROM INFORMATION_SCHEMA.EVENTS WHERE EVENT_SCHEMA='test' AND EVENT_NAME='ev';
EVENT_DEFINITION BEGIN END
DROP EVENT ev;
13 changes: 12 additions & 1 deletion mysql-test/suite/compat/oracle/r/sp.result
Expand Up @@ -2549,7 +2549,18 @@ idx
1
DROP PROCEDURE p1;
#
# Start of 10.4 tests
# MDEV-28588 SIGSEGV in __memmove_avx_unaligned_erms, strmake_root
#
SET sql_mode=ORACLE;
BEGIN END;
CREATE TABLE t1 (a INT);
CREATE TRIGGER tr AFTER INSERT ON t1 FOR EACH ROW BEGIN END;
SELECT ACTION_STATEMENT FROM INFORMATION_SCHEMA.TRIGGERS WHERE TRIGGER_SCHEMA='test' AND TRIGGER_NAME='tr';
ACTION_STATEMENT BEGIN END
DROP TRIGGER tr;
DROP TABLE t1;
#
# End of 10.3 tests
#
#
# MDEV-19637 Crash on an SP variable assignment to a wrong subselect
Expand Down
10 changes: 9 additions & 1 deletion mysql-test/suite/compat/oracle/t/events.test
Expand Up @@ -25,5 +25,13 @@ let $wait_condition =
SELECT COUNT(*) FROM t1;
DROP TABLE t1;


SET GLOBAL event_scheduler=off;

--echo #
--echo # MDEV-28588 SIGSEGV in __memmove_avx_unaligned_erms, strmake_root
--echo #
CREATE EVENT ev ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR DO BEGIN END;
--vertical_results
SELECT EVENT_DEFINITION FROM INFORMATION_SCHEMA.EVENTS WHERE EVENT_SCHEMA='test' AND EVENT_NAME='ev';
--horizontal_results
DROP EVENT ev;
16 changes: 15 additions & 1 deletion mysql-test/suite/compat/oracle/t/sp.test
Expand Up @@ -2392,9 +2392,23 @@ DROP PROCEDURE p1;


--echo #
--echo # Start of 10.4 tests
--echo # MDEV-28588 SIGSEGV in __memmove_avx_unaligned_erms, strmake_root
--echo #

SET sql_mode=ORACLE;
BEGIN END;

CREATE TABLE t1 (a INT);
CREATE TRIGGER tr AFTER INSERT ON t1 FOR EACH ROW BEGIN END;
--vertical_results
SELECT ACTION_STATEMENT FROM INFORMATION_SCHEMA.TRIGGERS WHERE TRIGGER_SCHEMA='test' AND TRIGGER_NAME='tr';
--horizontal_results
DROP TRIGGER tr;
DROP TABLE t1;

--echo #
--echo # End of 10.3 tests
--echo #

--echo #
--echo # MDEV-19637 Crash on an SP variable assignment to a wrong subselect
Expand Down
2 changes: 0 additions & 2 deletions mysql-test/suite/galera/disabled.def
Expand Up @@ -19,10 +19,8 @@ galera_bf_abort_group_commit : MDEV-18282 Galera test failure on galera.galera_b
galera_bf_kill_debug : MDEV-24485 wsrep::client_state::do_acquire_ownership(): Assertion `state_ == s_idle || mode_ != m_local' failed
galera_bf_lock_wait : MDEV-21597 wsrep::transaction::start_transaction(): Assertion `active() == false' failed
galera_encrypt_tmp_files : Get error failed to enable encryption of temporary files
galera_ftwrl : MDEV-21525 galera.galera_ftwrl
galera_gcache_recover_manytrx : MDEV-18834 Galera test failure
galera_kill_largechanges : MDEV-18179 Galera test failure on galera.galera_kill_largechanges
galera_many_tables_nopk : MDEV-18182 Galera test failure on galera.galera_many_tables_nopk
galera_mdl_race : MDEV-21524 galera.galera_mdl_race
galera_parallel_simple : MDEV-20318 galera.galera_parallel_simple fails
galera_pc_ignore_sb : MDEV-20888 galera.galera_pc_ignore_sb
Expand Down
14 changes: 14 additions & 0 deletions mysql-test/suite/galera/r/MDEV-28053.result
@@ -0,0 +1,14 @@
connection node_2;
connection node_1;
connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
connection node_3;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
connection node_2;
connection node_3;
DROP TABLE t1;
connection node_2;
connection node_2;
STOP SLAVE;
RESET SLAVE ALL;
connection node_3;
RESET MASTER;
88 changes: 61 additions & 27 deletions mysql-test/suite/galera/r/galera_binlog_stmt_autoinc.result
@@ -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;

0 comments on commit b218766

Please sign in to comment.