summaryrefslogtreecommitdiff
path: root/storage
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-24600 fixup: Remove unused trx_register_for_2pc()Marko Mäkelä2021-03-051-12/+0
|
* Merge 10.4 into 10.5Marko Mäkelä2021-03-056-46/+41
|\
| * Remove unused HA_EXTRA_FAKE_START_STMTMarko Mäkelä2021-03-052-7/+0
| | | | | | | | This is fixup for commit f06a0b5338694755842a58798bb3a9a40da78bfd.
| * Merge 10.3 into 10.4Marko Mäkelä2021-03-055-39/+41
| |\
| | * MDEV-24811 Assertion find(table) failed with innodb_evict_tables_on_commit_debugMarko Mäkelä2021-03-032-46/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a backport of commit 18535a402817d8a2b8452df0f75c15dda9199acb from 10.6. lock_release(): Implement innodb_evict_tables_on_commit_debug. Before releasing any locks, collect the identifiers of tables to be evicted. After releasing all locks, look up for the tables and evict them if it is safe to do so. trx_commit_in_memory(): Invoke trx_update_mod_tables_timestamp() before lock_release(), so that our locks will protect the tables from being evicted.
| | * Merge 10.2 into 10.3Marko Mäkelä2021-03-031-2/+3
| | |\
| | | * MDEV-24532 Table corruption ER_NO_SUCH_TABLE_IN_ENGINE .. on table with ↵Monty2021-03-021-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | foreign key When doing a truncate on an Innodb under lock tables, InnoDB would rename the old table to #sql-... and recreate a new 't1' table. The table lock would still be on the #sql-table. When doing ALTER TABLE, Innodb would do the changes on the #sql table (which would disappear on close). When the SQL layer, as part of inline alter table, would close the original t1 table (#sql in InnoDB) and then reopen the t1 table, Innodb would notice that this does not match it's own (old) t1 table and generate an error. Fixed by adding code in truncate table that if we are under lock tables and truncating an InnoDB table, we would close, reopen and lock the table after truncate. This will remove the #sql table and ensure that lock tables is using the new empty table. Reviewer: Marko Mäkelä
| | * | Fixed printing of wring filname "maria_open" in maria.maria-recovery2.testMonty2021-03-012-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | eprintf() was missing a va_start(), which caused wrong filename to be printed when printing recovery trace. Added also missing new line when printing "Table is crashed" to trace file
* | | | MDEV-25018 [FATAL] InnoDB: Unable to read page (of a dropped tablespace)bb-10.5-MDEV-25018Thirunarayanan Balathandayuthapani2021-03-031-24/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - This issue is caused by commit deadec4e689c9435e20ebb89fd8f84d3f0f90ff3 (MDEV-24569). InnoDB fails to read the change buffer bitmap page from dropped tablespace. In ibuf_bitmap_get_map_page_func(), InnoDB should fetch the page using BUF_GET_POSSIBLY_FREED mode. Callers of ibuf_bitmap_get_map_page() should be adjusted in that case.
* | | | MDEV-24863 AHI entries mismatch with the index while reloading the evicted ↵Thirunarayanan Balathandayuthapani2021-03-031-10/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tables. This is after-merge fix of f33e57a9e66f7e1790cb84b141381bb668e281a0. In btr_search_drop_page_hash_index(), InnoDB should take the exclusive lock on the AHI latch if index is already freed to avoid the freed memory access during buf_pool_resize()
* | | | MDEV-25026 Various code paths are accessing freed pagesbb-10.5-MDEV-25026Marko Mäkelä2021-03-025-10/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test case encryption.innodb_encrypt_freed was failing in MemorySanitizer builds. recv_recover_page(): Mark non-recovered pages as freed. fil_crypt_rotate_page(): Before comparing the block->frame contents, check if the block was marked as freed. Other places: Whenever using BUF_GET_POSSIBLY_FREED, check the block->page.status before accessing the page frame. (Both uses of BUF_GET_IF_IN_POOL should be correct now.)
* | | | MDEV-24997 Assertion mtr->is_named_space(page_id.space()) in ibuf0ibuf.cc:624Thirunarayanan Balathandayuthapani2021-02-261-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - This is caused by commit deadec4e689c9435e20ebb89fd8f84d3f0f90ff3 (MDEV-24569). InnoDB fails to set the tablespace associated with mini-transacton while resetting the change buffer bitmap bits of the page.
* | | | Merge remote-tracking branch 'origin/10.4' into 10.5Daniel Black2021-02-263-15/+15
|\ \ \ \ | |/ / /
| * | | MDEV-24967 : Signal 11 on ha_innodb.cc::bg_wsrep_kill_trx line 18611Jan Lindström2021-02-241-4/+6
| | | | | | | | | | | | | | | | | | | | Null poiter reference in case where bf_thd has no trx .e.g. when we have MDL-conflict.
| * | | MDEV-20857: perf schema conflict name filename_hashDaniel Black2021-02-243-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | filename_hash is a function from libiberty.a from the system but also an expored name in the perf schema static library. We'll use a different name.
* | | | MDEV-24967 : Signal 11 on ha_innodb.cc::bg_wsrep_kill_trx line 18611Jan Lindström2021-02-241-4/+6
| | | | | | | | | | | | | | | | | | | | Null poiter reference in case where bf_thd has no trx .e.g. when we have MDL-conflict.
* | | | Merge 10.4 into 10.5Marko Mäkelä2021-02-241-3/+4
|\ \ \ \ | |/ / /
| * | | Merge 10.3 into 10.4Marko Mäkelä2021-02-231-2/+1
| |\ \ \ | | |/ /
| | * | Merge 10.2 into 10.3Marko Mäkelä2021-02-231-2/+1
| | |\ \ | | | |/
| | | * MDEV-24913 Assertion !recv_no_log_write in log_write_up_to()Thirunarayanan Balathandayuthapani2021-02-231-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - The commit 5fd3c7471e3e0673b50d309567c9747d36f09412(MDEV-24709) resets the recv_no_ibuf_operations in recv_recovery_from_checkpoint_start(), but InnoDB fails to reset the variable recv_no_log_write() during that time and that leads to the assert failure.
* | | | Merge branch '10.4' into 10.5Sergei Golubchik2021-02-235-10/+72
|\ \ \ \ | |/ / /
| * | | Merge branch '10.3' into 10.4Sergei Golubchik2021-02-235-20/+98
| |\ \ \ | | |/ /
| | * | Merge branch '10.2' into 10.3Sergei Golubchik2021-02-226-21/+99
| | |\ \ | | | |/
| | | * Merge branch 'bb-10.2-release' into 10.2Sergei Golubchik2021-02-2214-306/+500
| | | |\
| | | * | MDEV-24863 AHI entries mismatch with the index while reloading the evicted ↵Thirunarayanan Balathandayuthapani2021-02-221-14/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tables. - This is caused by commit ad6171b91cac33e70bb28fa6865488b2c65e858c (MDEV-22456). InnoDB reloads the evicted table again from dictionary. In that case, AHI entries and current index object mismatches happens. When index object mismatches then InnoDB should drop the page hash AHI entries for the block. In btr_search_drop_page_hash_index(), InnoDB should take exclusive lock on the AHI latch if index is already freed to avoid the freed memory access during buf_pool_resize()
| | | * | MDEV-24873 : galera.galera_as_slave_ctas MTR failed: Assertion ↵Jan Lindström2021-02-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `(&(&LOCK_thd_data)->m_mutex)->count > 0 && pthread_equal(pthread_self(), (&(&LOCK_thd_data)->m_mutex)->thread)' failed in sql_class.cc on THD::awake(killed_state) Problem was that thd::awake assumes now that you hold THD::LOCK_thd_data so we need to keep it when we call wsrep_thd_awake from wsrep_abort_transaction.
| | | * | MDEV-24763 ALTER TABLE fails to rename a column in SYS_FIELDSMarko Mäkelä2021-02-121-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | innobase_rename_column_try(): When renaming SYS_FIELDS records for secondary indexes, try to use both formats of SYS_FIELDS.POS as keys, in case the PRIMARY KEY includes a column prefix. Without this fix, an ALTER TABLE that renames a column followed by a server restart (or LRU eviction of the table definition from dict_sys) would make the table inaccessible.
| | | * | MDEV-24790 CAST('0e1111111111' AS DECIMAL(38,0)) returns a wrong resultAlexander Barkov2021-02-081-3/+2
| | | | |
| | | * | Updating test results in rocksdb test suite after MDEV-11172 is fixedVarun Gupta2021-02-013-5/+5
| | | | |
| * | | | Merge branch 'bb-10.4-release' into 10.4Sergei Golubchik2021-02-23147-2503/+19080
| |\ \ \ \
| * | | | | MDEV-24792 Assertion `!newest_lsn || fil_page_get_type(page)' failed upon ↵Vlad Lesin2021-02-142-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MariaBackup prepare in buf_flush_init_for_writing with innodb_log_optimize_ddl=off fsp_free_page() writes MLOG_INIT_FREE_PAGE, but does not update page type. But fil_crypt_rotate_page() checks the type to understand if the page is freshly initialized, and writes dummy record(updates space id) to force rotation during recovery. This dummy record causes assertion crash when the page is flushed after recovery, as it's supposed that pages LSN is 0 for freshly initialized pages. The bug is similiar to MDEV-24695, the difference is that in 10.5 the assertion crashes during log record applying, but in 10.4 it crashes during page flushing. The fix could be in marking page as freed and not writing dummy record during keys rotation procedure for such marked pages. But bpage->file_page_was_freed is not consistent enough for release builds in 10.4, and the issue is fixed in 10.5 and does not exist in 10.[23] as MLOG_INIT_FREE_PAGE was introduced since 10.4. So the better solution is just to relax the assertion and implement some additional property for freshly allocated pages, and check this property during pages flushing. The test is copied from MDEV-24695, the only change is in forcing pages flushing after each server start to cause crash in non-fixed code. There is no need to merge it to 10.5+, as the bug is already fixed by MDEV-24695.
* | | | | | Merge branch 'bb-10.5-release' into 10.5Sergei Golubchik2021-02-232-4/+6
|\ \ \ \ \ \
| * | | | | | MDEV-24917 Page cleaner wrongly remains idlebb-10.5-MDEV-24917Marko Mäkelä2021-02-182-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit a9933105938d4d809ea33ac3196e681cd581374f (MDEV-24537) introduced the regression that the page cleaner will keep sleeping even if there is work to do. innodb_max_dirty_pages_pct_update(): Always wake up the page cleaner on any SET GLOBAL innodb_max_dirty_pages_pct= assignment. buf_flush_page_cleaner(): If innodb_max_dirty_pages_pct is nonzero, consult only that parameter when determining whether there is work to do. Else, consult innodb_max_dirty_pages.
* | | | | | | Merge mariadb-10.5.9Marko Mäkelä2021-02-17143-2475/+19055
|\ \ \ \ \ \ \ | |/ / / / / /
| * | | | | | MDEV-24864 Fatal error in buf_page_get_low() / fseg_page_is_free()Marko Mäkelä2021-02-152-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fix of MDEV-24569 and MDEV-24695 introduced a race condition when a table is being rebuilt or dropped during the fseg_page_is_free() check. The server would occasionally crash during the execution of the test encryption.create_or_replace. The fil_space_t::STOPPING flag can be set by DDL operations. Normally, such concurrent operations are prevented by a metadata lock (MDL). However, neither the change buffer merge nor the fil_crypt_thread() are protected by MDL. fil_crypt_read_crypt_data(), xdes_get_descriptor_const(): Pass the BUF_GET_POSSIBLY_FREED flag to avoid the fatal error in buf_page_get_low() if a DDL operation was just initiated.
| * | | | | | columnstore 5.5.1-2Sergei Golubchik2021-02-151-0/+0
| | | | | | |
| * | | | | | Merge branch 'bb-10.4-release' into bb-10.5-releaseSergei Golubchik2021-02-15140-2470/+19044
| |\ \ \ \ \ \ | | | |/ / / / | | |/| | | |
| | * | | | | remove find_thread_with_thd_data_lock_callbackSergei Golubchik2021-02-121-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | let the caller take the lock if needed
| | * | | | | MDEV-23328 Server hang due to Galera lock conflict resolutionSergei Golubchik2021-02-121-60/+148
| | | | | | | | | | | | | | | | | | | | | | | | | | | | adaptation of 29bbcac0ee8 for 10.4
| | * | | | | Merge branch 'bb-10.3-release' into bb-10.4-releaseSergei Golubchik2021-02-12147-2446/+18933
| | |\ \ \ \ \ | | | |/ / / / | | |/| / / / | | | |/ / / | | | | | | Note, the fix for "MDEV-23328 Server hang due to Galera lock conflict resolution" was null-merged. 10.4 version of the fix is coming up separately
| | | * | | Merge branch '10.2' into 10.3Oleksandr Byelkin2021-02-0514-306/+500
| | | |\ \ \ | | | | | |/ | | | | |/|
| | | | * | Fix connect engine ppc64 failOlivier Bertrand2021-02-052-7/+7
| | | | | |
| | | | * | Fix of connect engine crashesOlivier Bertrand2021-02-051-0/+2
| | | | | |
| | | | * | Fix of crashes of connect engine.Oleksandr Byelkin2021-02-053-24/+24
| | | | | | | | | | | | | | | | | | | | | | | | Use size_t everywhere and remove suspicious expression.
| | | | * | Fix of random crashes of connect engine (probably depend on addresses used)-Oleksandr Byelkin2021-02-051-1/+1
| | | | | |
| | | | * | Fix compiler warnings of the new connect engine.Oleksandr Byelkin2021-02-051-0/+1
| | | | | |
| | | | * | Revert "Fix of warnings on aarch64 like:"Oleksandr Byelkin2021-02-022-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed by the author in other way (char -> short) This reverts commit 496f7090a825ac7ee54a6b5f9700e5f261e4bce0.
| | | | * | Merge remote-tracking branch 'connect/10.2' into 10.2Oleksandr Byelkin2021-02-0213-269/+460
| | | | |\ \ | | | | | |/ | | | | |/|
| | | | | * Fix failed test bson and xmlOlivier Bertrand2021-02-021-1/+7
| | | | | |
| | | | | * Fix failed test bson and xmlOlivier Bertrand2021-01-303-4/+2
| | | | | |