Skip to content

Commit

Permalink
Merge branch '10.8' into 10.9
Browse files Browse the repository at this point in the history
  • Loading branch information
sanja-byelkin committed Feb 1, 2023
2 parents de2d089 + d4310eb commit 260f1fe
Show file tree
Hide file tree
Showing 9 changed files with 85 additions and 0 deletions.
12 changes: 12 additions & 0 deletions mysql-test/main/select,ps.rdiff
@@ -0,0 +1,12 @@
--- mysql-test/main/select.result 2023-01-31 09:30:58.151377805 +0100
+++ mysql-test/main/select.reject 2023-02-01 13:44:11.026958614 +0100
@@ -5661,6 +5661,8 @@
Note 1276 Field or reference 'test.t1.a' of SELECT #3 was resolved in SELECT #1
Note 1276 Field or reference 'test.t1.a' of SELECT #3 was resolved in SELECT #1
Note 1249 Select 2 was reduced during optimization
+Note 1276 Field or reference 'test.t1.a' of SELECT #3 was resolved in SELECT #1
+Note 1276 Field or reference 'test.t1.a' of SELECT #3 was resolved in SELECT #1
Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = 1 and (1 or <expr_cache><`test`.`t1`.`a`>((/* select#3 */ select 3 from DUAL where `test`.`t1`.`a` = `test`.`t1`.`a`)) = 3)
PREPARE stmt FROM 'SELECT * FROM t1 WHERE a = 1 AND
(3 = 0 OR (SELECT a = 1 OR (SELECT 3 WHERE a = a) = 3))';

3 changes: 3 additions & 0 deletions mysql-test/main/select.test
Expand Up @@ -3,6 +3,7 @@
#

--source include/no_valgrind_without_big.inc
--source include/protocol.inc

#
# Simple select test
Expand Down Expand Up @@ -4758,9 +4759,11 @@ INSERT INTO t1 VALUES (1),(2),(3);
SELECT * FROM t1 WHERE a = 1 AND
(3 = 0 OR (SELECT a = 1 OR (SELECT 3 WHERE a = a) = 3));

--enable_prepare_warnings
EXPLAIN EXTENDED
SELECT * FROM t1 WHERE a = 1 AND
(3 = 0 OR (SELECT a = 1 OR (SELECT 3 WHERE a = a) = 3));
--disable_prepare_warnings

PREPARE stmt FROM 'SELECT * FROM t1 WHERE a = 1 AND
(3 = 0 OR (SELECT a = 1 OR (SELECT 3 WHERE a = a) = 3))';
Expand Down
12 changes: 12 additions & 0 deletions mysql-test/main/select_jcl6,ps.rdiff
@@ -0,0 +1,12 @@
--- mysql-test/main/select_jcl6.result 2023-01-31 09:30:58.151377805 +0100
+++ mysql-test/main/select_jcl6.reject 2023-02-01 13:44:10.722958771 +0100
@@ -5672,6 +5672,8 @@
Note 1276 Field or reference 'test.t1.a' of SELECT #3 was resolved in SELECT #1
Note 1276 Field or reference 'test.t1.a' of SELECT #3 was resolved in SELECT #1
Note 1249 Select 2 was reduced during optimization
+Note 1276 Field or reference 'test.t1.a' of SELECT #3 was resolved in SELECT #1
+Note 1276 Field or reference 'test.t1.a' of SELECT #3 was resolved in SELECT #1
Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = 1 and (1 or <expr_cache><`test`.`t1`.`a`>((/* select#3 */ select 3 from DUAL where `test`.`t1`.`a` = `test`.`t1`.`a`)) = 3)
PREPARE stmt FROM 'SELECT * FROM t1 WHERE a = 1 AND
(3 = 0 OR (SELECT a = 1 OR (SELECT 3 WHERE a = a) = 3))';

12 changes: 12 additions & 0 deletions mysql-test/main/select_pkeycache,ps.rdiff
@@ -0,0 +1,12 @@
--- mysql-test/main/select_pkeycache.result 2023-01-31 09:30:58.151377805 +0100
+++ mysql-test/main/select_pkeycache.reject 2023-02-01 13:43:21.742985365 +0100
@@ -5661,6 +5661,8 @@
Note 1276 Field or reference 'test.t1.a' of SELECT #3 was resolved in SELECT #1
Note 1276 Field or reference 'test.t1.a' of SELECT #3 was resolved in SELECT #1
Note 1249 Select 2 was reduced during optimization
+Note 1276 Field or reference 'test.t1.a' of SELECT #3 was resolved in SELECT #1
+Note 1276 Field or reference 'test.t1.a' of SELECT #3 was resolved in SELECT #1
Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = 1 and (1 or <expr_cache><`test`.`t1`.`a`>((/* select#3 */ select 3 from DUAL where `test`.`t1`.`a` = `test`.`t1`.`a`)) = 3)
PREPARE stmt FROM 'SELECT * FROM t1 WHERE a = 1 AND
(3 = 0 OR (SELECT a = 1 OR (SELECT 3 WHERE a = a) = 3))';

1 change: 1 addition & 0 deletions mysql-test/suite/galera/disabled.def
Expand Up @@ -26,3 +26,4 @@ galera_var_ignore_apply_errors : 28: "Server did not transition to READY state"
galera_bf_kill_debug : timeout after 900 seconds
galera_ssl_upgrade : [Warning] Failed to load slave replication state from table mysql.gtid_slave_pos: 130: Incorrect file format 'gtid_slave_pos'
galera_parallel_simple : timeout related to wsrep_sync_wait
galera_insert_bulk : MDEV-30536 no expected deadlock in galera_insert_bulk test
15 changes: 15 additions & 0 deletions mysql-test/suite/innodb/r/innodb_scrub.result
Expand Up @@ -10,3 +10,18 @@ FLUSH TABLE t1 FOR EXPORT;
UNLOCK TABLES;
NOT FOUND /unicycle|repairman/ in t1.ibd
DROP TABLE t1;
#
# MDEV-30527 Assertion !m_freed_pages in mtr_t::start()
# on DROP TEMPORARY TABLE
#
SET @scrub= @@GLOBAL.innodb_immediate_scrub_data_uncompressed;
SET GLOBAL innodb_immediate_scrub_data_uncompressed= 1;
SET @fpt=@@GLOBAL.innodb_file_per_table;
SET GLOBAL innodb_file_per_table=0;
CREATE TABLE t ENGINE=InnoDB AS SELECT 1;
DROP TABLE t;
SET GLOBAL innodb_file_per_table=@fpt;
CREATE TEMPORARY TABLE tmp ENGINE=InnoDB AS SELECT 1;
DROP TABLE tmp;
SET GLOBAL INNODB_IMMEDIATE_SCRUB_DATA_UNCOMPRESSED= @scrub;
# End of 10.6 tests
16 changes: 16 additions & 0 deletions mysql-test/suite/innodb/t/innodb_scrub.test
Expand Up @@ -27,3 +27,19 @@ FLUSH TABLE t1 FOR EXPORT;
UNLOCK TABLES;
-- source include/search_pattern_in_file.inc
DROP TABLE t1;

--echo #
--echo # MDEV-30527 Assertion !m_freed_pages in mtr_t::start()
--echo # on DROP TEMPORARY TABLE
--echo #
SET @scrub= @@GLOBAL.innodb_immediate_scrub_data_uncompressed;
SET GLOBAL innodb_immediate_scrub_data_uncompressed= 1;
SET @fpt=@@GLOBAL.innodb_file_per_table;
SET GLOBAL innodb_file_per_table=0;
CREATE TABLE t ENGINE=InnoDB AS SELECT 1;
DROP TABLE t;
SET GLOBAL innodb_file_per_table=@fpt;
CREATE TEMPORARY TABLE tmp ENGINE=InnoDB AS SELECT 1;
DROP TABLE tmp;
SET GLOBAL INNODB_IMMEDIATE_SCRUB_DATA_UNCOMPRESSED= @scrub;
--echo # End of 10.6 tests
1 change: 1 addition & 0 deletions storage/innobase/btr/btr0cur.cc
Expand Up @@ -1890,6 +1890,7 @@ dberr_t btr_cur_t::open_leaf(bool first, dict_index_t *index,
ut_ad(root_leaf_rw_latch != RW_NO_LATCH);
upper_rw_latch= root_leaf_rw_latch;
mtr->rollback_to_savepoint(savepoint);
height= ULINT_UNDEFINED;
continue;
}
else
Expand Down
13 changes: 13 additions & 0 deletions storage/innobase/mtr/mtr0mtr.cc
Expand Up @@ -459,7 +459,20 @@ void mtr_t::commit()
buf_flush_ahead(m_commit_lsn, lsns.second == PAGE_FLUSH_SYNC);
}
else
{
if (m_freed_pages)
{
ut_ad(!m_freed_pages->empty());
ut_ad(m_freed_space == fil_system.temp_space);
ut_ad(!m_trim_pages);
for (const auto &range : *m_freed_pages)
m_freed_space->add_free_range(range);
delete m_freed_pages;
m_freed_pages= nullptr;
m_freed_space= nullptr;
}
release();
}

func_exit:
release_resources();
Expand Down

0 comments on commit 260f1fe

Please sign in to comment.