1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00
Commit Graph

2237 Commits

Author SHA1 Message Date
Julius Goryavsky
eb1811c2ce galera: disable problematic test (galera_vote_rejoin_dml) 2025-02-12 12:25:07 +01:00
Julius Goryavsky
1456d9ea0a galera: disable problematic test (MW-329) 2025-02-12 12:23:20 +01:00
Julius Goryavsky
a382b695d2 galera: disable problematic test (galera_vote_rejoin_ddl) 2025-02-12 11:30:15 +01:00
Julius Goryavsky
a7e59c8a54 galera mtr tests: remove unused .result file 2025-02-12 11:30:15 +01:00
Julius Goryavsky
c9a6adba1e galera mtr tests: synchronization of tests between branches 2025-02-12 11:30:14 +01:00
Jan Lindström
c43d0a015f MDEV-35951 : Complete freeze during MW-329 test
Rewrite test not to use infinite procedure, it is not
necessary to test.

Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
2025-02-12 10:52:21 +01:00
Julius Goryavsky
44e1f7238a MDEV-35941 addendum: additional corrections for mtr tests 2025-02-12 01:29:09 +01:00
Jan Lindström
3009b5439d MDEV-35941 : galera_bf_abort_lock_table fails with wait for metadata lock
Problem was missing case from wsrep_handle_mdl_conflict. Test case
was trying to confirm that LOCK TABLE thread is not BF-aborted.
However as case was missing it was BF-aborted. Test case passed
because BF-aborting takes time and used wait condition might
see expected thread status before it was BF-aborted. Test naturally
failed if BF-aborting was done early enough.

Fix is to add missing case for SQLCOM_LOCK_TABLES to
wsrep_handle_mdl_conflict.

Note that using LOCK TABLE is still not recomended on cluster
because it could cause cluster hang.

Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
2025-02-12 01:23:41 +01:00
Marko Mäkelä
565a0cebd8 Merge 10.6 into 10.11 2025-02-10 14:45:18 +02:00
Julius Goryavsky
d6f31ed263 Merge branch '10.5' into '10.6' 2025-02-03 10:44:13 +01:00
Jan Lindström
1f93aece3d MDEV-24485 : galera.galera_bf_kill_debug MTR failed: A long semaphore wait
Test sends a signal to debug_sync and in next command resets
debug_sync signals. There is small possibility that sended
signal is not yet handled in receiving thread and reset
will destroy it causing sync wait timeout.

Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
2025-02-03 10:39:50 +01:00
Daniele Sciascia
10fd2c207a MDEV-35946 Assertion `thd->is_error()' failed in Sql_cmd_dml::prepare
Fix a regression that caused assertion thd->is_error() after
sync wait failures. If wsrep_sync_wait() fails make sure a appropriate
error is set. Partially revert 75dd0246f8.

Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
2025-02-03 10:03:50 +01:00
Jan Lindström
81e5077185 MDEV-34738 : Upgrade 10.11 -> 11.4 fails when wsrep_provider_options socket.ssl_cipher is set
Problem was in Galera library where wsrep_provider socket.ssl_cipher
parameter was defined as type_bool when it should have been string
type.

Therefore, this test requires Galera library version 26.4.21 where
fix is. Here we just verify that we can upgrade ssl parameters
so that socket.cipher = AES256-SHA and we use OpenSSL.

Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
2025-02-03 01:39:35 +01:00
Jan Lindström
a1d2dfa656 MDEV-35941 : galera_bf_abort_lock_table fails with wait for metadata lock
Test fixes only.

Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
2025-02-03 01:13:39 +01:00
Julius Goryavsky
72f21560d5 Merge branch '10.6' into '10.11' 2025-02-02 23:17:20 +01:00
Jan Lindström
9389428380 MDEV-27861: Creating partitioned tables should not be allowed with wsrep_osu_method=TOI and wsrep_strict_ddl=ON
Problem was incorrect handling of partitioned tables,
because db_type == DB_TYPE_PARTITION_DB
wsrep_should_replicate_ddl incorrectly marked
DDL as not replicatable. However, in partitioned
tables we should check implementing storage engine
from table->file->partition_ht() if available because
if partition handler is InnoDB all DDL should be allowed
even with wsrep_strict_ddl. For other storage engines
DDL should not be allowed and error should be issued.

This is 10.6 version of the fix.

Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
2025-02-02 14:20:06 +01:00
Jan Lindström
0784dd32b1 MDEV-29775 : Assertion `0' failed in void Protocol::end_statement() when adding data to the MyISAM table after setting wsrep_mode=replicate_myisam
If wsrep_mode=BINLOG_ROW_FORMAT_ONLY wsrep_forced_binlog_format
can be DEFAULT (UNSPECIFIED) or ROW.

Finally, if wsrep_mode=[REPLICATE_MYISAM|REPLICATE_ARIA] or
wsrep_replicate_myisam=ON we allow wsrep_forced_binlog_format
to be [DEFAULT|ROW].

Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
2025-02-02 13:57:03 +01:00
Julius Goryavsky
53c693ec2f Merge branch '10.5' into '10.6' 2025-02-02 12:55:16 +01:00
Jan Lindström
22414d2ed0 MDEV-27861: Creating partitioned tables should not be allowed with wsrep_osu_method=TOI and wsrep_strict_ddl=ON
Problem was incorrect handling of partitioned tables,
because db_type == DB_TYPE_PARTITION_DB
wsrep_should_replicate_ddl incorrectly marked
DDL as not replicatable. However, in partitioned
tables we should check implementing storage engine
from table->file->partition_ht() if available because
if partition handler is InnoDB all DDL should be allowed
even with wsrep_strict_ddl. For other storage engines
DDL should not be allowed and error should be issued.

This is 10.5 version of the fix.

Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
2025-02-02 04:54:42 +01:00
Julius Goryavsky
de216618e2 MDEV-29775 addendum: Relaxation of unnecessary restrictions
+ cosmetic corrections taken from the 10.6+ branch
of the fix (to simplify merge).
2025-02-02 04:52:33 +01:00
Jan Lindström
7d69902d83 MDEV-29775 : Assertion `0' failed in void Protocol::end_statement() when adding data to the MyISAM table after setting wsrep_mode=replicate_myisam
If wsrep_replicate_myisam=ON we allow wsrep_forced_binlog_format
to be [DEFAULT|ROW].

Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
2025-02-02 04:16:05 +01:00
Jan Lindström
3f5b6a9837 MDEV-35748 : Attempting to create a CONNECT engine Table results in non-InnoDB sequences in Galera cluster error
Problem was incorrect condition on wsrep_check_sequence
when ENGINE!=InnoDB.

Fix is not use DB_TYPE_XXX because it is not correct
on dynamic storage engines. Instead used storage engine
name is looked from thd->lex->m_sql_cmd->option_storage_engine_name.

For CREATE TABLE allow anyting except ENGINE=SEQUENCE.
For CREATE SEQUENCE only ENGINE=InnoDB is supported.
For ALTER TABLE if original table contains sequence information
only ENGINE=InnoDB is supported.

Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
2025-02-01 16:53:39 +01:00
Sergei Golubchik
7d657fda64 Merge branch '10.11 into 11.4 2025-01-30 12:01:11 +01:00
Sergei Golubchik
e69f8cae1a Merge branch '10.6' into 10.11 2025-01-30 11:55:13 +01:00
Sergei Golubchik
066e8d6aea Merge branch '10.5' into 10.6 2025-01-29 11:17:38 +01:00
Julius Goryavsky
bcb87f5ccb fix for galera_query_cache_invalidate test results 2025-01-27 23:07:23 +01:00
Julius Goryavsky
50d49493db galera: fixes for mtr test for performance schema 2025-01-27 19:05:27 +01:00
Julius Goryavsky
5af1f69a84 MDEV-26266 addendum: more stable test
This test must be performed on newly launched
nodes and then a restart must be performed.
2025-01-27 19:05:26 +01:00
Julius Goryavsky
0a5d6cf478 galera: disable problematic test (galera_sequences) 2025-01-27 19:05:26 +01:00
Julius Goryavsky
acf7b000ff fixes for galera_as_slave replication tests 2025-01-27 19:05:26 +01:00
Jan Lindström
e53ffdee96 MDEV-35804 : galera_ddl_fk_conflict test failed due to timeout
Test case changes only. Use better wait_conditions.

Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
2025-01-27 19:05:26 +01:00
Jan Lindström
0ddaefcc76 galera fix : MW-402 galera test fails sporadically
Test was using after certification sync point when it was
intended to use before certification sync point. This
caused sporadic failures.

Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
2025-01-27 19:05:26 +01:00
Jan Lindström
6e3274e814 MENT-31857 post-fix: fix for timeouts in the galera_as_slave_ctas test
Caused by MDEV-31857 enable --ssl-verify-server-cert by default in
the internal client. Fixed by disabling master_ssl_verify_server_cert
because account is passwordless.

Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
2025-01-27 19:05:26 +01:00
Jan Lindström
d598ee3cf9 MDEV-32780 : galera_as_slave_replay: assertion in the wsrep::transaction::before_rollback()
Test changes only because assertion reported is not
reproducable anymore.

Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
2025-01-24 17:17:12 +01:00
sjaakola
552cba92de MDEV-35710 support for threadpool
When client connections use threadpool, i.e. configuration has:
thread_handling = pool-of-threads it turned out that during wsrep
replication shutdown, not all client connections could be closed.
Reason was that some client threads has stmt_da in state DA_EOF,
and this state was earlier used to detect if client connection
was issuing SHUTDOWN command.

To fix this, the connection executing SHUTDOWN is now detected by
looking at the actual command being executed:
thd->get_command() == COM_SHUTDOWN
During replication shutdown, all other connections but the
SHUTDOWN executor, are terminated.

This commit has new mtr test galera.galera_threadpool, which
opens a number of threadpool client connections, and then
restarts the node to verify that connections in threadpool are
terminated during shutdown.

Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
2025-01-24 17:09:34 +01:00
Daniele Sciascia
841a7d391b MDEV-35018 MDL BF-BF conflict on DROP TABLE
DROP TABLE on child and UPDATE of parent table can cause an MDL BF-BF
conflict when applied concurrently.
DROP TABLE takes MDL locks on both child and its parent table, however
it only it did not add certification keys for the parent table.
This patch adds the following:
 * Append certification keys corresponding to all parent tables
   before DROP TABLE replication.
 * Fix wsrep_append_fk_parent_table() so that it works when it is
   given a table list containing temporary tables.
 * Make sure function wsrep_append_fk_parent_table() is only called
   for local transaction. That was not the case for ALTER TABLE.
 * Add a test case that verifies that UPDATE parent depends on
   preceeding DROP TABLE child.
 * Adapt galera_ddl_fk_conflict test to work with DROP TABLE as well.

Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
2025-01-24 17:02:44 +01:00
Jan Lindström
43c36b3c88 MDEV-35852 : ASAN heap-use-after-free in WSREP_DEBUG after INSERT DELAYED
Problem was that in case of INSERT DELAYED thd->query() is
freed before we call trans_rollback where WSREP_DEBUG
could access thd->query() in wsrep_thd_query().

Fix is to reset thd->query() to NULL in delayed_insert
destructor after it is freed. There is already
null guard at wsrep_thd_query().

Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
2025-01-20 12:19:31 +01:00
Marko Mäkelä
98dbe3bfaf Merge 10.5 into 10.6 2025-01-20 09:57:37 +02:00
Sergei Golubchik
904f2e4b2d fix galera tests for 11.4 2025-01-15 21:22:48 +01:00
Sergei Golubchik
f1a7693bc0 Merge branch '10.11' into 11.4 2025-01-14 23:45:41 +01:00
Sergei Golubchik
9d80422f79 MDEV-26266 disable the test on 10.11 for now 2025-01-14 13:49:24 +01:00
Denis Protivensky
901c6c7ab6 MDEV-33064: Sync trx->wsrep state from THD on trx start
InnoDB transactions may be reused after committed:
- when taken from the transaction pool
- during a DDL operation execution

In this case wsrep flag on trx object is cleared, which may cause wrong
execution logic afterwards (wsrep-related hooks are not run).

Make trx->wsrep flag initialize from THD object only once on InnoDB transaction
start and don't change it throughout the transaction's lifetime.
The flag is reset at commit time as before.

Unconditionally set wsrep=OFF for THD objects that represent InnoDB background
threads.

Make Wsrep_schema::store_view() operate in its own transaction.

Fix streaming replication transactions' fragments rollback to not switch
THD->wsrep value during transaction's execution
(use THD->wsrep_ignore_table as a workaround).

Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
2025-01-14 02:17:22 +01:00
Jan Lindström
133e26fd7d MDEV-34924 : gtid_slave_pos table neven been deleted on non replica nodes (wsrep_gtid_mode = 1)
Problem was caused by MDEV-31413 commit 277968aa where
mysql.gtid_slave_pos table was replicated by Galera.
However, as not all nodes in Galera cluster are replica
nodes, rows were not deleted from table.

In this fix this is corrected so that mysql.gtid_slave_pos
table is not replicated by Galera. Instead when Galera
node receives GTID event and wsrep_gtid_mode=1, this event
is stored to mysql.gtid_slave_pos table.

Added test case galera_2primary_replica for 2 async
primaries replicating to galera cluster.

Added test case galera_circular_replication where
async primary replicates to galera cluster and
one of the galera cluster nodes is master
to async replica.

Modified test case galera_restart_replica to monitor
gtid positions and rows in mysql.gtid_pos_table.
2025-01-13 19:14:26 +01:00
Marko Mäkelä
17f01186f5 Merge 10.11 into 11.4 2025-01-09 07:58:08 +02:00
Marko Mäkelä
420d9eb27f Merge 10.6 into 10.11 2025-01-08 12:51:26 +02:00
Marko Mäkelä
b251cb6a4f Merge 10.5 into 10.6 2025-01-08 08:48:21 +02:00
Julius Goryavsky
fd9a11d8a5 MDEV-35749: Add support for --use-memory option for SST with mariabackup
Mariabackup (mariadb-backup) supports the --use-memory option that
sets the buffer pool size for innodb. However, current SST scripts
do not use this option. This commit adds support for this option,
the value for which can be specified via the "use_memory" parameter
in the configuration file in the [sst], [mariabackup] or [xtrabackup]
sections (supported only for compatibility with old configurations).

In addition, if the innodb_buffer_pool_size option is specified in
the user configuration (in the main server configuration sections)
or passed to the SST scripts or the server via arguments, its value
is also passed to mariadb-backup as the value for the --use-memory
option.

A new section name [mariabackup] has also been added, which can
be used instead of the deprecated [xtrabackup] (the section name
"mariabackup" was specified in the documentation, but was not
actually supported by SST scripts before this commit).
2025-01-06 01:43:42 +01:00
Monty
88d9348dfc Remove dates from all rdiff files 2025-01-05 16:40:11 +02:00
Marko Mäkelä
3f914afd3a Merge 10.6 into 10.11 2025-01-02 12:39:56 +02:00
Marko Mäkelä
a54d151fc1 Merge 10.6 into 10.11 2024-12-19 15:38:53 +02:00