- 14 Apr, 2021 6 commits
-
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
- 13 Apr, 2021 9 commits
-
-
Julius Goryavsky authored
Part #2, specifically for the 10.5+ branch: The auto-increment parameters can change sporadically during the execution of the mtr test "galera_vote_rejoin_ddl", causing it to fail. This patch creates an environment where unpredictable changes to these auto-increment settings do not occur during the test.
-
Sergei Golubchik authored
also add =WARN as an alias for =OFF and clarify the help text
-
Marko Mäkelä authored
In commit d25f806d (MDEV-22749) the CRC-32C implementation of MariaDB was broken on some IA-32 and AMD64 builds, depending on the compiler version and build options. This was verified for IA-32 on GCC 10.2.1. Even though we try to identify the SSE4.2 extensions and the availaibility of the PCLMULQDQ instruction by executing CPUID, the fall-back code could be generated with extended instructions, because the entire file mysys/crc32/crc32c.c was being compiled with -msse4.2 -mpclmul. This would cause SIGILL on a PINSRD instruction on affected IA-32 targets (such as some Intel Atom processors). This might also affect old AMD64 processors (predating the 2007 Intel Nehalem microarchitecture), if some compiler chose to emit the offending instructions. While it is fine to pass a target-specific option to a target-specific compilation unit (like -mpclmul to a PCLMUL-specific compilation unit), that is not safe for mixed-architecture compilation units. For mixed-architecture compilation units, the correct way is to set target attributes on the target-specific functions. There does not seem to be a way to pass target attributes to function template instantiation. Hence, we must replace the ExtendImpl template with plain functions crc32_sse42() and crc32_slow(). We will also remove some inconsistency between my_crc32_implementation() and mysys_namespace::crc32::Choose_Extend(). The function crc32_pclmul_enabled() will be moved to mysys/crc32/crc32c.cc so that the detection code will be compiled without -msse4.2 -mpclmul. The AMD64 PCLMUL accelerated crc32c_3way() will be moved to a new file crc32c_amd64.cc. In this way, only a few functions that depend on -msse4.2 in mysys/crc32/crc32c.cc can be declared with __attribute__((target("sse4.2"))), and most of the file can be compiled for the generic target. Last, the file mysys/crc32ieee.cc will be omitted on 64-bit POWER, because it was dead code (no symbols were exported). Reviewed by: Vladislav Vaintroub
-
sjaakola authored
After the merging of MDEV-24915, 10.6 branch has regressions with handling of concurrent write load against two or more cluster nodes. These regressions may surface as cluster hanging, node crashes or data inconsistency. With some test scenarios, the only visible symptom could be that the BF victim aborting happens only by innodb lock wait timeout expiration. This would result only to poor performance (by default 50 sec hang for each BF conflict), and could be somewhat difficult to diagnose. This pull request has following fixes to handle concurrent write load from multiple nodes: In lock_wait_wsrep_kill(), the victim trx was expected to be only in TRX_STATE_ACTIVE state. With the delayed BF conflict handling, it can happen that victim has advanced into pre commit state. This was fixed by choosing victim both in TRX_STATE_ACTIVE and TRX_STATE_PREPARED states. Victim transaction may be in several different states at the time of detected lock conflict, and due to delayed BF aborting practice in MDEV-24915, the victim may advance further before the actual BF aborting takes place. The BF aborting in MDEV-24915 did not wake the victim, if it was in the state of waiting for some other lock (than the one that was blocking the high priority thread). This anomaly caused the innodb lock wait timeout expiration delays and poor performance symptom. To fix this, lock_wait_wsrep_kill() now looks if victim is in lock waiting state, and uses lock_cancel_waiting_and_release() to cancel this lock wait. wsrep_bf_abort() checks if the victim has active transaction (in wsrep-lib), and starts a new transaction if there was no active transaction before. Due to late BF aborting, the victim may have e.g. failed in certification and is already aborting or has aborted at this stage. This has caused problems in testing where BF aborter tries to BF abort himself. The fix in wsrep_bf_abort() now skips the BF abort, if victim is aborting or has aborted. Victim may not have started transaction yet in wsrep context, but it may have acquired MDL locks (due to DDL execution), and this has caused BF conflict. Such case does not require aborting in wsrep or replication provider state. BF aborting could cause BF-BF conflict scenario, if victim was already aborted and changed to replayer having high priority as well. This BF-BF conflict scenario is now avoided in lock_wait_wsrep() where we now check if blocking lock holder is also high priority and is ordered before, caller should wait for the lock in this situation. The natural innodb deadlock resolving algorithm could pick BF thread as deadlock victim. This is fixed by giving max weigh to BF threads in Deadlock::report(). MDEV-24341 has changed excution paths in do_command() and this affects BF aborted victim execution. This PR fixes one assert in do_command(): DBUG_ASSERT(!thd->async_state.pending_ops()) Which fired if the thd was BF aborted earlier. This assert is now changed to allow pending_ops() if thd was BF aborted before. With these fixes, long term highly conflicting write load could be run against to node cluster. If binlogging is configured, log_slave_updates should be also set.
-
Anel Husakovic authored
- Commit 5cc2096f introduced in `10.5` changed DBI:DBD to DBD:MariaDB in this case with redudant `mysql` option. - According to database handle (dbh) and `connect` method one should follow https://metacpan.org/pod/DBD::MariaDB#Class-Methods with proper created data source name (dsn). - Adding socket precedance over port. - Adding skipping the comments when reading the `my.cnf` file. - MDEV-23016: mariadb-setpermission included
-
Marko Mäkelä authored
Between btr_pcur_store_position() and btr_pcur_restore_position() it is possible that purge empties a table and enlarges index->n_core_fields and index->n_core_null_bytes. Therefore, we must cache index->n_core_fields in btr_pcur_t::old_n_core_fields so that btr_pcur_t::old_rec can be parsed correctly. Unfortunately, this is a huge change, because we will replace "bool leaf" parameters with "ulint n_core" (passing index->n_core_fields, or 0 for non-leaf pages). For special cases where we know that index->is_instant() cannot hold, we may also pass index->n_fields.
-
Marko Mäkelä authored
-
Thirunarayanan Balathandayuthapani authored
- Fixing post-fix failure. In clean_new_vcol_index(), InnoDB has the wrong offset to store the virtual column
-
Dmitry Shulga authored
MDEV-25197: The statement set password=password('') executed in PS mode fails in case it is run by a user with expired password A user connected to a server with an expired password can't change password with the statement "SET password=..." if this statement is run in PS mode. In mentioned use case a user gets the error ER_MUST_CHANGE_PASSWORD on attempt to run the statement PREPARE stmt FOR "SET password=..."; The reason of failure to reset password by a locked user using the statement PREPARE stmt FOR "SET password=..." is that PS-related statements are not listed among the commands allowed for execution by a user with expired password. However, simple adding of PS-related statements (PREPARE FOR/EXECUTE/DEALLOCATE PREPARE ) to the list of statements allowed for execution by a locked user is not enough to solve problems, since it opens the opportunity for a locked user to execute any statement in the PS mode. To exclude this opportunity, additional checking that the statement being prepared for execution in PS-mode is the SET statement has to be added. This extra checking has been added by this patch into the method Prepared_statement::prepared() that executed on preparing any statement for execution in PS-mode.
-
- 12 Apr, 2021 10 commits
-
-
Dmitriy Karpovskiy authored
MDEV-24135: Print warnings in XML, save test retries in XML, save the combinations in XML, replace the special symbols in the XML comment
-
Alexander Barkov authored
-
Monty authored
Assert was: mariadbd: /my/maria-10.6/wsrep-lib/src/client_state.cpp:256: int wsrep::client_state::after_statement(): Assertion `state() == s_exec' The reason was because of two faults: - A missing test for WSREP(thd) when checking wsrep_after_statement(() - THD->wsrep_cs().state was set to s_idle instead of s_none
-
Oleksandr Byelkin authored
At the second execution of the PS 1. mark_as_dependent() is called with the same parameters as at the first execution (select#4 and select#3) 2. as outer_select (select#3) has been already merged at the first execution of PS it cannot be reached using the outer_select() function anymore (and so can not stop iteration). 3. as a result all selects towards the top level select including the select for 'ca' are marked as uncacheable. 4. Marked uncacheable it executed incorrectly triggering filling its temporary table several times and using freed memory at the end. To avoid the problem we use name resolution context to go "up". NOTE: problem also exists in 10.2 but has no visible effect on execution. That is why the problem is fixed in 10.2. The patch also add debug logging of important procedures and better specify parameters types of st_select_lex::mark_as_dependent.
-
Dmitry Shulga authored
MDEV-25108: Running of the EXPLAIN EXTENDED statement produces extra warning in case it is executed in PS (prepared statement) mode The EXPLAIN EXTENDED statement run as a prepared statement can produce extra warning comparing with a case when EXPLAIN EXTENDED statement is run as a regular statement. For example, the following test case CREATE TABLE t1 (c int); CREATE TABLE t2 (d int); EXPLAIN EXTENDED SELECT (SELECT 1 FROM t2 WHERE d = c) FROM t1; produces the extra warning "Field or reference 'c' of SELECT #2 was resolved in SELECT #1" in case the above mentioned "EXPLAIN EXTENDED" statement is executed in PS mode, that is by submitting the following statements: PREPARE stmt FROM "EXPLAIN EXTENDED SELECT (SELECT 1 FROM t2 WHERE d = c) FROM t1"; EXECUTE stmt; The reason of the extra warning emittion is in a way items are handled (being fixed) during execution of the JOIN::prepare() method. The method Item_field::fix_fields() calls the find_field_in_tables() function in case a field hasn't been associated yet with the item. Implementation of the find_field_in_tables() function first checks whether a table containing the required field was already opened and cached. It is done by checking the data member item->cached_table. This data member is set on handling the PRERARE FROM statement and checked on executing the EXECUTE statement. If the data member item->cached_table is set the find_field_in_tables() function invoked and the mark_select_range_as_dependent() function called if the field is an outer referencee. The mark_select_range_as_dependent() function calls the mark_as_dependent() function that finally invokes the push_warning_printf() function that produces extra warning. To fix the issue, calling of push_warning_printf() is elimited in case it was run indirectly in result of hanlding already opened table from the Item_field::fix_fields() method.
-
Julius Goryavsky authored
This commit removes the mtr test galera_sst_mariabackup_encrypt_with_key from the list of disabled tests because the problem with it has already been fixed.
-
Thirunarayanan Balathandayuthapani authored
Problem: ======== InnoDB fails to clean the index stub if it fails to add the virtual index which contains new virtual column. But it clears the newly virtual column from index in clear_added_indexes() during inplace_alter_table. On commit, InnoDB evicts and reload the table. In case of rollback, it doesn't happen. InnoDB clears the ABORTED index while opening the table or doing the DDL. In the mean time, InnoDB can access the dropped virtual index columns while creating prebuilt or rollback of concurrent DML. Solution: ========== (1) InnoDB should maintain newly added virtual column while rollbacking the newly added virtual index. (2) InnoDB must not defer the index removal if the alter table is executed with LOCK=EXCLUSIVE. (3) For LOCK=SHARED, InnoDB should check whether the table has any other transaction lock other than alter transaction before deferring the index stub. Replaced has_new_v_col with dict_add_vcol_info in dict_index_t to indicate whether the index has any new virtual column. dict_index_t::has_new_v_col(): Returns whether the index has newly added virtual column, it doesn't say which columns are newly added virtual column ha_innobase_inplace_ctx::is_new_vcol(): Return whether the given column is added as a part of the current alter. ha_innobase_inplace_ctx::clean_new_vcol_index(): Copy the newly added virtual column to new_vcol_info in dict_index_t. Replace the column in the index fields with virtual column stored in new_vcol_info. dict_index_t::assign_new_v_col(): Store the number of virtual column added in index as a part of alter table. dict_index_t::get_n_new_vcol(): Get the number of newly added virtual column dict_index_t::assign_drop_v_col(): Allocate the memory for adding new virtual column in new_vcol_info. dict_index_t::add_drop_v_col(): Add the newly added virtual column in new_vcol_info. dict_table_t::has_lock_for_other_trx(): Whether the table has any other transaction lock than given transaction. row_merge_drop_indexes(): Add parameter alter_trx and check whether the table has any other lock than alter transaction.
-
Marko Mäkelä authored
When a table has been evicted from dict_sys and reloaded internally by InnoDB for FOREIGN KEY processing, statistics may not be initialized, but nevertheless row_update_cascade_for_mysql() could invoke dict_stats_update_if_needed(). In that case, we cannot really update the statistics. For tables that have STATS_PERSISTENT=1 and STATS_AUTO_RECALC=1, ANALYZE TABLE might have to be executed later. dict_stats_update_if_needed(): Replace the assertion with a conditional early return.
-
Marko Mäkelä authored
trx_sys_any_active_transactions(): Remove a bogus debug assertion. In trx_commit_in_memory() and trx_erase_lists(), we will remove the transaction from trx_sys->rw_trx_list and set the state to TRX_STATE_COMMITTED_IN_MEMORY.
-
Otto Kekäläinen authored
MariaDB Server still supports Ubuntu 16.04 "Xenial" until it goes EOL in April 30, 2021. Thus we need to include a customization for backwards compatibility. This change is intended to be applied for all MariaDB versions still supported, i.e. 10.2 to 10.6.
-
- 11 Apr, 2021 6 commits
-
-
Julius Goryavsky authored
The auto-increment variables may change intermittently during the execution of some tests from the Galera mtr suite, causing these tests to fail. This patch creates conditions in which unpredictable changes to these variables are not possible during the execution of those tests in which this problem is noticed or their values are restored before the end of testing.
-
Julius Goryavsky authored
SST scripts for Galera should use the new mariabackup interface instead of the innobackupex interface, which is currently only supported for compatibility reasons. This commit converts the SST script for mariabackup to use the new interface. It does not need separate tests, as any problems will be seen as failures when running multiple tests for the mariabackup-based SST.
-
Otto Kekäläinen authored
Touch attribute file to fix errors like: Can't open ./demoCA/index.txt.attr for reading, No such file or directory 140553384993216:error:02001002:system library: fopen:No such file or directory:../crypto/bio/bss_file.c:72: fopen('./demoCA/index.txt.attr','r') 140553384993216:error:2006D080:BIO routines: BIO_new_file:no such file:../crypto/bio/bss_file.c:79: Check that the request matches the signature
-
Julius Goryavsky authored
change after MDEV-24197)
-
Julius Goryavsky authored
problems with ambiguous options in the future.
-
Julius Goryavsky authored
This patch fixes an issue with launching mariabackup during SST (when used with Galera), when during bootstrap mariabackup receives the "--innodb" option, which is incorrectly interpreted as shortcut for "--innodb-force-recovery". This patch does not require separate test for mtr, as the problem is visible in general testing on buildbot.
-
- 10 Apr, 2021 1 commit
-
-
Daniel Black authored
This reverts commit 51630d59. Monty has more comprehensive fix coming in his branch.
-
- 09 Apr, 2021 5 commits
-
-
Daniel Black authored
Move skip_locked near other bools
-
Thirunarayanan Balathandayuthapani authored
table name for fts diagnostics
-
Marko Mäkelä authored
-
Thirunarayanan Balathandayuthapani authored
-
Marko Mäkelä authored
In commit 8ea923f5 (MDEV-24818) when we optimized multi-statement INSERT transactions into empty tables, we would roll back the entire transaction on any error. But, we would fail to invalidate any SAVEPOINT that had been requested in the past. trx_t::savepoints_discard(): Renamed from trx_roll_savepoints_free(). row_mysql_handle_errors(): If we were in bulk insert, invoke trx_t::savepoints_discard(). In this way, a future attempt of ROLLBACK TO SAVEPOINT will return an error.
-
- 08 Apr, 2021 3 commits
-
-
Daniel Black authored
This fixes the MariaDB-client RPM to conflict with < MariaDB-server-10.6 as a number of files where moved from the server to client component. see commits 09202b2e -> fa0ad2fb
-
Marko Mäkelä authored
In commit 8ea923f5 (MDEV-24818) when we optimized multi-statement INSERT into an empty table, we would sometimes wrongly enable bulk insert into a table that is actually already using row-level locking and undo logging. trx_has_lock_x(): New predicate, to check if the transaction of the current thread is holding an exclusive lock on a table. trx_undo_report_row_operation(): Only invoke trx_mod_table_time_t::start_bulk_insert() if trx_has_lock_x() holds.
-
Sergei Petrunia authored
Handle "col<>const" in the same way that MDEV-21958 did for "col NOT IN(const-list)": do not use the condition for range/index_merge accesses if there is a unique UNIQUE KEY(col). The testcase is in main/range.test. The rest of test updates are due to widespread use of 'pk<>1' in the testsuite. Changed the test to use different but equivalent forms of the conditions.
-