mariadb/mysql-test/suite/galera/t/MDEV-37991.test
Jan Lindström cedb0ed79d MDEV-37991 : Galera cluster crashes when granting permission to non existing user after setting max_error_count and wsrep_ignore_apply_errors to zero
There was two problems. Firsty, implementation assumed that
thd->wsrep_rgi is not nullptr, this is not true for TOI.
Secondly, Sql_condition_iterator was also assumed to be
not nullptr, this might not be also true.

Fixed by adding nullptr guard for thd->wsrep_rgi and
if Sql_condition_iterator is nullptr obtain error
information directly from Diagnostics_area if there
is some error there.
2025-11-04 16:22:45 +02:00

30 lines
1 KiB
Text

--source include/galera_cluster.inc
# Save original auto_increment_offset values.
--let $node_1=node_1
--let $node_2=node_2
--source include/auto_increment_offset_save.inc
--connection node_2
SET SESSION max_error_count=0;
SET GLOBAL wsrep_ignore_apply_errors = 0;
--error ER_PASSWORD_NO_MATCH
GRANT SELECT ON *.* TO dummy@'localhost';
SHOW WARNINGS;
--echo # Node_2 is on inconsistency state so kill it
SET SESSION wsrep_sync_wait = 0;
--source include/kill_galera.inc
--let $start_mysqld_params =
--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
--source include/start_mysqld.inc
--source include/wait_until_ready.inc
--connection node_1
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
--source include/wait_condition.inc
--connection node_2
SET GLOBAL wsrep_ignore_apply_errors = DEFAULT;
call mtr.add_suppression("Inconsistency detected: Inconsistent by consensus on");
--source include/auto_increment_offset_restore.inc