Commit 448c2077 authored by Marko Mäkelä's avatar Marko Mäkelä

Merge 10.5 into 10.6

parents a6bf4b58 be5fd3ec
......@@ -15,3 +15,30 @@ xa prepare 'xid2';
release savepoint `sv1`;
xa commit 'xid2';
drop table t1;
#
# MDEV-31928 Assertion xid ... < 128 failed in trx_undo_write_xid()
#
CREATE TABLE t (a INT PRIMARY KEY) ENGINE=INNODB;
XA START 'gtrid_67890123456789012345678901234567890123456789012345678901234','bqual_6789012345678901234567890123456789012345678901234567890123',1234567890;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '1234567890' at line 1
XA START 'gtrid_6789012345678901234567890123456789012345678901234567890123','bqual_67890123456789012345678901234567890123456789012345678901234',1234567890;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '1234567890' at line 1
XA START 'gtrid_6789012345678901234567890123456789012345678901234567890123','bqual_6789012345678901234567890123456789012345678901234567890123',1234567890;
INSERT INTO t VALUES(1);
XA END 'gtrid_67890123456789012345678901234567890123456789012345678901234','bqual_6789012345678901234567890123456789012345678901234567890123',1234567890;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '1234567890' at line 1
XA END 'gtrid_6789012345678901234567890123456789012345678901234567890123','bqual_67890123456789012345678901234567890123456789012345678901234',1234567890;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '1234567890' at line 1
XA END 'gtrid_6789012345678901234567890123456789012345678901234567890123','bqual_6789012345678901234567890123456789012345678901234567890123',1234567890;
XA PREPARE 'gtrid_67890123456789012345678901234567890123456789012345678901234','bqual_6789012345678901234567890123456789012345678901234567890123',1234567890;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '1234567890' at line 1
XA PREPARE 'gtrid_6789012345678901234567890123456789012345678901234567890123','bqual_67890123456789012345678901234567890123456789012345678901234',1234567890;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '1234567890' at line 1
XA PREPARE 'gtrid_6789012345678901234567890123456789012345678901234567890123','bqual_6789012345678901234567890123456789012345678901234567890123',1234567890;
XA COMMIT 'gtrid_67890123456789012345678901234567890123456789012345678901234','bqual_6789012345678901234567890123456789012345678901234567890123',1234567890;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '1234567890' at line 1
XA COMMIT 'gtrid_6789012345678901234567890123456789012345678901234567890123','bqual_67890123456789012345678901234567890123456789012345678901234',1234567890;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '1234567890' at line 1
XA COMMIT 'gtrid_6789012345678901234567890123456789012345678901234567890123','bqual_6789012345678901234567890123456789012345678901234567890123',1234567890;
DROP TABLE t;
# End of 10.4 tests
--source include/have_innodb.inc
--disable_abort_on_error
--error ER_XAER_NOTA
xa rollback 'xid2';
drop table if exists t1;
create table t1(a int)engine=innodb;
......@@ -9,9 +9,42 @@ xa start 'xid2';
insert into `t1` values (1);
savepoint `sv1`;
xa end 'xid2';
--error ER_XAER_RMFAIL
start transaction;
xa prepare 'xid2';
release savepoint `sv1`;
xa commit 'xid2';
drop table t1;
-- echo #
-- echo # MDEV-31928 Assertion xid ... < 128 failed in trx_undo_write_xid()
-- echo #
CREATE TABLE t (a INT PRIMARY KEY) ENGINE=INNODB;
--error ER_PARSE_ERROR
XA START 'gtrid_67890123456789012345678901234567890123456789012345678901234','bqual_6789012345678901234567890123456789012345678901234567890123',1234567890;
--error ER_PARSE_ERROR
XA START 'gtrid_6789012345678901234567890123456789012345678901234567890123','bqual_67890123456789012345678901234567890123456789012345678901234',1234567890;
XA START 'gtrid_6789012345678901234567890123456789012345678901234567890123','bqual_6789012345678901234567890123456789012345678901234567890123',1234567890;
INSERT INTO t VALUES(1);
--error ER_PARSE_ERROR
XA END 'gtrid_67890123456789012345678901234567890123456789012345678901234','bqual_6789012345678901234567890123456789012345678901234567890123',1234567890;
--error ER_PARSE_ERROR
XA END 'gtrid_6789012345678901234567890123456789012345678901234567890123','bqual_67890123456789012345678901234567890123456789012345678901234',1234567890;
XA END 'gtrid_6789012345678901234567890123456789012345678901234567890123','bqual_6789012345678901234567890123456789012345678901234567890123',1234567890;
--error ER_PARSE_ERROR
XA PREPARE 'gtrid_67890123456789012345678901234567890123456789012345678901234','bqual_6789012345678901234567890123456789012345678901234567890123',1234567890;
--error ER_PARSE_ERROR
XA PREPARE 'gtrid_6789012345678901234567890123456789012345678901234567890123','bqual_67890123456789012345678901234567890123456789012345678901234',1234567890;
XA PREPARE 'gtrid_6789012345678901234567890123456789012345678901234567890123','bqual_6789012345678901234567890123456789012345678901234567890123',1234567890;
--error ER_PARSE_ERROR
XA COMMIT 'gtrid_67890123456789012345678901234567890123456789012345678901234','bqual_6789012345678901234567890123456789012345678901234567890123',1234567890;
--error ER_PARSE_ERROR
XA COMMIT 'gtrid_6789012345678901234567890123456789012345678901234567890123','bqual_67890123456789012345678901234567890123456789012345678901234',1234567890;
XA COMMIT 'gtrid_6789012345678901234567890123456789012345678901234567890123','bqual_6789012345678901234567890123456789012345678901234567890123',1234567890;
DROP TABLE t;
-- echo # End of 10.4 tests
......@@ -2369,21 +2369,6 @@ rpl_parallel_entry::choose_thread(rpl_group_info *rgi, bool *did_enter_cond,
/* The thread is ready to queue into. */
break;
}
else if (unlikely(rli->sql_driver_thd->check_killed(1)))
{
unlock_or_exit_cond(rli->sql_driver_thd, &thr->LOCK_rpl_thread,
did_enter_cond, old_stage);
my_error(ER_CONNECTION_KILLED, MYF(0));
#ifdef ENABLED_DEBUG_SYNC
DBUG_EXECUTE_IF("rpl_parallel_wait_queue_max",
{
debug_sync_set_action(rli->sql_driver_thd,
STRING_WITH_LEN("now SIGNAL wait_queue_killed"));
};);
#endif
slave_output_error_info(rgi, rli->sql_driver_thd);
return NULL;
}
else
{
/*
......@@ -2411,6 +2396,23 @@ rpl_parallel_entry::choose_thread(rpl_group_info *rgi, bool *did_enter_cond,
old_stage);
*did_enter_cond= true;
}
if (unlikely(rli->sql_driver_thd->check_killed(1)))
{
unlock_or_exit_cond(rli->sql_driver_thd, &thr->LOCK_rpl_thread,
did_enter_cond, old_stage);
my_error(ER_CONNECTION_KILLED, MYF(0));
#ifdef ENABLED_DEBUG_SYNC
DBUG_EXECUTE_IF("rpl_parallel_wait_queue_max",
{
debug_sync_set_action(rli->sql_driver_thd,
STRING_WITH_LEN("now SIGNAL wait_queue_killed"));
};);
#endif
slave_output_error_info(rgi, rli->sql_driver_thd);
return NULL;
}
mysql_cond_wait(&thr->COND_rpl_thread_queue, &thr->LOCK_rpl_thread);
}
}
......
......@@ -1184,25 +1184,6 @@ static bool buf_LRU_block_remove_hashed(buf_page_t *bpage, const page_id_t id,
return true;
}
/* Question: If we release hash_lock here
then what protects us against:
1) Some other thread buffer fixing this page
2) Some other thread trying to read this page and
not finding it in buffer pool attempting to read it
from the disk.
Answer:
1) Cannot happen because the page is no longer in the
page_hash. Only possibility is when while invalidating
a tablespace we buffer fix the prev_page in LRU to
avoid relocation during the scan. But that is not
possible because we are holding buf_pool mutex.
2) Not possible because in buf_page_init_for_read()
we do a look up of page_hash while holding buf_pool
mutex and since we are holding buf_pool mutex here
and by the time we'll release it in the caller we'd
have inserted the compressed only descriptor in the
page_hash. */
hash_lock.unlock();
if (bpage->zip.data) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment