1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-05 13:16:09 +03:00
Commit Graph

18662 Commits

Author SHA1 Message Date
Sergei Petrunia
a52362b90c MDEV-36389 Incorrect query results for an indexed text column
Fixes a scenario where an IN subquery returned the wrong result
because the pushed WHERE clause was not retained for downstream
result filtering.  For example:
  CREATE TABLE t1 (c1 TEXT, UNIQUE (c1(1)));
  INSERT INTO t1 (c1) VALUES ('a');
  SELECT 'abc' IN (SELECT c1 FROM t1);
Internally, he 'abc' IN subquery condition becomes the constant
condition:
  'abc' = t1.c1 or t1.c1 is null
Prior to this patch, this condition was incorrectly removed when
converting the subquery engine to an index lookup-based engine.
Now eligible conditions are preserved during such engine rewrites.
2025-07-23 15:24:12 -04:00
Vladislav Vaintroub
13e9f2d65b MDEV-37143 mariabackup fails on Windows with "SSL certificate is self-signed"
This is the same as MDEV-35368, which was  previously incompletely fixed
(on *nix-only, for unix socket connections)

This time, we fix it compatibly to Connector/C, by not verifying
server certificate for local connections, which, in addition to socket
and named pipe, are also "127.0.0.1" and "::1", and on Windows "localhost"
as well.

The corresponding code in Connector/C is was added by
1287c901dc8515823d28edcebfe4be65e6c5a6b3.

It remain a good question whether mariabackup should use SSL at all
since all it does are local connections, for "BACKUP STAGE" stuff.
2025-07-04 23:29:33 +03:00
Oleksandr Byelkin
89c7e2b9c7 Merge branch '10.11' into 11.4 2025-06-17 09:50:22 +02:00
Yuchen Pei
11d1ac7285 MDEV-35856 Remove error code introduced to 10.11 in MDEV-36032
Two new error codes ER_SEQUENCE_TABLE_HAS_TOO_FEW_ROWS and
ER_SEQUENCE_TABLE_HAS_TOO_MANY_ROWS were introduced in MDEV-36032 in
both 10.11 and, as part of MDEV-22491, 12.0. Here we remove them from
10.11, but they should remain in 12.0.
2025-06-05 11:07:18 +10:00
Oleksandr Byelkin
28d6530571 Merge branch '10.6' into 10.11 2025-06-04 14:09:23 +02:00
Aleksey Midenkov
5ff01ad7bb MDEV-33370 Assertion `!is_set() || (m_status == DA_OK_BULK &&
is_bulk_op())' failed after ALTER TABLE of versioned table

Missed error code resulted in my_ok() at higher frame which failed on
assertion for m_status in state of error.
2025-06-03 11:27:45 +03:00
Monty
ce4f83e6b9 MDEV-29157 SELECT using ror_merged scan fails with s3 tables
handler::clone() call did not work with read only tables like S3.
It gave a wrong error message (out of memory instead of a permission
error) and aborted the query.

The issue was that the clone call had a wrong parameter to ha_open().
This now fixed. I also changed the clone call to provide the correct
error message if things fails.

This patch fixes an 'out of memory' error when using the S3 engine
for queries that could use multiple indexes together to find the matching
rows, like the following:
SELECT * FROM t1 WHERE key1 = 99 OR key2 = 2
2025-06-02 14:02:53 +03:00
Aleksey Midenkov
fe6a5c2200 MDEV-29155 CREATE OR REPLACE with self-referencing CHECK hangs
forever, cannot be killed

mysql_rm_table_no_locks() does TDC_RT_REMOVE_ALL which waits while
share is closed. The table normally is open only as OPEN_STUB, this is
what parser does for CREATE TABLE. But for SELECT the table is opened
not as a stub. If it is the same table name we anyway have two
TABLE_LIST objects: stub and not stub. So for "not stub"
TDC_RT_REMOVE_ALL sees open count and decides to wait until it is
closed. And it hangs because that was opened in the same thread.

The fix disables subqueries in CHECK expression at parser
level. Thanks to Sergei Golubchik <serg@mariadb.org> for the patch.
2025-05-29 12:34:07 +03:00
Marko Mäkelä
7b4b759f13 MDEV-36868: Inconsistency when shrinking innodb_buffer_pool_size
buf_pool_t::resize(): After successfully shrinking the buffer pool,
announce the success. The size had already been updated in shrunk().
After failing to shrink the buffer pool, re-enable the adaptive
hash index if it had been enabled.

Reviewed by: Debarun Banerjee
2025-05-28 13:33:06 +03:00
Daniel Black
676aea8cad MDEV-36848: identify tests with various MSAN suitability
With MSAN the following test behavious where observed:
* funcs_1.myisam_views-big - normal big test for non-debug
* innodb_gis.rtree_purge - normal big test with MSAN
* main.alter_table_lock - very quick - unclear why disabled
* main.cte_recursive - slow on Debug only
* main.join_cache_notasan - special MSAN handing for returning OOM added
* main.sum_distinct-big - 90 seconds on non-debug - still big however
* maria.max_length - normal big test with MSAN
* perfschema.statement_digest_long_query - overflows stack on debug

Timingsi (on old memory constrained hardware):

non-debug:

funcs_1.myisam_views-big                 w2 [ pass ]  78564
innodb_gis.rtree_purge '16k'             w2 [ pass ]   5784
innodb_gis.rtree_purge '32k'             w2 [ pass ]   5242
innodb_gis.rtree_purge '4k'              w1 [ pass ]   8303
innodb_gis.rtree_purge '64k'             w1 [ pass ]   6348
innodb_gis.rtree_purge '8k'              w2 [ pass ]   5870
main.alter_table_lock                    w1 [ pass ]     41
main.cte_recursive                       w1 [ pass ]  15485
main.join_cache_notasan                  w1 [ pass ]     39
main.sum_distinct-big                    w2 [ pass ]  96256
maria.max_length                         w1 [ pass ]  92990
perfschema.statement_digest_long_query   w2 [ pass ]      8

debug:

funcs_1.myisam_views-big                 w1 [ skipped ]  Can't be run WITH_MSAN and CMAKE_BUILD_TYPE=Debug
innodb_gis.rtree_purge '16k'             w2 [ pass ]  109788
innodb_gis.rtree_purge '32k'             w2 [ pass ]  62361
innodb_gis.rtree_purge '4k'              w1 [ pass ]  89423
innodb_gis.rtree_purge '64k'             w1 [ pass ]  72082
innodb_gis.rtree_purge '8k'              w1 [ pass ]  98452
main.alter_table_lock                    w2 [ pass ]     38
main.cte_recursive                       w2 [ pass ]  180047
main.join_cache_notasan                  w1 [ pass ]    166
main.sum_distinct-big                    w1 [ skipped ]  Can't be run WITH_MSAN and CMAKE_BUILD_TYPE=Debug
maria.max_length                         w1 [ skipped ]  Can't be run WITH_MSAN and CMAKE_BUILD_TYPE=Debug
perfschema.statement_digest_long_query   w1 [ skipped ]  Can't be run WITH_MSAN and CMAKE_BUILD_TYPE=Debug
2025-05-28 16:33:49 +10:00
Daniel Black
8d2665e56b MDEV-34388 default stack size under MSAN needs increasing
Without this increase the mtr test case pre/post conditions will
fail as the stack usage has increased under MSAN with clang-20.1.

ASAN takes a 11M stack, however there was no obvious gain in MSAN
test success after 2M.

The resulting behaviour observed on smaller stack size was a
SEGV normally.

Hide the default stack size from the sysvar tests that expose
thread-stack as a variable with its default value.
2025-05-28 16:30:56 +10:00
Thirunarayanan Balathandayuthapani
db188083c3 MDEV-36771 Assertion 'bulk_insert == TRX_NO_BULK' failed in trx_t::assert_freed
- InnoDB fails to reset bulk_insert of a transaction while freeing
the transaction during shutting down of a server.
2025-05-26 12:13:01 +05:30
Marko Mäkelä
3da36fa130 Merge 10.6 into 10.11 2025-05-26 08:10:47 +03:00
Thirunarayanan Balathandayuthapani
d8962d138f MDEV-36017 Alter table aborts when temporary directory is full
Problem:
=======
- In 10.11, During Copy algorithm, InnoDB does use bulk insert
for row by row insert operation. When temporary directory
ran out of memory, row_mysql_handle_errors() fails to handle
DB_TEMP_FILE_WRITE_FAIL.

- During inplace algorithm, concurrent DML fails to write
the log operation into the temporary file. InnoDB fail to
mark the error for the online log.

- ddl_log_write() releases the global ddl lock prematurely before
release the log memory entry

Fix:
===
row_mysql_handle_errors(): Rollback the transaction when
InnoDB encounters DB_TEMP_FILE_WRITE_FAIL

convert_error_code_to_mysql(): Report an aborted transaction
when InnoDB encounters DB_TEMP_FILE_WRITE_FAIL during
alter table algorithm=copy or innodb bulk insert operation

row_log_online_op(): Mark the error in online log when
InnoDB ran out of temporary space

fil_space_extend_must_retry(): Mark the os_has_said_disk_full
as true if os_file_set_size() fails

btr_cur_pessimistic_update(): Return error code when
btr_cur_pessimistic_insert() fails

ddl_log_write(): Release the global ddl lock after releasing
the log memory entry when error was encountered

btr_cur_optimistic_update(): Relax the assertion that
blob pointer can be null during rollback because InnoDB can
ran out of space while allocating the external page

ha_innobase::extra(): Rollback the transaction during DDL before
calling convert_error_code_to_mysql().

row_undo_mod_upd_exist_sec(): Remove the assertion which says
that InnoDB should fail to build index entry when rollbacking
an incomplete transaction after crash recovery. This scenario
can happen when InnoDB ran out of space.

row_upd_changes_ord_field_binary_func(): Relax the assertion to
make that externally stored field can be null when InnoDB ran out
of space.
2025-05-26 10:12:14 +05:30
Thirunarayanan Balathandayuthapani
8a4d3a044f MDEV-36017 Alter table aborts when temporary directory is full
Problem:
=======
- During inplace algorithm, concurrent DML fails to write
the log operation into the temporary file. InnoDB fail to
mark the error for the online log.

- ddl_log_write() releases the global ddl lock prematurely before
release the log memory entry

Fix:
===
row_log_online_op(): Mark the error in online log when
InnoDB ran out of temporary space

fil_space_extend_must_retry(): Mark the os_has_said_disk_full
as true if os_file_set_size() fails

btr_cur_pessimistic_update(): Return error code when
btr_cur_pessimistic_insert() fails

ddl_log_write(): Release the global ddl lock after releasing the
log memory entry when error was encountered

btr_cur_optimistic_update(): Relax the assertion that
blob pointer can be null during rollback because InnoDB can
ran out of space while allocating the external page

row_undo_mod_upd_exist_sec(): Remove the assertion which says
that InnoDB should fail to build index entry when rollbacking
an incomplete transaction after crash recovery. This scenario
can happen when InnoDB ran out of space.

row_upd_changes_ord_field_binary_func(): Relax the assertion to
make that externally stored field can be null when InnoDB ran out
of space.
2025-05-25 09:11:41 +05:30
Aleksey Midenkov
1a95c2a4b2 MDEV-36817 Server crashes in do_mark_index_columns instead of
ER_DUP_ENTRY on partitioned table

Now as c1492f3d07 (MDEV-36115) restores m_last_part table->file
points to partition p0 while the error happens in p1, so error index
does not match ib_table in innobase_get_mysql_key_number_for_index().

This case is handled by separate code block in
innobase_get_mysql_key_number_for_index() which was wrong on using
secondary index for dict_index_is_auto_gen_clust() and it was not
covered by the tests.
2025-05-23 14:46:34 +03:00
Oleksandr Byelkin
b8d3257243 Merge branch '10.11' into 10.11 2025-05-21 14:43:57 +02:00
Aleksey Midenkov
d5247592c5 Test sysvars_server failure fix 2025-05-21 11:10:09 +03:00
Marko Mäkelä
1c7209e828 Merge 10.6 into 10.11 2025-05-21 07:36:35 +03:00
Jan Lindström
497d6324bc MDEV-36627 : galera.MDEV-29142: certification position less than last commited
After the membership change on a newly synced node, then this is just a
warning and safe to suppress.

Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
2025-05-20 20:59:10 +02:00
Jan Lindström
7aed06887b MDEV-36512 : galera_3nodes.GCF-354: certification position less than last committed
Test changes only. Both warnings are expected and
should be suppressed because we intentionally inject
different inconsistencies on two nodes and then join
them back with membership change.

Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
2025-05-20 20:59:10 +02:00
Jan Lindström
7fd5957d55 MDEV-36622 : Hang during galera_evs_suspect_timeout test
Test changes only. Add wait_condition so that all nodes
are in the expected state and add debug output if issue
does reproduce.

Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
2025-05-20 20:59:10 +02:00
Hemant Dangi
d38558f99b MDEV-36117: MDL BF-BF conflict on ALTER and UPDATE with multi-level foreign key parents
Issue:
Mariadb acquires additional MDL locks on UPDATE/INSERT/DELETE statements
on table with foreign keys. For example, table t1 references t2, an
UPDATE to t1 will MDL lock t2 in addition to t1.
A replica may deliver an ALTER t1 and UPDATE t2 concurrently for
applying. Then the UPDATE may acquire MDL lock for t1, followed by a
conflict when the ALTER attempts to MDL lock on t1. Causing a BF-BF
conflict.

Solution:
Additional keys for the referenced/foreign table needs to be added
to avoid potential MDL conflicts with concurrent update and DDLs.

Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
2025-05-20 20:59:10 +02:00
Jan Lindström
a96367bc67 MDEV-36620 post-fix: galera_toi_ddl_nonconflicting test failure
Add wait_condition to wait until all inserted rows are replicated
so that show create table is deterministic.

Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
2025-05-20 20:59:10 +02:00
Marko Mäkelä
82d7419e06 MDEV-34388: Stack overflow on Alpine Linux
page_is_corrupted(): Do not allocate the buffers from stack,
but from the heap, in xb_fil_cur_open().

row_quiesce_write_cfg(): Issue one type of message when we
fail to create the .cfg file.

update_statistics_for_table(), read_statistics_for_table(),
delete_statistics_for_table(), rename_table_in_stat_tables():
Use a common stack buffer for Index_stat, Column_stat, Table_stat.

ha_connect::FileExists(): Invoke push_warning_printf() so that
we can avoid allocating a buffer for snprintf().

translog_init_with_table(): Do not duplicate TRANSLOG_PAGE_SIZE_BUFF.

Let us also globally enable the GCC 4.4 and clang 3.0 option
-Wframe-larger-than=16384 to reduce the possibility of introducing
such stack overflow in the future.  For RocksDB and Mroonga we relax
these limits.

Reviewed by: Vladislav Lesin
2025-05-20 17:27:05 +03:00
Julius Goryavsky
2350295643 MDEV-36740: galera.galera_ssl_upgrade fails due to expired certificate
The certificate used in tests has been renewed.
2025-05-20 12:33:36 +02:00
Jan Lindström
d7457b4076 MDEV-36628 : galera_vote_during_ist test failed
Test changes only. Added wait_conditions to wait for expected
database state.

Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
2025-05-20 12:30:40 +02:00
Marko Mäkelä
118cfcf821 Merge 10.11 into 11.4 2025-05-13 13:44:58 +03:00
Marko Mäkelä
bb48d7bc81 MDEV-36781: Assertion i < BUF_BUDDY_SIZES failed in buf_buddy_shrink()
buf_buddy_shrink(): Properly cover the case when KEY_BLOCK_SIZE
corresponds to the innodb_page_size, that is, the ROW_FORMAT=COMPRESSED
page frame is directly allocated from the buffer pool, not via the
binary buddy allocator.

buf_LRU_check_size_of_non_data_objects(): Avoid a crash when the
buffer pool is being shrunk.

buf_pool_t::shrink(): Abort if over 95% of the shrunk buffer pool
would be occupied by the adaptive hash index or record locks.
2025-05-13 12:27:46 +03:00
Brandon Nesterenko
a7278a3024 MDEV-36663: Testcase Fixup
There were two issues with the test:

 1. A race between a race_condition.inc and status variable, where the
    status variable Rpl_semi_sync_master_status could be ON before the
    semi-sync connection finished establishing, resulting in
    Rpl_semi_sync_master_clients showing 0 (instead of 1). To fix this,
    we simply instead wait for Rpl_semi_sync_master_clients to be 1
    before proceeding.

 2. Another race between a race_condition.inc and status variable,
    where the wait_condition waited on a process_list command of
    'BINLOG DUMP' to disappear to infer the binlog dump thread was
    killed, to where we then verified semi-sync state was correct
    using status variables. However, the 'BINLOG DUMP' command is
    overridden with a killed status before the semi-sync tear-down
    happens, and thereby we could see invalid values. The fix for
    this is to change the wait_condition to instead wait for the
    connection with the replication user is gone, because that stays
    through the binlog dump thread tear-down life-cycle
2025-05-13 12:27:41 +03:00
Sergei Golubchik
83e0438f62 MDEV-36536 post-review changes
that were apparently partially lost in a rebase
2025-04-29 11:34:35 +02:00
Monty
1b934a387c MDEV-36536 Add option to not collect statistics for long char/varchars
This is needed to make it easy for users to automatically ignore long
char and varchars when using  ANALYZE TABLE PERSISTENT.
These fields can cause problems as they will consume
'CHARACTERS * MAX_CHARACTER_LENGTH * 2 * number_of_rows' space on disk
during analyze, which can easily be much bigger than the analyzed table.

This commit adds a new user variable, analyze_max_length, default value 4G.
Any field that is bigger than this in bytes, will be ignored by
ANALYZE TABLE PERSISTENT unless it is specified in FOR COLUMNS().

While doing this patch, I noticed that we do not skip GEOMETRY columns from
ANALYZE TABLE, like we do with BLOB. This should be fixed when merging
to the 'main' branch. At the same time we should add a resonable default
value for analyze_max_length, probably 1024, like we have for
max_sort_length.
2025-04-28 12:38:01 +03:00
Brandon Nesterenko
0db5622c4f MDEV-36663: Testcase Fixup
There were two issues with the test:

 1. A race between a race_condition.inc and status variable, where the
    status variable Rpl_semi_sync_master_status could be ON before the
    semi-sync connection finished establishing, resulting in
    Rpl_semi_sync_master_clients showing 0 (instead of 1). To fix this,
    we simply instead wait for Rpl_semi_sync_master_clients to be 1
    before proceeding.

 2. Another race between a race_condition.inc and status variable,
    where the wait_condition waited on a process_list command of
    'BINLOG DUMP' to disappear to infer the binlog dump thread was
    killed, to where we then verified semi-sync state was correct
    using status variables. However, the 'BINLOG DUMP' command is
    overridden with a killed status before the semi-sync tear-down
    happens, and thereby we could see invalid values. The fix for
    this is to change the wait_condition to instead wait for the
    connection with the replication user is gone, because that stays
    through the binlog dump thread tear-down life-cycle
2025-04-29 07:00:16 -06:00
Yuchen Pei
6f8ef26885 MDEV-36032 Check whether a table can be a sequence when ALTERed with SEQUENCE=1
To check the rows, the table needs to be opened. To that end, and like
MDEV-36038, we force COPY algorithm on ALTER TABLE ... SEQUENCE=1.
This also results in checking the sequence state / metadata.

The table structure was already validated before this patch.
2025-04-29 16:28:01 +10:00
Oleksandr Byelkin
a8d4642375 Merge branch '10.11' into 11.4 2025-04-26 10:53:02 +02:00
Oleksandr Byelkin
4d41ec081e Merge branch '10.6' into 10.11 2025-04-26 10:47:03 +02:00
Oleksandr Byelkin
19644f6821 Merge branch '10.5' into 10.6 2025-04-26 10:41:52 +02:00
Oleksandr Byelkin
4fc9dc84b0 MDEV-32086 (part 2) Server crash when inserting from derived table containing insert target table
Get rid of need of matherialization for usual INSERT (cache results in
Item_cache* if needed)

- subqueries in VALUE do not see new records in the table we are
  inserting to
- subqueries in RETIRNING prohibited to use the table we are inserting to
2025-04-25 15:10:36 +02:00
Sergey Vojtovich
9b0294cd12 MDEV-36666 - atomic.alter_table still times out often
According to buildbot cross-reference atomic.alter_table is failing ~10
times a day due to 900 seconds test case timeout. Split it into two
tests: atomic.alter_table_myisam and atomic.alter_table_innodb.
It should reduce failure frequency down to once a day or so, similarly
to atomic.alter_table_aria test.

Diabling InnoDB for MyISAM/Aria/RocksDB tests makes them 20-35% faster.
2025-04-25 10:40:47 +04:00
ParadoxV5
1d5557d9c0 MDEV-36663 Semi-sync Replica Can't Kill Dump Thread When Using SSL
When a replica stops an established semi-sync connection, it is
supposed to kill the corresponding binlog dump thread on the primary
server.  However, when connections are configured to use SSL, this new
connection created by the replica to kill the dump thread doesn't have
any logic to configure SSL options, and thereby the connection can't be
made, and the dump thread will never be killed.

This patch adds logic to configure the semi-sync kill connection with
SSL. The exising logic to set up the connection options for the regular
connection was extracted into a function that the semi-sync kill
connection invokes.

Co-author: Brandon Nesterenko <brandon.nesterenko@mariadb.com>
2025-04-23 17:20:47 -06:00
Jan Lindström
2f5c260f55 MDEV-36514 : galera_var_ignore_apply_errors test failure: table doesn't exist
Test changes only. Added proper wait_conditions to wait for expected
replication state.

Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
2025-04-23 18:45:57 +02:00
Jan Lindström
76938eda9d MDEV-36625 : galera.galera_var_replicate_myisam_on test failure
Test case changes only. Add proper wait_conditions to wait expected
database state.

Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
2025-04-23 18:45:11 +02:00
Jan Lindström
fe25a30a92 MDEV-36620 : galera_toi_ddl_nonconflicting test failure
Test changes only. Idea of the test is to test two concurrent
nonconflicting DDL-clauses. Therefore, use debug sync to
really execute two DDL-clauses as concurrently as Galera
allows.

Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
2025-04-23 08:31:10 +02:00
Marko Mäkelä
75ad1e9f00 Merge 10.6 into 10.11 2025-04-23 08:53:53 +03:00
Jan Lindström
67b6f9f285 MDEV-36618 : galera.galera_as_slave_nonprim test: result content mismatch
Remove unnecessary sleeps and use wait_for_slave_to_stop instead.

Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
2025-04-22 20:46:51 +02:00
Jan Lindström
b1eec9d8af MDEV-36516 : galera_3nodes.galera_gtid_2_cluster test failed on 10.5
Add wait-conditions to verify that INSERTs are replicated
before checking GTIDs.

Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
2025-04-22 20:44:10 +02:00
Vlad Lesin
47e687b109 MDEV-36639 innodb_snapshot_isolation=1 gives error for not committed row changes
Set solution is to check if transaction, which modified a record, is
still active in lock_clust_rec_read_check_and_lock(). if yes, then just
request a lock. If no, then, depending on if the current transaction read
view can see the changes, return eighter DB_RECORD_CHANGED or request a
lock.

We can do the check in lock_clust_rec_read_check_and_lock() because
transaction tries to set a lock on the record which cursor points to after
transaction resuming and cursor position restoring. If the lock already
exists, then we don't request the lock again. But for the current commit
it's important that lock_clust_rec_read_check_and_lock() will be invoked
again for the same record, so we can do the check again after
transaction, which modified a record, was committed or rolled back.

MDEV-33802(4aa9291) is partially reverted. If some transaction holds
implicit lock on some record and transaction with snapshot isolation level
requests conflicting lock on the same record, it should be blocked instead
of returning DB_RECORD_CHANGED to have ability to continue execution when
implicit lock owner is rolled back.

The construction
--------------------------------------------------------------------------
let $wait_condition=
  select count(*) = 1 from information_schema.processlist
  where state = 'Updating' and info = 'UPDATE t SET b = 2 WHERE a';
--source include/wait_condition.inc
--------------------------------------------------------------------------

is not reliable enought to make sure transaction is blocked in test
case, the test failed sporadically with
--------------------------------------------------------------------------
./mtr --max-test-fail=1 --parallel=96 lock_isolation{,,,,,,,}{,,,}{,,} \
--repeat=500
--------------------------------------------------------------------------

command. That's why it was replaced with debug sync-points.

Reviewed by: Marko Mäkelä
2025-04-22 20:41:43 +03:00
Sergei Golubchik
7b0820b8b7 cleanup: redundant my_casedn_str()
hashing/comparison uses case-insensitive collation anyway
2025-04-22 12:03:05 +02:00
Thirunarayanan Balathandayuthapani
dac3d702f7 MDEV-36649 dict_acquire_mdl_shared() aborts when table mode is DICT_TABLE_OP_OPEN_ONLY_IF_CACHED
- InnoDB fails to check the table is being dropped or evicted
while acquiring the MDL for the table when table open operation
mode is DICT_TABLE_OP_OPEN_ONLY_IF_CACHED. This is caused by
the commit 337bf8ac4b (MDEV-36122)

Fix:
===
dict_acquire_mdl_shared(): If the table is evicted or dropped when
table operation mode is DICT_TABLE_OP_OPEN_IF_CACHED then return
nullptr
2025-04-22 15:17:29 +05:30
Brandon Nesterenko
588f7a5af7 MDEV-35694: Mysqlbinlog --stop-position should warn if EOF not reached with --read-from-remote-server
MDEV-27037 added functionality to warn users that a specified
stop-position or stop-datetime was never reached. It only worked for
local files though. The patch in MDEV-35528 changed the
implementation for stop-datetime to work to provide the warning also
when using --read-from-remote-server. The PR for that MDEV (#3670)
was limited to only the stop-datetime field.

This patch updates the --stop-position warning to also work with
--read-from-remote-server.

Reviewed By:
============
Andrei Elkin <andrei.elkin@mariadb.com>
Jimmy Hu <jimmy.hu@mariadb.com>
2025-04-21 14:21:55 -06:00