- 08 Feb, 2024 1 commit
-
-
Marko Mäkelä authored
While the index_lock and block_lock include debug instrumentation to keep track of shared lock holders, such instrumentation was never part of the simpler srw_lock, and therefore some users of the class implemented a limited form of bookkeeping. srw_lock_debug encapsulates srw_lock and adds the data members writer, readers_lock, and readers to keep track of the threads that hold the exclusive latch or any shared latches. The debug checks are available also with SUX_LOCK_GENERIC (in environments that do not implement a futex-like system call). dict_sys_t::latch: Use srw_lock_debug in debug builds. This makes the debug fields latch_ex, latch_readers redundant. fil_space_t::latch: Use srw_lock_debug in debug builds. This makes the debug field latch_count redundant. The field latch_owner must be preserved, because fil_space_t::is_owner() is being used in all builds. lock_sys_t::latch: Use srw_lock_debug in debug builds. This makes the debug fields writer, readers redundant. lock_sys_t::is_holder(): A new debug predicate to check if the current thread is holding lock_sys.latch in any mode. trx_rseg_t::latch: Use srw_lock_debug in debug builds.
-
- 07 Feb, 2024 6 commits
-
-
Marko Mäkelä authored
This follows up commit 383f77cd which simplified dict_table_schema_check(). Note: We can display quoted names like this: my_snprintf(buf, sizeof buf, "%`.*s.%`s", int(t->name.dblen()), t->name.m_name, t->name.basename());
-
Marko Mäkelä authored
-
Vlad Lesin authored
THE FIX MUST NOT BE MERGED TO 10.6+, BECAUSE 10.6+ IS NOT AFFECTED! The test is waiting for delete-marked record purging. But this does not happen under the following conditions: 1. "START TRANSACTION WITH CONSISTENT SNAPSHOT" - is active, has not been rolled back yet 2. "DELETE FROM t WHERE b = 20 # trx_1" - is committed 3. "INSERT INTO t VALUES(10, 20) # trx_2" - hanging on "ib_after_row_insert" sync point, waiting for "first_ins_cont" signal 4. "DELETE FROM t WHERE b = 20 # trx_3" - blocked on delete-marked by trx_1 record, waiting for trx_2 5. connection "default" is waiting on 'now WAIT_FOR row_purge_del_mark_finished' purge_coordinator_callback_low() sets purge_state.m_history_length= srv_do_purge(&n_total_purged); even if nothing was purged, like in our case. Nothing was purged because transaction with consistent snapshot was still alive during purging procedure. Then purge_coordinator_timer_callback() does not wake purge thread if the following condition is true: purge_state.m_history_length == trx_sys.rseg_history_len The above condition is true for our case, because we are waiting for delete-marked record purging, and trx_sys.rseg_history_len does not grow. Only 10.5 is affected, because there is no such condition in 10.6, i.e. purge thread is woken up even if history size was not changed during purge coordinator thread suspending. The easiest way to fix it is just to remove the test from 10.5.
-
Thirunarayanan Balathandayuthapani authored
- Failed to reset the innodb_fil_make_page_dirty_debug variable in innodb_saved_page_number_debug_basic test case.
-
Yuchen Pei authored
-
Daniel Black authored
Without an OS error it could one of the many errors from write.
-
- 06 Feb, 2024 7 commits
-
-
Oleksandr Byelkin authored
-
Vladislav Vaintroub authored
An attempt to fix lost output sometimes seen on buildbot.
-
Vladislav Vaintroub authored
-
Oleksandr Byelkin authored
-
Daniel Bartholomew authored
-
Daniel Bartholomew authored
-
mariadb-DebarunBanerjee authored
MDEV-18288 Transportable Tablespaces leave AUTO_INCREMENT in mismatched state, causing INSERT errors in newly imported tables when .cfg is not used. During import, if cfg file is not specified, we don't update the autoinc field in innodb dictionary object dict_table_t. The next insert tries to insert from the starting position of auto increment and fails. It can be observed that the issue is resolved once server is restarted as the persistent value is read correctly from PAGE_ROOT_AUTO_INC from index root page. The patch fixes the issue by reading the the auto increment value directly from PAGE_ROOT_AUTO_INC during import if cfg file is not specified. Test Fix: 1. import_bugs.test: Embedded mode warning has absolute path. Regular expression replacement in test. 2. full_crc32_import.test: Table level auto increment mismatch after import. It was using the auto increment data from the table prior to discard and import which is not right. This value has cached auto increment value higher than the actual inserted value and value stored in PAGE_ROOT_AUTO_INC. Updated the result file and added validation for checking the maximum value of auto increment column.
-
- 05 Feb, 2024 2 commits
-
-
Brandon Nesterenko authored
MDEV-32551 changed rpl/t/rpl_session_var.test to show its semi-sync status, as it added a semi-sync version of the test (rpl_session_var2). The result was re-recorded in the rpl suite, but there is an engines/funcs counter-part result file that uses the same .test file which also needed to be re-recorded.
-
Yuchen Pei authored
Add UTF8_IS_UTF8MB3 to the (session) old_mode in connections made with sql service to run init queries The connection is new and the global variable value takes effect rather than the session value from the caller of spider_db_init
-
- 04 Feb, 2024 1 commit
-
-
Igor Babaev authored
This bug led to wrong result sets returned by the second execution of prepared statements from selects using mergeable derived tables pushed into external engine. Such derived tables are always materialized. The decision that they have to be materialized is taken late in the function mysql_derived_optimized(). For regular derived tables this decision is usually taken at the prepare phase. However in some cases for some derived tables this decision is made in mysql_derived_optimized() too. It can be seen in the code of mysql_derived_fill() that for such a derived table it's critical to change its translation table to tune it to the fields of the temporary table used for materialization of the derived table and this must be done after each refill of the derived table. The same actions are needed for derived tables pushed into external engines. Approved by Oleksandr Byelkin <sanja@mariadb.com>
-
- 02 Feb, 2024 3 commits
-
-
Sergei Petrunia authored
@@ -314,7 +314,7 @@ select straight_join * from t0, part ignore index (primary) where p_partkey=t0.a and p_size=1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t0 ALL NULL NULL NULL NULL 5 Using where +1 SIMPLE t0 ALL NULL NULL NULL NULL 6 Using where 1 SIMPLE part eq_ref i_p_size i_p_size 9 const,dbt3_s001.t0.a 1
-
Sergei Petrunia authored
Variant#3: moved the logic out of create_key_parts_for_pseudo_indexes Range Analyzer (get_mm_tree functions) can only process up to MAX_KEY=64 indexes. The problem was that calculate_cond_selectivity_for_table used it to estimate selectivities for columns, and since a table can have > MAX_KEY columns, would invoke Range Analyzer with more than MAX_KEY "pseudo-indexes". Fixed by making calculate_cond_selectivity_for_table() to run Range Analyzer with at most MAX_KEY pseudo-indexes. If there are more columns to process, Range Analyzer will be invoked multiple times. Also made this change: - param.real_keynr[0]= 0; + MEM_UNDEFINED(¶m.real_keynr, sizeof(param.real_keynr)); Range Analyzer should have no use on real_keynr when it is run with pseudo-indexes.
-
Alexander Barkov authored
mariadb-backup: Adding a function get_os_user() to detect the OS user name if the user name is not specified, to make mariadb-backup: - work like MariaDB client tools work - match its --help page, which says: -u, --user=name This option specifies the username used when connecting to the server, if that's not the current user.
-
- 01 Feb, 2024 3 commits
-
-
Alexander Barkov authored
MDEV-33355 Add a Galera-2-node-to-MariaDB replication MTR test cloning the slave with mariadb-backup Replication from a 2-node Galera cluster to a regular MariaDB server. Cloning the slave using mariadb-backup.
-
Sergei Golubchik authored
even if pkg-config has it. otherwise build dependencies aren't detected.
-
Alexander Barkov authored
-
- 31 Jan, 2024 8 commits
-
-
Sergei Golubchik authored
-
Sergei Golubchik authored
-
Sergei Golubchik authored
-
Sergei Golubchik authored
-
Nikita Malyavin authored
According to the standard, the autoincrement column (i.e. *identity column*) should be advanced each insert implicitly made by UPDATE/DELETE ... FOR PORTION. This is very unconvenient use in several notable cases. Concider a WITHOUT OVERLAPS key with an autoinc column: id int auto_increment, unique(id, p without overlaps) An update or delete with FOR PORTION creates a sense that id will remain unchanged in such case. The standard's IDENTITY reminds MariaDB's AUTO_INCREMENT, however the generation rules differ in many ways. For example, there's also a notion autoincrement index, which is bound to the autoincrement field. We will define our own generation rule for the PORTION OF operations involving AUTO_INCREMENT: * If an autoincrement index contains WITHOUT OVERLAPS specification, then a new value should not be generated, otherwise it should. Apart from WITHOUT OVERLAPS there is also another notable case, referred by the reporter - a unique key that has an autoincrement column and a field from the period specification: id int auto_increment, unique(id, s), period for p(s, e) for this case, no exception is made, and the autoincrementing rules will be proceeded accordung to the standard (i.e. the value will be advanced on implicit inserts).
-
Sergei Golubchik authored
-
Sergei Golubchik authored
test disabled, until fixed
-
Thirunarayanan Balathandayuthapani authored
Reason: ====== undo_space_dblwr test case fails if the first page of undo tablespace is not flushed before restart the server. While restarting the server, InnoDB fails to detect the first page of undo tablespace from doublewrite buffer. Fix: === Use "ib_log_checkpoint_avoid_hard" debug sync point to avoid checkpoint and make sure to flush the dirtied page before killing the server. innodb_make_page_dirty(): Fails to set srv_fil_make_page_dirty_debug variable.
-
- 30 Jan, 2024 3 commits
-
-
Oleksandr Byelkin authored
-
Brandon Nesterenko authored
rpl.rpl_seconds_behind_master_spike uses the DEBUG_SYNC mechanism to count how many format descriptor events (FDEs) have been executed, to attempt to pause on a specific relay log FDE after executing transactions. However, depending on when the IO thread is stopped, it can send an extra FDE before sending the transactions, forcing the test to pause before executing any transactions, resulting in a table not existing, that is attempted to be read for COUNT. This patch fixes this by no longer counting FDEs, but rather by programmatically waiting until the SQL thread has executed the transaction and then automatically activating the DEBUG_SYNC point to trigger at the next relay log FDE.
-
Tuukka Pasanen authored
There is no need for CMAKE_SYSTEM_PROCESSOR parameter in Debian build as dh_auto_configure should handle things better and more reliable
-
- 29 Jan, 2024 1 commit
-
-
Daniel Black authored
Noted by Eric X.
-
- 27 Jan, 2024 3 commits
- 26 Jan, 2024 2 commits
-
-
Brandon Nesterenko authored
A debug_sync signal could remain for the SQL thread that should have begun a wait_for upon seeing a GTID event, but would instead see the old signal and continue on without waiting. This broke an "idle" condition in SHOW SLAVE STATUS which should have automatically negated Seconds_Behind_Master. Instead, because the SQL thread had already processed the GTID event, it set sql_thread_caught_up to false, and thereby calculated the value of Seconds_behind_master, when the test expected 0. This patch fixes this by resetting the debug_sync state before creating a new transaction which sends a GTID event to the replica
-
Vladislav Vaintroub authored
-