diff options
author | Daniele Sciascia <daniele.sciascia@galeracluster.com> | 2022-02-01 14:26:24 +0100 |
---|---|---|
committer | Jan Lindström <jan.lindstrom@mariadb.com> | 2022-03-18 08:30:26 +0200 |
commit | c63eab2c68bd83c7b1f5fec9fc9bb0d7238b9b34 (patch) | |
tree | 142fdfbb69aabd350f1306baeba4ac0816268806 /sql/sql_parse.cc | |
parent | 39ed4005536dc1c76053c564a3a1404eebb199a5 (diff) | |
download | mariadb-git-c63eab2c68bd83c7b1f5fec9fc9bb0d7238b9b34.tar.gz |
MDEV-28055: Galera ps-protocol fixes
* Fix test galera.MW-44 to make it work with --ps-protocol
* Skip test galera.MW-328C under --ps-protocol This test
relies on wsrep_retry_autocommit, which has no effect
under ps-protocol.
* Return WSREP related errors on COM_STMT_PREPARE commands
Change wsrep_command_no_result() to allow sending back errors
when a statement is prepared. For example, to handle deadlock
error due to BF aborted transaction during prepare.
* Add sync waiting before statement prepare
When a statement is prepared, tables used in the statement may be
opened and checked for existence. Because of that, some tests (for
example galera_create_table_as_select) that CREATE a table in one node
and then SELECT from the same table in another node may result in errors
due to non existing table.
To make tests behave similarly under normal and PS protocol, we add a
call to sync wait before preparing statements that would sync wait
during normal execution.
Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r-- | sql/sql_parse.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index bd685add60e..35310d2655a 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -1167,8 +1167,7 @@ static bool wsrep_tables_accessible_when_detached(const TABLE_LIST *tables) static bool wsrep_command_no_result(char command) { - return (command == COM_STMT_PREPARE || - command == COM_STMT_FETCH || + return (command == COM_STMT_FETCH || command == COM_STMT_SEND_LONG_DATA || command == COM_STMT_CLOSE); } |