mariadb/mysql-test/suite/galera_3nodes/r/galera_toi_vote.result
Alexey Yurchenko 731a5aba0b Use only MySQL code for TOI error vote
For TOI events specifically we have a situation where in case of the
same error different nodes may generate different messages. This may
be for two reasons:
 - different locale setting between the current client session and
   server default (we can reasonably require server locales to be
   identical on all nodes, but user can change message locale for the
   session)
 - non-deterministic course of STATEMENT execution e.g. for ALTER TABLE

On the other hand we may reasonably expect TOI event failures since
they are executed after replication, so we must ensure that voting is
consistent. For that purpose error codes should be sufficiently unique
and deterministic for TOI event failures as DDLs normally deal with
a single object, so we can merely use MySQL error codes to vote on.

Notice that this problem does not happen with regular transactional
writesets, since the originator node will always vote success and
replica nodes are assumed to have the same global locale setting.
As such different error messages indicate different errors even if
the error code is the same (e.g. ER_DUP_KEY can happen on different
rows tables).

Use only MySQL error code (without the error message) for error voting
in case of TOI event failure.

Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
2024-09-01 02:58:27 +02:00

23 lines
659 B
Text

connection node_2;
connection node_1;
connection node_1;
connection node_2;
connection node_3;
connection node_3;
SET SESSION wsrep_on=OFF;
DROP SCHEMA test;
connection node_1;
SET SESSION lc_messages='fr_FR';
CREATE SCHEMA test;
ERROR HY000: Ne peut créer la base 'test'; elle existe déjà
connection node_1;
SET SESSION wsrep_sync_wait=0;
connection node_2;
SET SESSION wsrep_sync_wait=0;
connection node_3;
SET SESSION wsrep_sync_wait=0;
disconnect node_3;
connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
Killing server ...
# restart
CALL mtr.add_suppression("WSREP: Vote 0 \\(success\\) on (.*) is inconsistent with group\\. Leaving cluster\\.");