Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This reverts commit 21b2fad and commit 81d71ee. The MDEV-18464 change introduces a few data race issues. Contrary to the documentation, the field trx_t::victim is not always being protected by lock_sys_t::mutex and trx_t::mutex. Most importantly, it seems that KILL QUERY could wrongly avoid acquiring both mutexes when invoking lock_trx_handle_wait_low(), in case another thread had already set trx->victim=true. We also revert MDEV-12009, because it should depend on the MDEV-18464 fix being present.
- Loading branch information
Showing
22 changed files
with
178 additions
and
194 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,4 @@ | ||
CREATE USER foo@localhost; | ||
GRANT SELECT on test.* TO foo@localhost; | ||
# Open connection to the 1st node using 'test_user1' user. | ||
Got one of the listed errors | ||
Got one of the listed errors | ||
Got one of the listed errors | ||
Got one of the listed errors | ||
DROP USER foo@localhost; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,74 +1,26 @@ | ||
# | ||
# This test checks that applier threads are immune to KILL QUERY and KILL STATEMENT | ||
# when USER is not SUPER | ||
# | ||
|
||
--source include/galera_cluster.inc | ||
--source include/have_innodb.inc | ||
|
||
--connection node_1 | ||
|
||
CREATE USER foo@localhost; | ||
GRANT SELECT on test.* TO foo@localhost; | ||
|
||
--let $applier_thread = `SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE != 'wsrep aborter idle' OR STATE IS NULL LIMIT 1` | ||
|
||
--let $aborter_thread = `SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE = 'wsrep aborter idle' LIMIT 1` | ||
|
||
--echo # Open connection to the 1st node using 'test_user1' user. | ||
--let $port_1= \$NODE_MYPORT_1 | ||
--connect(foo_node_1,localhost,foo,,test,$port_1,) | ||
|
||
--connection foo_node_1 | ||
|
||
--disable_query_log | ||
--error ER_KILL_DENIED_ERROR,ER_KILL_DENIED_ERROR | ||
--eval KILL $applier_thread | ||
|
||
--error ER_KILL_DENIED_ERROR,ER_KILL_DENIED_ERROR | ||
--eval KILL QUERY $applier_thread | ||
|
||
--error ER_KILL_DENIED_ERROR,ER_KILL_DENIED_ERROR | ||
--eval KILL $aborter_thread | ||
|
||
--error ER_KILL_DENIED_ERROR,ER_KILL_DENIED_ERROR | ||
--eval KILL QUERY $aborter_thread | ||
--enable_query_log | ||
|
||
# | ||
# SUPER can kill applier threads | ||
# | ||
--connection node_2 | ||
|
||
--let $applier_thread = `SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE != 'wsrep aborter idle' OR STATE IS NULL LIMIT 1` | ||
|
||
--disable_query_log | ||
--eval KILL $applier_thread | ||
--enable_query_log | ||
|
||
--let $aborter_thread = `SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE = 'wsrep aborter idle' LIMIT 1` | ||
|
||
--disable_query_log | ||
--error ER_KILL_DENIED_ERROR,ER_KILL_DENIED_ERROR | ||
--eval KILL $aborter_thread | ||
--enable_query_log | ||
|
||
--source include/restart_mysqld.inc | ||
|
||
--connection node_2 | ||
--let $applier_thread = `SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE != 'wsrep aborter idle' OR STATE IS NULL LIMIT 1` | ||
|
||
--disable_query_log | ||
--eval KILL QUERY $applier_thread | ||
--enable_query_log | ||
|
||
--let $aborter_thread = `SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE = 'wsrep aborter idle' LIMIT 1` | ||
|
||
--disable_query_log | ||
--error ER_KILL_DENIED_ERROR,ER_KILL_DENIED_ERROR | ||
--eval KILL QUERY $aborter_thread | ||
--enable_query_log | ||
|
||
--source include/restart_mysqld.inc | ||
|
||
--connection node_1 | ||
--disconnect foo_node_1 | ||
DROP USER foo@localhost; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.