mariadb/mysql-test/suite
Jan Lindström e40277d29b MDEV-38218 : Galera test failure on galera_bf_abort_flush_for_export
Problem was in wsrep_handle_mdl_conflict function was comparing
thd->lex->sql_command variable for granted MDL-lock.

There is two possible schedules:

    (1) FLUSH TABLES ... FOR EXPORT that will take MDL-lock (granted_thd).
        INSERT from other node is conflicting operation (request_thd)
        and sees MDL-conflict. Because granted_thd has not executed anything
        else thd->lex->sql_command == SQLCOM_FLUSH and this case was
        correctly handled in wsrep_handle_mdl_conflict i.e. INSERT needs
        to wait.

    (2) FLUSH TABLES ... FOR EXPORT that will take MDL-lock (granted_thd).
        SET SESSION wsrep_sync_wait=0; (granted_thd)
        INSERT from other node is conflicting operation (request_thd)

        However, thd->lex->sql_command is not stored to taken MDL-lock. Now
        as granted_thd is executing SET thd->lex->sql_command != SQLCOM_FLUSH
        and INSERT that is BF will abort it and that means also FTFE is
        killed and MDL-lock relesed. This is incorrect as FTFE has written
        file on filesystem and it can't be really killed.

In this fix wsrep_handle_mdl_conflict is refactored not to use
thd->lex->sql_command as a variable used for decisions. Instead
connection state can be determined also via THD members. E.g.:

    * wsrep_thd_is_toi() || wsrep_thd_is_applying - ongoing TOI or applier
    * wsrep_thd_is_BF - thread is brute force
    * wsrep_thd_is_SR - thread is streaming replication thread
    * thd->current_backup_stage != BACKUP_FINISHED - there's ongoing BACKUP
    * thd->global_read_lock.is_acquired() - ongoing FTWRL
    * thd->locked_tables_mode == LTM_LOCK_TABLES - ongoing FTFE or LOCK TABLES
2026-01-20 10:23:44 +02:00
..
archive Merge branch '10.6' into '10.11' 2025-04-16 03:34:40 +02:00
atomic Merge branch '10.6' into 10.11 2025-04-26 10:47:03 +02:00
binlog MDEV-26618 OPTIMIZE table not replicating 2026-01-14 19:44:30 +01:00
binlog_encryption cleanup: select ... into tests 2025-07-17 09:18:18 +02:00
client
compat MDEV-38451 SHOW FUNCTION CODE package_func crashes on the second execution 2026-01-13 15:37:08 +04:00
csv
encryption MDEV-37299 fixup: cmake -DPLUGIN_PERFSCHEMA=NO 2025-09-30 16:42:58 +03:00
engines MDEV-37375 engines/iuds suite fails with ps-protocol 2025-09-15 11:00:02 +02:00
federated MDEV-29874: FederatedX error 10000 on multi-table UPDATE/DELETE 2025-10-22 15:35:54 +07:00
funcs_1 MDEV-38006 Inconsistent behaviors when casting into time 2026-01-14 19:44:54 +01:00
funcs_2 Merge 10.5 into 10.6 2025-03-26 17:09:57 +02:00
galera MDEV-38218 : Galera test failure on galera_bf_abort_flush_for_export 2026-01-20 10:23:44 +02:00
galera_3nodes MDEV-37816: galera tests failing with Table performance_schema.xxx doesn't exist 2025-10-09 16:01:09 +11:00
galera_3nodes_sr galera mtr tests: synchronization between branches and editions 2025-04-02 04:50:11 +02:00
galera_sr MDEV-34124: Make sequences work with streaming replication 2025-11-25 13:01:26 +02:00
gcol MDEV-38006 Inconsistent behaviors when casting into time 2026-01-14 19:44:54 +01:00
handler Merge branch '10.5' into 10.6 2024-12-17 11:06:09 +11:00
heap Merge branch '10.6' into 10.11 2025-01-30 11:55:13 +01:00
innodb fix the test to not leave $datadir/test/imp_t1.ibd around 2026-01-14 19:44:30 +01:00
innodb_fts Merge 10.6 into 10.11 2025-11-11 10:29:45 +02:00
innodb_gis Merge 10.6 into 10.11 2026-01-02 11:06:05 +02:00
innodb_i_s
innodb_zip MDEV-37138: Innochecksum fails to handle doublewrite buffer and 2025-11-11 13:43:43 +05:30
jp
json MDEV-34081: View containing JSON_TABLE does not return JSON 2025-10-22 22:49:26 +05:30
large_tests
maria MDEV-38087 Unexpected error Unknown column '???' in 'GROUP BY' 2026-01-14 19:44:30 +01:00
mariabackup Merge 10.6 into 10.11 2025-11-28 12:44:34 +02:00
mtr/t Remove dates from all rdiff files 2025-01-05 16:40:11 +02:00
mtr2
multi_source MDEV-7611: create multi_source.mariadb-dump_slave 2025-07-10 18:31:36 -06:00
optimizer_unfixed_bugs
parts MDEV-37328 Assertion failure in make_empty_rec upon CONVERT PARTITION 2025-07-28 18:06:11 +02:00
perfschema MDEV-38531 - perfschema.statement_digest_consumers2 fails sporadically 2026-01-13 03:28:00 +04:00
perfschema_stress
period Merge branch '10.6' into 10.11 2025-09-12 13:08:40 +02:00
plugins Merge 10.6 into 10.11 2026-01-02 11:06:05 +02:00
roles Merge branch '10.6' into 10.11 2025-01-30 11:55:13 +01:00
rpl MDEV-20586: Incorrect commit of transaction in GTID table processing 2026-01-15 16:19:34 -07:00
s3 Merge branch '10.6' into 10.11 2025-06-04 14:09:23 +02:00
sql_sequence MDEV-37345 temporary table, ALTER, recreate sequence 2025-10-28 17:49:51 +01:00
storage_engine
stress MDEV-34453 Trying to read 16384 bytes at 70368744161280 outside the bounds of the file: ./ibdata1 2024-09-20 20:26:43 +05:30
sys_vars Merge 10.6 into 10.11 2025-10-23 10:38:55 +03:00
sysschema MDEV-37979 sys.ps_setup_save does not restore SQL_LOG_BIN after error, causes replication discrepancy 2026-01-14 19:44:30 +01:00
unit Merge 10.2 into 10.3 2021-10-21 17:39:34 +03:00
vcol Improvements for myisamchk 2025-09-04 18:08:39 +03:00
versioning MDEV-38006 Inconsistent behaviors when casting into time 2026-01-14 19:44:54 +01:00
wsrep Galera library 26.4.25 contains gcs protocol change 5-->6 2025-11-27 11:40:21 +02:00