Commit Graph

201155 Commits

Author SHA1 Message Date
e69f8cae1a Merge branch '10.6' into 10.11 mariadb-10.11.11 2025-01-30 11:55:13 +01:00
0459517562 MDEV-35169 cleanup after the test
followup for f6e00abda0
2025-01-30 11:54:34 +01:00
066e8d6aea Merge branch '10.5' into 10.6 mariadb-10.6.21 2025-01-29 11:17:38 +01:00
a89e734fcb ColumnStore 6.4.10-1 2025-01-29 10:44:18 +01:00
d0c2a007ee C/C 3.3.14 2025-01-29 10:44:18 +01:00
17e31abd8b compilation failure on CentOS 7 2025-01-29 10:44:02 +01:00
38d3b6027b MDEV-35943 ASAN errors in Query_arena::free_items / fill_schema_table_from_frm
shouldn't try to close the table if open failed.

followup for deb20fb751
2025-01-29 10:43:34 +01:00
03d2328785 MDEV-35944 DELETE fails to notice transaction abort, violating ACID
Process errors of read_record().

Also, add an assert that Marko requested
2025-01-29 10:43:29 +01:00
d5e7bce14b MDEV-35966 galera.galera_as_master crashes in debug builds
innobase_commit(): When Galera is used with SET SQL_LOG_BIN=OFF,
some debug assertions that had been added in
commit ddd7d5d8e3 (MDEV-24035)
would fail. Let us relax those assertions for Galera transactions,
to allow an implicit commit after an internally executed XA PREPARE.

Note that trx_undo_report_row_operation() only allows undo log records
to be added to ACTIVE transactions (not after XA PREPARE). Hence, this
relaxation should be safe with respect to writes.
2025-01-29 10:42:57 +01:00
3cfffb4de6 MDEV-35962 CREATE INDEX fails to heal a FOREIGN KEY constraint
commit_cache_norebuild(): Replace any newly added indexes in
the attached foreign key constraints.
2025-01-29 09:04:50 +02:00
7eded23be6 ColumnStore 5.6.9-1 mariadb-10.5.28 2025-01-28 19:31:29 +01:00
1fec4fc4f8 more C API methods in the service_sql
for columnstore
2025-01-28 19:31:29 +01:00
ffff702623 C/C 3.1.27 2025-01-28 19:31:29 +01:00
fafa10dbc4 update HeidiSQL to 12.10
also, switch to https
2025-01-28 19:31:29 +01:00
66cf3c6974 MDEV-35612 fix for system-versioning
only ignore fully invisible fields
2025-01-28 19:31:29 +01:00
c1933b46e4 MDEV-33285 make the test deterministic
need to clear old signals
before waiting for new signals with the same name
2025-01-28 19:31:29 +01:00
caec03cb79 MDEV-35907 debian-start script fails when using non-standard socket path
consistently use --defaults-extra-file for all command-line tools
2025-01-28 19:29:54 +01:00
9a0ac0cdf7 MDEV-35911 Assertion `marked_for_write_or_computed()' failed in bool Field_new_decimal::store_value(const my_decimal*, int*)
disable the assert.

also, use the same check for check_that_all_fields_are_given_values()
as it's used in not_null_fields_have_null_values() - to avoid
issuing the same warning twice.
2025-01-28 19:29:54 +01:00
f6e00abda0 MDEV-35169 ALTER TABLE...IMPORT TABLESPACE does not work with INDEX DESC
Problem:
=======
- Import tablespace fails to check the index fields descending
property while matching the schema given in cfg file with the
table schema.

Fix:
===
row_quiesce_write_index_fields(): Write the descending
property of the field into field fixed length field.
Since the field fixed length uses only 10 bits,
InnoDB can use 0th bit of the field fixed length
to store the descending field property.

row_import_cfg_read_index_fields(): Read the field
descending information from field fixed length.
2025-01-28 11:56:35 +05:30
b8b77177c2 MDEV-35964 fix cast warnings on mac in mysql_file.h
Cast create_flags to mode_t when passing to my_create and
my_create_with_symlink
2025-01-28 11:19:52 +11:00
bcb87f5ccb fix for galera_query_cache_invalidate test results 2025-01-27 23:07:23 +01:00
0018df2b55 galera fix: Assertion WSREP(thd) failed in wsrep_restore_kill_after_commit()
Wsrep_commit_empty happens too early when wsrep is disabled. Let the
cleanup happen at end of statement.

Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
2025-01-27 19:05:27 +01:00
50d49493db galera: fixes for mtr test for performance schema 2025-01-27 19:05:27 +01:00
c43db43a7c MENT-2038 Assert WSREP(thd) fails in wsrep_restore_kill_after_commit
Fix wrong assertion: function wsrep_restore_kill_after_commit()
asserts `WSREP(thd)`, however for the caller (wsrep_after_statement())
it is enough that the THD  has an active transaction. Fixed the
assertion accordingly.

Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
2025-01-27 19:05:27 +01:00
479a5832f0 galera fix: MSAN reports use-of-uninitialized-value on binlog_encryption
This commit fixes a bug in MSAN verification in debug builds
related to the member of a lex->definer structure field that may
be uninitialized for some SET statements. The bug is caused by
debug output in a wsrep-specific insert and does not affect
server functionality.
2025-01-27 19:05:26 +01:00
862d1be2e6 MDEV-25718 addendum: stabilization of test success (especially for 11.4+)
Added DEBUG_SYNC_С("ha_write_row_end") in the WSREP branch,
and added a new status to the list of pending statuses in
the mtr test.
2025-01-27 19:05:26 +01:00
779ae4c511 wsrep mtr tests: fix for MDEV-23081 failure
Sometimes a database can be created with --log-bin
but then the .combinations file causes a switch to
start without --log-bin causing a failure on recovery.
This commit fixes this issue.
2025-01-27 19:05:26 +01:00
331975c5c5 galera: disable problematic test (galera_nbo_master_non_prim_failure) 2025-01-27 19:05:26 +01:00
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
0a5d6cf478 galera: disable problematic test (galera_sequences) 2025-01-27 19:05:26 +01:00
acf7b000ff fixes for galera_as_slave replication tests 2025-01-27 19:05:26 +01:00
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
2cfad396ee galera tests: more informative messages about the number of variables 2025-01-27 19:05:26 +01:00
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
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
c0b11e75ff MDEV-34218: Mariadb Galera cluster fails when replicating from Mysql 5.7 on use of DDL
Issue:
Mariadb Galera cluster fails to replicate from
Mysql 5.7 when configured with MASTER_USE_GTID=no
option for CHANGE MASTER.

HOST: mysql, mysql 5.7.44 binlog_format=ROW
HOST: m1, mariadb 10.6 GALERA NODE replicating from HOST mysql, Using_Gtid: No (log file and position)
HOST: m2 mariadb 10.6 GALERA NODE
HOST: m3 mariadb 10.6 GALERA NODE

Error on m1:
2024-05-22 16:11:07 1 [ERROR] WSREP: Vote 0 (success) on 78cebda7-1876-11ef-896b-8a58fca50d36:2565 is inconsistent with group. Leaving cluster.

Error on m2 and m3:
2024-05-22 16:11:06 2 [ERROR] Error in Log_event::read_log_event(): 'Found invalid event in binary log', data_len: 42, event_type: -94
2024-05-22 16:11:06 2 [ERROR] WSREP: applier could not read binlog event, seqno: 2565, len: 482

It fails in Gtid_log_event::is_valid() check on
secondary node when sequence number sent from primary
is 0. On primary for applier or slave thread sequence
number is set to 0, when both thd->variables.gtid_seq_no
and thd->variables.wsrep_gtid_seq_no have value 0.

Solution:
Skip adding Gtid Event on primary for applier or
slave thread when both thd->variables.gtid_seq_no
and thd->variables.wsrep_gtid_seq_no have value 0.

Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
2025-01-27 17:17:11 +01:00
746471b8d8 MDEV-33978 P_S.THREADS is not showing all server threads
page_encrypt_thread_key: The key for fil_crypt_thread().

All other InnoDB threads should already have been registered for
performance_schema ever since
commit a2f510fccf
2025-01-27 12:11:47 +02:00
831f5bc66f MDEV-33978 P_S.THREADS is not showing all server threads
page_encrypt_thread_key: The key for fil_crypt_thread().

All other InnoDB threads should already have been registered for
performance_schema ever since
commit a2f510fccf
2025-01-27 12:08:30 +02:00
dffe3d1fb2 MDEV-35910 Conditions with SP local variables are not pushed into derived table
This bug prevented building conditions that could be pushed into a derived
table if the derived table was used in a query of a stored procedure and
the conditions contained local variables of the procedure. This could lead
to a slow execution of the procedure.
Also in some cases the bug prevented building conditions that could be
pushed from the HAVING condition into the WHERE condition of a query if
the conditions to be built used local variables of a stored procedure.

To failure to build such pushable conditions was due to lack of a proper
implementation of the virtual method to copy items for the objects of the
class Item_splocal.

Approved by Igor Babaev <igor@mariadb.com>
who had to change the original fix that just added the regular copying of
the nodes of the Item_splocal class to take into account the wrappers
do_get_copy() and do_build_clone() introduced after the fix had been
prepared. He also changed the test case to demonstrate that the fix
was really needed for pushdown from HAVING into WHERE.
2025-01-26 20:42:17 -08:00
765458c93c fix my_error usage 2025-01-26 16:15:46 +01:00
e7cc1a3047 MDEV-33658 2/2 Cannot add a foreign key on a table with a matching long UNIQUE
Cannot add a foreign key on a table with a long UNIQUE multi-column index, that
contains a foreign key as a prefix.

Check that index algorithms match during the "generated" keys duplicate removal.
2025-01-26 16:15:46 +01:00
ecaedbe299 MDEV-33658 1/2 Refactoring: extract Key length initialization
mysql_prepare_create_table: Extract a Key initialization part that
relates to length calculation and long unique index designation.

append_system_key_parts call also moves there.

Move this initialization before the duplicate elimination.

Extract WITHOUT OVERPLAPS check into a separate function. It had to be moved
earlier in the code to preserve the order of the error checks, as in the tests.
2025-01-26 16:15:46 +01:00
e33064e0fc MDEV-27769 Assertion failed in Field::ptr_in_record upon UPDATE in ORACLE mode
table->move_fields has some limitations:
1. It cannot be used in cascade
2. It should always have a restoring pair

In this case, an error has occurred before the field ptr was restored, returning
from the function in that state. Even in case of an error, the table can be
reused afterwards and table->field[i]->ptr is not reset in between.

The solution is to restore the field pointers immanently whenever they've been
deviated.

Also add an assertion that ensures that table fields are restored after the use
in close_thread_tables.
2025-01-26 16:15:46 +01:00
cb5dd76959 MDEV-35938: rpl.rpl_parallel_gco_wait_kill fails - "Can't initialize replace ..."
Test rpl.rpl_parallel_gco_wait_kill has a race condition where
it identifies that SQL using its state as
"Slave has read all relay log", and immediately tries to save
the thread id of the SQL thread by querying for threads with
that same state. However, the state of the SQL thread may
change in-between this time, leading to the query that saves
the SQL thread finding no thread id that matches that state.

Commit 3ee6f69d49 aimed to fix
this in 10.11+ by simplifying the query string to
"%relay log%"; however, it could still fail (though less
often).

This commit instead changes the query to find the SQL thread
from using some state, to using the command "Slave_SQL", which
will not change
2025-01-25 15:54:37 -07:00
47f87c5f88 MDEV-20281 "[ERROR] Failed to write to mysql.slow_log:" without error reason
Add "backup" (in case of absence issued by error) reasons for failed logging.
2025-01-25 20:37:51 +01:00
d77b9a4925 MDEV-34355: rpl.rpl_semi_sync_no_missed_ack_after_add_slave ‘server_3 should have sent…’
MDEV-35477 incorrectly reverted the original test fix of MDEV-34355,
thinking it superseded that fix. It is still needed though. Pasting
the content of the original patch’s commit message, as it is still
relevant (and the method to reproduce the test failure still works).

“””
The problem is that the test could query the status variable
Rpl_semi_sync_slave_send_ack before the slave actually updated it.
This would result in an immediate --die assertion killing the rest
of the test. The bottom of this commit message has a small patch
that can be applied to reproduce the test failure.

This patch fixes the test failure by waiting for the variable to be
updated before querying its value.

diff --git a/sql/semisync_slave.cc b/sql/semisync_slave.cc
index 9ddd4c5c8d7..60538079fce 100644
--- a/sql/semisync_slave.cc
+++ b/sql/semisync_slave.cc
@@ -303,7 +303,10 @@ int Repl_semi_sync_slave::slave_reply(Master_info *mi)
     reply_res= DBUG_EVALUATE_IF("semislave_failed_net_flush", 1,
                                 net_flush(net));
     if (!reply_res)
+    {
+      sleep(1);
       rpl_semi_sync_slave_send_ack++;
+    }
   }
   DBUG_RETURN(reply_res);
 }
“””
2025-01-25 11:05:32 -07:00
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
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
50cf189717 MDEV-35018 addendum: improved warnings handling
Fixed regression after original MDEV-35018 fix related
to warnings appearing when running MDEV-26266 test and
other possible problems with warnings.
2025-01-24 17:09:21 +01:00
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