summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2023-02-01 18:28:03 +0100
committerOleksandr Byelkin <sanja@mariadb.com>2023-02-01 18:28:03 +0100
commitcafba8761af55ae16cc69c9b53a341340a845b36 (patch)
tree5b20d1ab2a493598a2472eae440c42cfb45c20b0
parentc7c415734d27fb98f8019d4c3b646bbdb4906e46 (diff)
parentcc8b9bcee3ce88bc52147948f96765cd5009b88a (diff)
downloadmariadb-git-cafba8761af55ae16cc69c9b53a341340a845b36.tar.gz
Merge branch '10.10' into 10.11mariadb-10.11.2
-rw-r--r--mysql-test/main/select,ps.rdiff12
-rw-r--r--mysql-test/main/select.test3
-rw-r--r--mysql-test/main/select_jcl6,ps.rdiff12
-rw-r--r--mysql-test/main/select_pkeycache,ps.rdiff12
-rw-r--r--mysql-test/suite/galera/disabled.def1
-rw-r--r--mysql-test/suite/galera/t/galera_bf_kill_debug.test2
-rw-r--r--mysql-test/suite/galera/t/galera_var_reject_queries.test2
-rw-r--r--mysql-test/suite/innodb/r/innodb_scrub.result15
-rw-r--r--mysql-test/suite/innodb/r/purge_thread_shutdown.result2
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug51920.test2
-rw-r--r--mysql-test/suite/innodb/t/innodb_scrub.test16
-rw-r--r--mysql-test/suite/innodb/t/purge_thread_shutdown.test2
-rw-r--r--mysql-test/suite/innodb/t/temporary_table.test2
-rw-r--r--mysql-test/suite/sys_vars/t/completion_type_func.test4
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_fatal_semaphore_wait_threshold.test2
-rw-r--r--storage/innobase/btr/btr0cur.cc1
-rw-r--r--storage/innobase/mtr/mtr0mtr.cc13
17 files changed, 94 insertions, 9 deletions
diff --git a/mysql-test/main/select,ps.rdiff b/mysql-test/main/select,ps.rdiff
new file mode 100644
index 00000000000..7cbcd2be98e
--- /dev/null
+++ b/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))';
+
diff --git a/mysql-test/main/select.test b/mysql-test/main/select.test
index 5c18c6547e7..332b5a36aea 100644
--- a/mysql-test/main/select.test
+++ b/mysql-test/main/select.test
@@ -3,6 +3,7 @@
#
--source include/no_valgrind_without_big.inc
+--source include/protocol.inc
#
# Simple select test
@@ -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))';
diff --git a/mysql-test/main/select_jcl6,ps.rdiff b/mysql-test/main/select_jcl6,ps.rdiff
new file mode 100644
index 00000000000..18652a0683b
--- /dev/null
+++ b/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))';
+
diff --git a/mysql-test/main/select_pkeycache,ps.rdiff b/mysql-test/main/select_pkeycache,ps.rdiff
new file mode 100644
index 00000000000..320a402fefc
--- /dev/null
+++ b/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))';
+
diff --git a/mysql-test/suite/galera/disabled.def b/mysql-test/suite/galera/disabled.def
index 849dffc7018..bcf6078f624 100644
--- a/mysql-test/suite/galera/disabled.def
+++ b/mysql-test/suite/galera/disabled.def
@@ -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
diff --git a/mysql-test/suite/galera/t/galera_bf_kill_debug.test b/mysql-test/suite/galera/t/galera_bf_kill_debug.test
index c322f283757..6706734cc36 100644
--- a/mysql-test/suite/galera/t/galera_bf_kill_debug.test
+++ b/mysql-test/suite/galera/t/galera_bf_kill_debug.test
@@ -84,7 +84,7 @@ SET DEBUG_SYNC = "now SIGNAL continue_kill";
--reap
--connection node_2a
---error 0,1213,2013
+--error 0,1213,2013,2026
select * from t1;
--connection node_2
diff --git a/mysql-test/suite/galera/t/galera_var_reject_queries.test b/mysql-test/suite/galera/t/galera_var_reject_queries.test
index eefa154a2d9..fb86b69d95a 100644
--- a/mysql-test/suite/galera/t/galera_var_reject_queries.test
+++ b/mysql-test/suite/galera/t/galera_var_reject_queries.test
@@ -30,7 +30,7 @@ SELECT * FROM t1;
SET GLOBAL wsrep_reject_queries = ALL_KILL;
--connection node_1a
---error ER_CONNECTION_KILLED,2013,2006
+--error ER_CONNECTION_KILLED,2013,2006,2026
SELECT * FROM t1;
--connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1
diff --git a/mysql-test/suite/innodb/r/innodb_scrub.result b/mysql-test/suite/innodb/r/innodb_scrub.result
index 1a4db0b541e..b4a418ce2ad 100644
--- a/mysql-test/suite/innodb/r/innodb_scrub.result
+++ b/mysql-test/suite/innodb/r/innodb_scrub.result
@@ -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
diff --git a/mysql-test/suite/innodb/r/purge_thread_shutdown.result b/mysql-test/suite/innodb/r/purge_thread_shutdown.result
index 85ac77e6d49..747fe91c966 100644
--- a/mysql-test/suite/innodb/r/purge_thread_shutdown.result
+++ b/mysql-test/suite/innodb/r/purge_thread_shutdown.result
@@ -22,6 +22,6 @@ delete from t1 where a=3;
set global innodb_fast_shutdown=0;
ERROR 42000: Variable 'innodb_fast_shutdown' can't be set to the value of '0'
kill ID;
-ERROR 70100: Connection was killed
+Got one of the listed errors
# restart
drop table t1;
diff --git a/mysql-test/suite/innodb/t/innodb_bug51920.test b/mysql-test/suite/innodb/t/innodb_bug51920.test
index 0a9839b612a..84977925548 100644
--- a/mysql-test/suite/innodb/t/innodb_bug51920.test
+++ b/mysql-test/suite/innodb/t/innodb_bug51920.test
@@ -38,7 +38,7 @@ let $wait_condition =
# depending on platform.
#
connection con1;
--- error 1317, 2006, 2013, ER_CONNECTION_KILLED
+-- error 1317, 2006, 2013, ER_CONNECTION_KILLED, 2026
reap;
connection default;
DROP TABLE bug51920;
diff --git a/mysql-test/suite/innodb/t/innodb_scrub.test b/mysql-test/suite/innodb/t/innodb_scrub.test
index c7d06187e9f..8fe460da4d3 100644
--- a/mysql-test/suite/innodb/t/innodb_scrub.test
+++ b/mysql-test/suite/innodb/t/innodb_scrub.test
@@ -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
diff --git a/mysql-test/suite/innodb/t/purge_thread_shutdown.test b/mysql-test/suite/innodb/t/purge_thread_shutdown.test
index 5be29b7a6a3..447f1fd3804 100644
--- a/mysql-test/suite/innodb/t/purge_thread_shutdown.test
+++ b/mysql-test/suite/innodb/t/purge_thread_shutdown.test
@@ -36,7 +36,7 @@ set global innodb_fast_shutdown=0;
# the error code
let $me=`select concat(' ', connection_id())`;
replace_result $me ID;
-error ER_CONNECTION_KILLED;
+error ER_CONNECTION_KILLED, 2026;
eval kill $me;
source include/start_mysqld.inc;
diff --git a/mysql-test/suite/innodb/t/temporary_table.test b/mysql-test/suite/innodb/t/temporary_table.test
index 5d7e5d51696..6b2cd6b9b2c 100644
--- a/mysql-test/suite/innodb/t/temporary_table.test
+++ b/mysql-test/suite/innodb/t/temporary_table.test
@@ -143,7 +143,7 @@ let $counter= 5000;
let $mysql_errno= 9999;
while ($mysql_errno)
{
- --error 0,ER_SERVER_SHUTDOWN,ER_CONNECTION_KILLED,2002,2006,2013
+ --error 0,ER_SERVER_SHUTDOWN,ER_CONNECTION_KILLED,2002,2006,2013,2026
select 1;
dec $counter;
diff --git a/mysql-test/suite/sys_vars/t/completion_type_func.test b/mysql-test/suite/sys_vars/t/completion_type_func.test
index 5c343cee9ab..1de4ae88cfb 100644
--- a/mysql-test/suite/sys_vars/t/completion_type_func.test
+++ b/mysql-test/suite/sys_vars/t/completion_type_func.test
@@ -146,7 +146,7 @@ COMMIT;
--echo ## Inserting rows should give error here because connection should ##
--echo ## disconnect after using COMMIT ##
---Error 2006,2013,ER_QUERY_INTERRUPTED,ER_CONNECTION_KILLED,5014
+--Error 2006,2013,ER_QUERY_INTERRUPTED,ER_CONNECTION_KILLED,5014,2026
INSERT INTO t1 VALUES(4,'Record_4');
connection test_con2;
@@ -160,7 +160,7 @@ INSERT INTO t1 VALUES(12,'Record_12');
ROLLBACK;
--echo ## Expect a failure due to COMMIT/ROLLBACK AND RELEASE behavior ##
---Error 2006,2013,ER_QUERY_INTERRUPTED,ER_CONNECTION_KILLED,5014
+--Error 2006,2013,ER_QUERY_INTERRUPTED,ER_CONNECTION_KILLED,5014,2026
INSERT INTO t1 VALUES(4,'Record_4');
connection default;
diff --git a/mysql-test/suite/sys_vars/t/innodb_fatal_semaphore_wait_threshold.test b/mysql-test/suite/sys_vars/t/innodb_fatal_semaphore_wait_threshold.test
index b1b2f9fdda9..cce150aec02 100644
--- a/mysql-test/suite/sys_vars/t/innodb_fatal_semaphore_wait_threshold.test
+++ b/mysql-test/suite/sys_vars/t/innodb_fatal_semaphore_wait_threshold.test
@@ -43,7 +43,7 @@ let $counter= 80;
let $mysql_errno= 0;
while (!$mysql_errno)
{
- --error 0,ER_SERVER_SHUTDOWN,ER_CONNECTION_KILLED,2002,2006,2013,5014
+ --error 0,ER_SERVER_SHUTDOWN,ER_CONNECTION_KILLED,2002,2006,2013,5014,2026
show status;
dec $counter;
diff --git a/storage/innobase/btr/btr0cur.cc b/storage/innobase/btr/btr0cur.cc
index 67b8a68930a..ec1b72244b4 100644
--- a/storage/innobase/btr/btr0cur.cc
+++ b/storage/innobase/btr/btr0cur.cc
@@ -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
diff --git a/storage/innobase/mtr/mtr0mtr.cc b/storage/innobase/mtr/mtr0mtr.cc
index 91d11b8b478..0668e65a398 100644
--- a/storage/innobase/mtr/mtr0mtr.cc
+++ b/storage/innobase/mtr/mtr0mtr.cc
@@ -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();