- 16 Mar, 2022 2 commits
-
-
Marko Mäkelä authored
dict_get_and_save_data_dir_path(): Protect the operation with dict_table_t::lock_mutex and avoid unnecessary memory allocation.
-
Thirunarayanan Balathandayuthapani authored
- InnoDB purge waits at resume_FTS() while shutting down. This happens after altering the FTS innodb partition table. stop_FTS() has been called for each partition, but it calls resume_FTS() only once and it leads to hang during shutdown. This issue was introduced by commit 1bd681c8(MDEV-25506).
-
- 15 Mar, 2022 7 commits
-
-
Daniel Black authored
Uses 500M+ of memory by repeating an 8 byte sequence 62.5M times. Reduce the number of repeats on string reduced by 100 times. Tested by applying against the reverted MDEV-24909 code. 1000 times reduction was too much, but 100 still managed to trigger the bug.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
buf_flush_freed_pages(): Assert that neither buf_pool.mutex nor buf_pool.flush_list_mutex are held. Simplify the loops. Return the tablespace and the number of pages written or punched. buf_flush_LRU_list_batch(), buf_do_flush_list_batch(): Release buf_pool.mutex before invoking buf_flush_space(). buf_flush_list_space(): Acquire the mutexes only after invoking buf_flush_freed_pages(). Reviewed by: Thirunarayanan Balathandayuthapani
-
Marko Mäkelä authored
fil_space_t::try_to_close(): Tolerate a tablespace that has no data files attached. The function fil_ibd_create() initially creates and attaches a tablespace with no files, and invokes fil_space_t::add() later. fil_node_open_file(): After releasing and reacquiring fil_system.mutex, check if the file was already opened by another thread. This avoids an assertion failure !node->is_open() in fil_node_open_file_low(). These failures were reproduced with the test innodb.table_definition_cache_debug and the fix of MDEV-27985.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Hugo Wen authored
Commit 6c39eaeb made the crash recovery dependent on server_id. The crash recovery could fail when restoring a new instance from original crashed data directory USING A NEW SERVER ID. The issue doesn't exist in previous major versions before 10.6. Root cause is when generating the input XID to be searched in the hash, server id is populated with the current server id. So if the server id changed when recovering, the XID couldn't be found in the hash due to server id doesn't match. This fix is to use original server id when creating the input XID object in function `xarecover_do_commit_or_rollback`. All new code of the whole pull request, including one or several files that are either new files or modified ones, are contributed under the BSD-new license. I am contributing on behalf of my employer Amazon Web Services, Inc.
-
- 14 Mar, 2022 7 commits
-
-
Thirunarayanan Balathandayuthapani authored
- InnoDB fails to skip newly created column while checking for change column when table is in redundant row format. This issue is caused the MDEV-18035 (ccb1acbd)
-
Marko Mäkelä authored
-
Marko Mäkelä authored
Let us remove the redundant typedef. This problem was revealed by commit 77c184df
-
Marko Mäkelä authored
For some reason, the tests of the MemorySanitizer build on 10.5 failed with both clang 13 and clang 14 with SIGSEGV. On 10.6 where it worked better, some more places to work around were identified.
-
Sergei Golubchik authored
mysqltest allows leading spaces before `--`, so mtr should too
-
Marko Mäkelä authored
The MemorySanitizer implementation in clang includes some built-in instrumentation (interceptors) for GNU libc. In GNU libc 2.33, the interface to the stat() family of functions was changed. Until the MemorySanitizer interceptors are adjusted, any MSAN code builds will act as if that the stat() family of functions failed to initialize the struct stat. A fix was applied in https://reviews.llvm.org/rG4e1a6c07052b466a2a1cd0c3ff150e4e89a6d87a but it fails to cover the 64-bit variants of the calls. For now, let us work around the MemorySanitizer bug by defining and using the macro MSAN_STAT_WORKAROUND().
-
Marko Mäkelä authored
In commit 83212632 the trx_rseg_latch was instrumented for performance_schema, but some acqusitions of rd_lock() were not adjusted. Thus, the build would fail on platforms where a futex-based rw-lock is not available (SUX_LOCK_GENERIC) unless the code was built with cmake -DPLUGIN_PERFSCHEMA=NO.
-
- 12 Mar, 2022 4 commits
-
-
Sergei Golubchik authored
not every index-using plan sets bits in table->quick_keys. QUICK_ROR_INTERSECT_SELECT, for example, doesn't. Use the fact that select->quick is set instead. Also allow EXPLAIN to work.
-
Sergei Golubchik authored
fix two null pointer dereferences
-
Daniel Black authored
MDEV-27900 continued for uring. Also spell synchronously correctly in sql_parse.cc. Reviewed by Wlad.
-
Daniel Black authored
-
- 11 Mar, 2022 16 commits
-
-
Daniel Black authored
As btrfs showed, a partial read of data in AIO /O_DIRECT circumstances can really confuse MariaDB. Filipe Manana (SuSE)[1] showed how database programmers can assume O_DIRECT is all or nothing. While a fix was done in the kernel side, we can do better in our code by requesting that the rest of the block be read/written synchronously if we do only get a partial read/write. Per the APIs, a partial read/write can occur before an error, so reattempting the request will leave the caller with a concrete error to handle. [1] https://lore.kernel.org/linux-btrfs/CABVffENfbsC6HjGbskRZGR2NvxbnQi17gAuW65eOM+QRzsr8Bg@mail.gmail.com/T/#mb2738e675e48e0e0778a2e8d1537dec5ec0d3d3a Also spell synchronously correctly in other files.
-
Marko Mäkelä authored
Let us explicitly wait for purge before invoking a slow shutdown, so that instrumented builds (such as ASAN or UBSAN) will not exceed the 60-second timeout during shutdown.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
This fixes commit 77c184df.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
The virtual member function that was added in commit 1766a18e needs to be declared "override".
-
Thirunarayanan Balathandayuthapani authored
MDEV-28030 row_discard_tablespace_for_mysql() can unlock data dictionary without locking data dictionary - row_discard_tablespace_for_mysql() could unlock the data dictionary lock without locking it in the first place.
-
Thirunarayanan Balathandayuthapani authored
- During rollback of InnoDB DDL, it un-necessary removes the table from fts_optimize_wq. Removal of fts table from fts_optimize_wq when it has only one fulltext and it is being rollbacked.
-
Marko Mäkelä authored
Ever since commit 9608773f we no longer disable innodb_stats_persistent. Ever since commit 45a05fda updates of the InnoDB persistent statistics are covered by MDL.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
Externally kill and restart the server, and remove the unreliable crash_after_checkpoint.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
- 10 Mar, 2022 4 commits
-
-
Daniel Black authored
Per https://gcc.gnu.org/onlinedocs/gcc/PowerPC-Hardware-Transactional-Memory-Built-in-Functions.html The .. high level HTM interface .. is common between PowerPC and S/390 Reimplemented the transactional_lock_enabled() detection mechanism for s390x and POWER based on SIGILL. This also gives non-Linux based unixes the ability to use HTM. The implementation is based off openssl. (ref: https://github.com/openssl/openssl/blob/1c0eede9827b0962f1d752fa4ab5d436fa039da4/crypto/s390xcap.c#L104) The other ppc64{,le} problems with getauxvec based detection: * Checking PPC_FEATURE2_HTM_NOSC not needed as we do not do syscalls while in a transactional state. * As we don't use, and never should use PPC_FEATURE2_HTM_NO_SUSPEND, or do syscalls while in transactional state, don't test it. From: https://www.kernel.org/doc/html/v5.4/powerpc/syscall64-abi.html#transactional-memory S390x high level __builtin_tbegin functions in the htmxlintrin.h are not inline. This header file can be included once in the entire set of sources for a linked target, otherwise duplicate symbols occur. While we could use inline xabort/xend functions using the low level interface, we keep this the same as ppc64 for simplicity. SLES-15, gcc-7, appeared to want everything that included the htmlxlintrin to be compiled with -mhtm otherwise the __builtin_t{func} where not defined (in addition to a #ifdef __HTM__ #error). Debian sid gcc-11.2 wanted the same on ppc64le/ppc64. In general we want to avoid a wide spread use of architecture cflags as it makes justifications for selective optimizations easier. (ref: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1006702)
-
Marko Mäkelä authored
buf_page_get_low(): Assert that the block not be read-fixed. It may be write-fixed while we only hold a shared latch on the page. Page writes are protected by U latches, which are compatible with S. In all other places where we assert that the block not be IO-fixed, we are holding U or X latch, which does prevent concurrent file I/O.
-
Marko Mäkelä authored
-
Vlad Lesin authored
The first step for deprecating innodb_autoinc_lock_mode(see MDEV-27844) is: - to switch statement binlog format to ROW if binlog format is MIXED and the statement changes autoincremented fields - issue warnings if innodb_autoinc_lock_mode == 2 and binlog format is STATEMENT
-