- 31 Aug, 2021 8 commits
-
-
Marko Mäkelä authored
sym_tab_free_private(): Do not call dict_table_close(), but simply invoke dict_table_t::release(), which we can do without locking the whole dictionary cache. (Note: On user tables it may still be necessary to invoke dict_table_close(), so that InnoDB persistent statistics will be deinitialized as expected.) fts_check_corrupt(), row_fts_merge_insert(): Invoke aux_table->release() to simplify the code. This is never a user table. fts_que_graph_free(), fts_que_graph_free_check_lock(): Replaced with que_graph_free(). Reviewed by: Thirunarayanan Balathandayuthapani
-
Marko Mäkelä authored
In the parent commit, dict_sys.latch could theoretically have been replaced with a mutex. But, we can do better and merge dict_sys.mutex into dict_sys.latch. Generally, every occurrence of dict_sys.mutex_lock() will be replaced with dict_sys.lock(). The PERFORMANCE_SCHEMA instrumentation for dict_sys_mutex will be removed along with dict_sys.mutex. The dict_sys.latch will remain instrumented as dict_operation_lock. Some use of dict_sys.lock() will be replaced with dict_sys.freeze(), which we will reintroduce for the new shared mode. Most notably, concurrent table lookups are possible as long as the tables are present in the dict_sys cache. In particular, this will allow more concurrency among InnoDB purge workers. Because dict_sys.mutex will no longer 'throttle' the threads that purge InnoDB transaction history, a performance degradation may be observed unless innodb_purge_threads=1. The table cache eviction policy will become FIFO-like, similar to what happened to fil_system.LRU in commit 45ed9dd9. The name of the list dict_sys.table_LRU will become somewhat misleading; that list contains tables that may be evicted, even though the eviction policy no longer is least-recently-used but first-in-first-out. (Note: Tables can never be evicted as long as locks exist on them or the tables are in use by some thread.) As demonstrated by the test perfschema.sxlock_func, there will be less contention on dict_sys.latch, because some previous use of exclusive latches will be replaced with shared latches. fts_parse_sql_no_dict_lock(): Replaced with pars_sql(). fts_get_table_name_prefix(): Merged to fts_optimize_create(). dict_stats_update_transient_for_index(): Deduplicated some code. ha_innobase::info_low(), dict_stats_stop_bg(): Use a combination of dict_sys.latch and table->stats_mutex_lock() to cover the changes of BG_STAT_SHOULD_QUIT, because the flag is being read in dict_stats_update_persistent() while not holding dict_sys.latch. row_discard_tablespace_for_mysql(): Protect stats_bg_flag by exclusive dict_sys.latch, like most other code does. row_quiesce_table_has_fts_index(): Remove unnecessary mutex acquisition. FLUSH TABLES...FOR EXPORT is protected by MDL. row_import::set_root_by_heuristic(): Remove unnecessary mutex acquisition. ALTER TABLE...IMPORT TABLESPACE is protected by MDL. row_ins_sec_index_entry_low(): Replace a call to dict_set_corrupted_index_cache_only(). Reads of index->type were not really protected by dict_sys.mutex, and writes (flagging an index corrupted) should be extremely rare. dict_stats_process_entry_from_defrag_pool(): Only freeze the dictionary, do not lock it exclusively. dict_stats_wait_bg_to_stop_using_table(), DICT_BG_YIELD: Remove trx. We can simply invoke dict_sys.unlock() and dict_sys.lock() directly. dict_acquire_mdl_shared()<trylock=false>: Assert that dict_sys.latch is only held in shared more, not exclusive mode. Only acquire it in exclusive mode if the table needs to be loaded to the cache. dict_sys_t::acquire(): Remove. Relocating elements in dict_sys.table_LRU would require holding an exclusive latch, which we want to avoid for performance reasons. dict_sys_t::allow_eviction(): Add the table first to dict_sys.table_LRU, to compensate for the removal of dict_sys_t::acquire(). This function is only invoked by INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS. dict_table_open_on_id(), dict_table_open_on_name(): If dict_locked=false, try to acquire dict_sys.latch in shared mode. Only acquire the latch in exclusive mode if the table is not found in the cache. Reviewed by: Thirunarayanan Balathandayuthapani
-
Marko Mäkelä authored
This will essentially make dict_sys.latch a mutex (it is only acquired in exclusive mode). The subsequent commit will merge dict_sys.mutex into dict_sys.latch and reintroduce dict_sys.freeze() for those cases where we currently acquire only dict_sys.latch but not dict_sys.mutex. The case where both are acquired will be mapped to dict_sys.lock(). i_s_sys_tables_fill_table_stats(): Invoke dict_sys.prevent_eviction() and the new function dict_sys.allow_eviction() to avoid table eviction while a row in INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS is being produced. Reviewed by: Thirunarayanan Balathandayuthapani
-
Marko Mäkelä authored
row_purge_remove_clust_if_poss_low(): When dict_table_open_on_id() is being invoked with the data dictionary locked, it will not actually acquire MDL. Remove the MDL that became dead code in commit c366845a.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
- 30 Aug, 2021 4 commits
-
-
Vladislav Vaintroub authored
Change logic to only allocate purge thds at startup, or in pre-shutdown (for slow shutdown).
-
Marko Mäkelä authored
THD::copy_db_to(): Always return true if the output parameter was left uninitialized. This fixes a regression that was caused by commit 7d0d934c (MDEV-16473). MariaDB Server 10.3 and later were unaffected by this bug thanks to commit a7e352b5. Possibly this bug only affects mysql_list_fields() in the Embedded Server (libmysqld). This bug was found by GCC 11.2.0 in CMAKE_BUILD_TYPE=RelWithDebInfo.
-
Marko Mäkelä authored
init_mutex_v1_t: Stop lying that the mutex parameter is const. GCC 11.2.0 assumes that it is and could complain about any mysql_mutex_t being uninitialized even after mysql_mutex_init() as long as PLUGIN_PERFSCHEMA is enabled. init_rwlock_v1_t, init_cond_v1_t: Remove untruthful const qualifiers. Note: init_socket_v1_t is expecting that the socket fd has already been created before PSI_SOCKET_CALL(init_socket), and therefore that parameter really is being treated as a pointer to const.
-
Marko Mäkelä authored
-
- 29 Aug, 2021 1 commit
-
-
Sergei Golubchik authored
if all options from a combination from the combinations file are already present in the server's list of options, then don't try to run tests in other combinations from this file. old behavior was: if at least one option from a combination is already present in the list...
-
- 28 Aug, 2021 2 commits
-
-
Sergei Golubchik authored
(this was needed only for tokudb that bundled liblzma)
-
Sergei Golubchik authored
-
- 27 Aug, 2021 1 commit
-
-
Alexey Bychko authored
replaced CPACK_RPM_PACKAGE_VERSION with SERVER_VERSION. CPACK_* variables are empty and can't be used until INCLUDE(CPack) is called. SERVER_VERSION is the safest option because other variables may be overwritten from submodules
-
- 26 Aug, 2021 6 commits
-
-
Sergei Golubchik authored
-
Daniel Black authored
Thanks to Theodore Brockman on Zulip for noticing on an OSX ARM64 and testing this patch. Per https://github.com/google/cpu_features/pull/150/files CMAKE_SYSTEM_PROCESSOR is arm64 on Apple. Without this, compulation error: [ 80%] Building CXX object storage/rocksdb/CMakeFiles/rocksdblib.dir/rocksdb/util/crc32c.cc.o /mariadb/storage/rocksdb/rocksdb/util/crc32c.cc:500:18: error: use of undeclared identifier 'isSSE42' has_fast_crc = isSSE42(); ^ /mariadb/storage/rocksdb/rocksdb/util/crc32c.cc:1230:7: error: use of undeclared identifier 'isSSE42' if (isSSE42()) { ^ /mariadb/storage/rocksdb/rocksdb/util/crc32c.cc:1231:9: error: use of undeclared identifier 'isPCLMULQDQ' if (isPCLMULQDQ()) { ^ This can be reverted when the RocksDB submodule is updated. https://github.com/facebook/rocksdb/commit/ee4bd4780b321ddb5f92a0f4eb956f2a2ebd60dc
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Michael Widenius authored
The problem was that a PREARE followed by a non prepared statement using DEFAULT NEXT_VALUE() could change table->next_local to point to a not persitent memory aria. The next EXECUTE would then try to use the wrong pointer, which could cause a crash. Fixed by reseting the pointer to it's old value when doing EXECUTE.
-
Michael Widenius authored
Backported patch from MariaDB 10.6 The issue was that the using session_mem_used to break a test does not guarantee where the test breaks, which gives different results depending on the environment or how MariaDB is compield.
-
- 25 Aug, 2021 10 commits
-
-
Sergei Golubchik authored
Buggy sepdebugcrcfix in CentOS 7 (rpm-4.11.3) does not restore SUID bit after editing the binary. This is fixed in rpm-4.12. Still let's not set SUID bit when installing auth_pam_tool and use rpm spec %attr directive instead.
-
Marko Mäkelä authored
In a rebase of the merge, two preceding commits were accidentally reverted: commit 112b2396 (MDEV-26308) commit ac2857a5 (MDEV-25717) Thanks to Daniele Sciascia for noticing this.
-
Marek Kulik authored
Changes: - Don't include port in connection parameters with 'localhost' hostname More info: The hostname, if not specified or specified as '' or 'localhost', will default to a MySQL server running on the local machine using the default for the UNIX socket. To connect to a MySQL server on the local machine via TCP, you must specify the loopback IP address (127.0.0.1) as the host. To comply with what the perl module expects, we omit the port for a host=localhost connection. Reported issue: https://bugzilla.redhat.com/show_bug.cgi?id=1976224
-
Marek Kulik authored
FLUSH PRIVILEGES hasn't been needed for very many years.
-
Marek Kulik authored
Changes: - Don't include port in connection parameters with 'localhost' hostname More info: The hostname, if not specified or specified as '' or 'localhost', will default to a MySQL server running on the local machine using the default for the UNIX socket. To connect to a MySQL server on the local machine via TCP, you must specify the loopback IP address (127.0.0.1) as the host. Reported issue: https://bugzilla.redhat.com/show_bug.cgi?id=1976224
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
- 24 Aug, 2021 2 commits
-
-
Daniel Black authored
Currently @@version_compile_machine is used by mtr to determine if the compiled executable is 32 or 64 bits. We extend that logic by ensuring that if the DEFAUT_MACHINE name doesn't have "64" in its string, "-64bits" is appended to ensure these test pass.
-
Michael Widenius authored
-
- 23 Aug, 2021 6 commits
-
-
Marko Mäkelä authored
trx_purge_rseg_get_next_history_log(): Fix a race condition that was introduced in commit e46f76c9 (MDEV-15912). The buffer pool page contents must not be accessed while not holding a page latch. The page latch was released by mtr_t::commit(). This race resulted in an ASAN heap-use-after-poison during a stress test.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Eugene Kosov authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-