summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge 10.2 into 10.3Marko Mäkelä2020-09-2116-110/+339
|\
| * MDEV-23776: Add the reduced encryption.create_or_replace testMarko Mäkelä2020-09-212-0/+101
| | | | | | | | This was forgotten in commit a9d8f5c1a55e03312211c637a1a916cc57573a73.
| * MDEV-23711 fixup: GCC -Og -Wmaybe-uninitializedMarko Mäkelä2020-09-211-1/+1
| |
| * MDEV-23776: Split encryption.create_or_replaceMarko Mäkelä2020-09-213-65/+2
| | | | | | | | | | | | | | | | Let us shrink the test encryption.create_or_replace so that it can run on the CI system, also on the embedded server. encryption.create_or_replace_big: Renamed from the original test, with the subset of encryption.create_or_replace omitted.
| * MDEV-23776 Test encryption.create_or_replace fails with a warningMarko Mäkelä2020-09-211-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | The test encryption.create_or_replace would occasionally fail with a warning message from fil_check_pending_ops(). fil_crypt_find_space_to_rotate(): While waiting for available I/O capacity, check fil_space_t::is_stopping() and release a handle if necessary. fil_space_crypt_close_tablespace(): Wake up the waiters in fil_crypt_find_space_to_rotate().
| * MDEV-23659 : Update Galera disabled.def fileJan Lindström2020-09-211-0/+1
| |
| * Fix try.Jan Lindström2020-09-213-5/+91
| |
| * MDEV-18867: Remove an orphan functionVlad Lesin2020-09-211-16/+0
| |
| * MDEV-23711 make mariabackup innodb redo log read error message more clearVlad Lesin2020-09-215-3/+117
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | log_group_read_log_seg() returns error when: 1) Calculated log block number does not correspond to read log block number. This can be caused by: a) Garbage or an incompletely written log block. We can exclude this case by checking log block checksum if it's enabled(see innodb-log-checksums, encrypted log block contains checksum always). b) The log block is overwritten. In this case checksum will be correct and read log block number will be greater then requested one. 2) When log block length is wrong. In this case recv_sys->found_corrupt_log is set. 3) When redo log block checksum is wrong. In this case innodb code writes messages to error log with the following prefix: "Invalid log block checksum." The fix processes all the cases above.
* | MDEV-23741: Fix the resultMarko Mäkelä2020-09-211-1/+1
| |
* | Merge 10.2 into 10.3Marko Mäkelä2020-09-2154-1750/+923
|\ \ | |/
| * MDEV-23751 : galera_3nodes test failures on ipv6 sst testsJan Lindström2020-09-184-8/+10
| | | | | | | | | | | | Fix assertion text it was too tight for some systems. This is backport from 10.4 and for Galera 3.
| * MDEV-23574 : galera_3nodes.galera_ipv6_mariabackup_section MTR failed: Could ↵Jan Lindström2020-09-1725-48/+60
| | | | | | | | | | | | not open '../galera/include/have_mariabackup.inc' Test case and configuration cleanup.
| * MDEV-21769 : `galera_3nodes.galera_safe_to_bootstrap` failsJan Lindström2020-09-173-3/+28
| | | | | | | | Add wait_condition to wait correct cluster configuration.
| * MDEV-21655 : galera.galera_wan_restart_ist MTR fails sporadically: WSREP did ↵Jan Lindström2020-09-162-33/+98
| | | | | | | | | | | | | | not transition to state READY Replace sleeps with proper wait_conditions to wait correct cluster configuration.
| * MDEV-19264 Better support MariaDB GTID for Mariabackup's --slave-info optionVlad Lesin2020-09-143-1/+125
| | | | | | | | | | | | Parse SHOW SLAVE STATUS output for the "Using_Gtid" column. If the value is "No", then old log file and position is backed up, otherwise gtid_slave_pos is backed up.
| * MDEV-20396 Server crashes after DELETE with SEL NULL Foreign key and aNikita Malyavin2020-09-143-23/+79
| | | | | | | | | | | | | | | | | | | | | | | | virtual column in index Problem: row_ins_foreign_fill_virtual was unconditionally set virtual fields to NULL even though the field is not a part of a foreign key (but a part of an index) Solution: The new virtual value should be computed with regard to cascade updates.
| * MDEV-23587 : galera_3nodes.galera_var_dirty_reads2 MTR failed: 1047: WSREP ↵Jan Lindström2020-09-112-6/+5
| | | | | | | | | | | | | | has not yet prepared node for application use Add wait_condition tomake sure insert is replicated and server is after isolation back on ready state.
| * MDEV-18867 Long Time to Stop and StartThirunarayanan Balathandayuthapani2020-09-111-3/+4
| | | | | | | | - Addressing ASAN failure in fts_check_aux_table()
| * MDEV-23101 : SIGSEGV in lock_rec_unlock() when Galera is enabledJan Lindström2020-09-106-156/+168
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove incorrect BF (brute force) handling from lock_rec_has_to_wait_in_queue and move condition to correct callers. Add a function to report BF lock waits and assert if incorrect BF-BF lock wait happens. wsrep_report_bf_lock_wait Add a new function to report BF lock wait. wsrep_assert_no_bf_bf_wait Add a new function to check do we have a BF-BF wait and if we have report this case and assert as it is a bug. lock_rec_has_to_wait Use new wsrep_assert_bf_wait to check BF-BF wait. lock_rec_create_low lock_table_create Use new function to report BF lock waits. lock_rec_insert_by_trx_age lock_grant_and_move_on_page lock_grant_and_move_on_rec Assert that trx is not Galera as VATS is not compatible with Galera. lock_rec_add_to_queue If there is conflicting lock in a queue make sure that transaction is BF. lock_rec_has_to_wait_in_queue Remove incorrect BF handling. If there is conflicting locks in a queue all transactions must wait. lock_rec_dequeue_from_page lock_rec_unlock If there is conflicting lock make sure it is not BF-BF case. lock_rec_queue_validate Add Galera record locking rules comment and use new function to report BF lock waits. All attempts to reproduce the original assertion have been failed. Therefore, there is no test case on this commit.
| * MDEV-18867 Long Time to Stop and StartThirunarayanan Balathandayuthapani2020-09-1011-1449/+285
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fts_drop_orphaned_tables() takes long time to remove the orphaned FTS tables. In order to reduce the time, do the following: - Traverse fil_system.space_list and construct a set of table_id,index_id of all FTS_*.ibd tablespaces. - Traverse the sys_indexes table and ignore the entry from the above collection if it exist. - Existing elements in the collection can be considered as orphaned fts tables. construct the table name from (table_id,index_id) and invoke fts_drop_tables(). - Removed DICT_TF2_FTS_AUX_HEX_NAME flag usage from upgrade. - is_aux_table() in dict_table_t to check whether the given name is fts auxiliary table fts_space_set_t is a structure to store set of parent table id and index id - Remove unused FTS function in fts0fts.cc - Remove the fulltext index in row_format_redundant test case. Because it deals with the condition that SYS_TABLES does have corrupted entry and valid entry exist in SYS_INDEXES.
| * MDEV-23706 : Galera test failure on galera_autoinc_sst_mariabackupJan Lindström2020-09-092-99/+67
| | | | | | | | Remove infinite procedure and use direct INSERTs.
* | MDEV-23741 Windows : error when renaming file in ALTER TABLEVladislav Vaintroub2020-09-173-3/+71
| | | | | | | | | | | | | | | | | | | | The presumed reason for the error is that the file was opened by 3rd party antivirus or backup program, causing ERROR_SHARING_VIOLATION on rename. The fix, actually a workaround, is to retry MoveFileEx couple of times before finally giving up. We expect 3rd party programs not to hold file for extended time.
* | Merge 10.2 into 10.3Marko Mäkelä2020-09-0917-152/+278
|\ \ | |/
| * MDEV-23456 fixup: Simplify a comparisonMarko Mäkelä2020-09-091-3/+2
| |
| * MDEV-22924 fixup: Replace C++11 autoMarko Mäkelä2020-09-091-1/+1
| |
| * MDEV-22924 fixup: Replace C++11 nullptrMarko Mäkelä2020-09-091-1/+1
| | | | | | | | Only starting with MariaDB Server 10.4 we may depend on C++11.
| * MDEV-23685 SIGSEGV on ADD FOREIGN KEY after failed ADD KEYMarko Mäkelä2020-09-093-1/+29
| | | | | | | | | | | | | | dict_foreign_qualify_index(): Reject corrupted or garbage indexes. For index stubs that are created on virtual columns, no dict_field_t::col would be assign. Instead, the entire table definition would be reloaded on a successful operation.
| * MDEV-23456 fixup: Fix mtr_t::get_fix_count()Marko Mäkelä2020-09-091-17/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | Before commit 05fa4558e0e82302ece981deabce764491464eb2 (MDEV-22110) we have slot->type == MTR_MEMO_MODIFY that are unrelated to incrementing the buffer-fix count. FindBlock::operator(): In debug builds, skip MTR_MEMO_MODIFY entries. Also, simplify the code a little. This fixes an infinite loop in the tests innodb.innodb_defragment and innodb.innodb_wl6326_big.
| * MDEV-23456 fil_space_crypt_t::write_page0() is accessing an uninitialized pageThirunarayanan Balathandayuthapani2020-09-0912-157/+240
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | buf_page_create() is invoked when page is initialized. So that previous contents of the page ignored. In few cases, it calls buf_page_get_gen() is called to fetch the page from buffer pool. It should take x-latch on the page. If other thread uses the block or block io state is different from BUF_IO_NONE then release the mutex and check the state and buffer fix count again. For compressed page, use the existing free block from LRU list to create new page. Retry to fetch the compressed page if it is in flush list fseg_create(), fseg_create_general(): Introduce block as a parameter where segment header is placed. It is used to avoid repetitive x-latch on the same page Change the assert to check whether the page has SX latch and X latch in all callee function of buf_page_create() mtr_t::get_fix_count(): Get the buffer fix count of the given block added by the mtr FindBlock is added to find the buffer fix count of the given block acquired by the mini-transaction
| * MDEV-22924 Corruption in MVCC read via secondary indexbb-10.2-MDEV-22924Marko Mäkelä2020-09-072-12/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An unsafe optimization was introduced by commit 2347ffd843b8e4ee9d8eaafab05368435db59ece (MDEV-20301) which is based on mysql/mysql-server@3f3136188f1bd383f77f97823cf6ebd72d5e4d7e or mysql/mysql-server@647a3814a91c3d3bffc70ddff5513398e3f37bd4 in MySQL 8.0.12 or MySQL 8.0.13 (which in turn is based on the contribution in MySQL Bug #84958). Row_sel_get_clust_rec_for_mysql::operator(): In addition to checking that the pointer to the record matches, also check the latest modification of the page (FIL_PAGE_LSN) as well as the page identifier. Only if all three match, it is safe to reuse cached_old_vers. Row_sel_get_clust_rec_for_mysql::check_eq(): Assert that the PRIMARY KEY of the cached old version of the record corresponds to the latest version. We got a test case where CHECK TABLE, UPDATE and purge would be hammering on the same table (with only 6 rows) and a pointer that was originally pointing to a record pk=2 would match a cached_clust_rec that was pointing to a record pk=1. In the diagnosed `rr replay` trace, we would wrongly return an old cached version of the pk=1 record, instead of retrieving the correct version of the pk=2 record. Because of this, CHECK TABLE would fail to count one of the records in a secondary index, and report failure. This bug appears to affect MVCC reads via secondary indexes only. The purge of history in secondary indexes uses a different code path, and so do checks for implicit record locks.
| * MDEV-7098 spider/bg.spider_fixes failed in buildbot with safe_mutex: Trying ↵Kentoku SHIBA2020-09-077-539/+1534
| | | | | | | | to unlock mutex conn->mta_conn_mutex that wasn't locked at storage/spider/spd_db_conn.cc, line 671
* | MDEV-7098 spider/bg.spider_fixes failed in buildbot with safe_mutex: Trying ↵Kentoku SHIBA2020-09-078-543/+1622
| | | | | | | | to unlock mutex conn->mta_conn_mutex that wasn't locked at storage/spider/spd_db_conn.cc, line 671
* | Merge 10.2 into 10.3Marko Mäkelä2020-09-042-3/+5
|\ \ | |/
| * MDEV-23600 follow-up: uninitialized rec_field_is_prefixMarko Mäkelä2020-09-041-3/+2
| | | | | | | | | | | | | | | | build_template_field(): Initialize templ->rec_field_is_prefix also for indexes on virtual columns. This was caught on 10.5 by MemorySanitizer as use-of-uninitialized-value in row_search_with_covering_prefix() when running the test main.fast_prefix_index_fetch_innodb.
| * Fix a typo in the previous csetSergei Petrunia2020-09-041-1/+1
| |
| * MDEV-23661: RocksDB produces "missing initializer for member" warningsSergei Petrunia2020-09-031-0/+3
| | | | | | | | Add -Wno-missing-field-initializers for MyRocks and gcc version below 5.0
* | MDEV-23651: Fix the Windows buildMarko Mäkelä2020-09-041-8/+8
| | | | | | | | In the Microsoft environment, my_atomic requires int32.
* | MDEV-23651 InnoDB: Failing assertion: !space->referenced()Marko Mäkelä2020-09-035-118/+128
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit de942c9f618b590a01a7960c171d7e50e435708f (MDEV-15983) introduced a race condition that we inadequately fixed in commit 93b69825adf5e55601ba44b4c89ec36ce62f8112 (MDEV-16169). Because fil_space_t::release() or fil_space_t::acquire() are not protected by fil_system.mutex like their predecessors, it is possible that stop_new_ops was set between the time a thread checked fil_space_t::is_stopping() and invoked fil_space_t::acquire(). In an execution trace, this happened in fil_system_t::keyrotate_next(), causing an assertion failure in fil_delete_tablespace() in the other thread that seeked to stop new operations. We fix this bug by merging the flag fil_space_t::stop_new_ops and the reference count fil_space_t::n_pending_ops into a single word that is only being accessed by atomic memory operations. fil_space_t::set_stopping(): Accessor for changing the state of the former stop_new_ops flag. fil_space_t::acquire(): Return whether the acquisition succeeded. It would fail between set_stopping(true) and set_stopping(false).
* | MDEV-21578 : CREATE OR REPLACE TRIGGER in Galera cluster not replicatingJan Lindström2020-09-031-3/+6
| | | | | | | | In 10.3 OR REPLACE trigger option is part of create_info.
* | Merge 10.2 into 10.3Marko Mäkelä2020-09-0367-1092/+1442
|\ \ | |/
| * Merge 10.1 into 10.2Marko Mäkelä2020-09-0311-23/+64
| |\
| | * MDEV-22387: Do not pass null pointer to some memcpy()Marko Mäkelä2020-09-035-9/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Passing a null pointer to a nonnull argument is not only undefined behaviour, but it also grants the compiler the permission to optimize away further checks whether the pointer is null. GCC -O2 at least starting with version 8 may do that, potentially causing SIGSEGV. These problems were caught in a WITH_UBSAN=ON build with the Bug#7024 test in main.view.
| | * MDEV-7110 follow-up fix: Do not pass NULL as nonnull parameterMarko Mäkelä2020-09-031-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Passing a null pointer to the "%s" argument of a printf-like function is undefined behaviour. In the GNU libc implementation of the printf() family of functions, it happens to work. GCC 10.2.0 would diagnose this with -Wformat-overflow -Og. In -fsanitize=undefined (WITH_UBSAN=ON) builds, a runtime error would be generated. In some other builds, GCC 8 or later might infer that the parameter is nonnull and optimize away further checks whether the parameter is null, leading to SIGSEGV.
| | * MDEV-23534: SIGSEGV in sf_malloc_usable_size/my_free on SET GLOBAL ↵Sujatha2020-09-025-14/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | REPLICATE_DO_TABLE Backporting fixes for: MDEV-22317: SIGSEGV in my_free/delete_dynamic in optimized builds (ARIA) Backported following commits from: 10.5.3 commit 77e1b0c39771f47bb2602530b8d1e584ac1d3731 -- Post push fix. commit 2e6b21be4a8d0bf094da288cadff866f1bb38062 MDEV-22059: MSAN report at replicate_ignore_table_grant Backported following commits from: 10.5.4 commit 840fb495ce2c0c00b20f2a9ba44b6fcc20c56118
| * | Increase mariabackup SST initial timeout to avoid timeouts.Jan Lindström2020-09-021-3/+4
| | |
| * | MDEV-23470 InnoDB: Failing assertion: cmp < 0 in ↵Thirunarayanan Balathandayuthapani2020-09-023-9/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | row_ins_check_foreign_constraint During insertion of clustered index, InnoDB does the check for foreign key constraints. Problem is that it uses the clustered index entry to search indexes of referenced tables and it could lead to unexpected result when there is no foreign index. Solution: ======== Rebuild the tuple based on foreign column names before searching it on reference index when there is no foreign index.
| * | innodb: osx build failure fixDaniel Black2020-09-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Build failure was: storage/innobase/os/os0proc.cc:144:3: error: use of undeclared identifier 'MEM_UNDEFINED' MEM_UNDEFINED(ptr, size); Assumed to be introduced in MDEV-20377 commit: c36834c8324974f26770d64192898f4f45d9f772
| * | Merge 10.1 into 10.2Marko Mäkelä2020-09-0117-686/+547
| |\ \ | | |/ | | | | | | This also fixes MDEV-20464.
| | * MDEV-23600 Division by 0 in row_search_with_covering_prefixMarko Mäkelä2020-09-0110-683/+439
| | | | | | | | | | | | | | | | | | | | | The InnoDB index fields store bytes, not characters. Remove some unnecessary conversions from characters to bytes. This also fixes MDEV-20422 and the wrong-result bug MDEV-12486.