- 30 Oct, 2019 3 commits
-
-
Jan Lindström authored
Changes to be committed: modified: mysql-test/suite/galera/r/MW-369.result modified: mysql-test/suite/galera/r/MW-402.result modified: mysql-test/suite/galera/r/galera#500.result modified: mysql-test/suite/galera/r/galera_gcs_fragment.result modified: mysql-test/suite/galera/r/mysql-wsrep#332.result
-
Jan Lindström authored
Lock wait can happen on secondary index when doing FK checks for wsrep. We should just return error to upper layer and applier will retry operation when needed.
-
Marko Mäkelä authored
ut_strlcpy(): Replace with the standard function strncpy(). ut_strlcpy_rev(): Define in the same compilation unit where the only caller resides. Avoid unnecessary definition in non-debug builds.
-
- 29 Oct, 2019 1 commit
-
-
Marko Mäkelä authored
mem_heap_dup(): Avoid mem_heap_alloc() and memcpy() of data=NULL, len=0. trx_undo_report_insert_virtual(), trx_undo_page_report_insert(), trx_undo_page_report_modify(): Avoid memcpy(ptr, NULL, 0). dfield_data_is_binary_equal(): Correctly handle data=NULL, len=0. This clean-up was motivated by WITH_UBSAN, and no bug related to this was observed in the wild. It should be noted that undefined behaviour such as memcpy(ptr, NULL, 0) could allow compilers to perform unsafe optimizations, like it was the case in commit fc168c3a (MDEV-15587).
-
- 28 Oct, 2019 6 commits
-
-
Vladislav Vaintroub authored
Ignore GetDiskFreeSpace() errors in os_file_get_status_win32 The call is only used to calculate filesystem block size, and this in turn is only shown in information_schema.sys_tablespaces.FS_BLOCK_SIZE. There is no other use of this field, it does not affect any Innodb functionality
-
Sergei Golubchik authored
use the correct table for evaluating virtual columns in the InnoDB ALTER TABLE.
-
Sergei Golubchik authored
-
Sergei Golubchik authored
switch to definer privileges when populating I_S tables
-
Sergei Golubchik authored
-
Sergei Golubchik authored
-
- 25 Oct, 2019 4 commits
-
-
Marko Mäkelä authored
-
Thirunarayanan Balathandayuthapani authored
- fts_optimize_thread() uses dict_table_t object instead of table id. So that it doesn't acquire dict_sys->mutex. It leads to remove the hang of dict_sys->mutex between fts_optimize_thread() and other threads. - in_queue to indicate whether the table is in fts_optimize_queue. It is protected by fts_optimize_wq->mutex to avoid any race condition. - fts_optimize_init() adds the fts table to the fts_optimize_wq
-
Thirunarayanan Balathandayuthapani authored
InnoDB stores synced_doc_id + 1 value in FTS_CONFIG table. But while reading the synced doc id from FTS_CONFIG table after restart, InnoDB should read synced_doc_id - 1 to get the actual synced doc id value.
-
Marko Mäkelä authored
-
- 24 Oct, 2019 1 commit
-
-
Marko Mäkelä authored
The test was marked big for no apparent reason. Usw wait_all_purged.inc in the canonical way, and make use of the sequence engine.
-
- 23 Oct, 2019 1 commit
-
-
Sergei Golubchik authored
-
- 19 Oct, 2019 4 commits
-
-
Marko Mäkelä authored
To diagnose a hang in slow shutdown (innodb_fast_shutdown=0), let us introduce a Boolean startup option in debug builds that will cause the contents of the InnoDB change buffer to be dumped to the server error log at startup.
-
Sergei Golubchik authored
using a specially crafted strings one could overflow `shift` variable and cause a crash by dereferencing d10[-2147483648] (on a sufficiently old gcc). This is a correct fix and a test case for Bug #29723340: MYSQL SERVER CRASH AFTER SQL QUERY WITH DATA ?AST
-
Sergei Golubchik authored
update mysqlaccess version
-
Oleksandr Byelkin authored
-
- 17 Oct, 2019 3 commits
-
-
Marko Mäkelä authored
Reduce the scope of some variables, remove a goto and a redundant assertion. For B-tree secondary indexes, this function can remove a delete-marked purgeable record, in case a row rollback of the INSERT was initiated due to an error in an earlier secondary index.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
The BtrBulk class, which was introduced in MySQL 5.7, is by design the exclusive writer to an index. It is therefore unnecessary to acquire the dict_index_t::lock in that code. Holding the dict_index_t::lock would unnecessarily block other threads (SQL connections and the InnoDB purge threads) from buffering concurrent modifications to being-created secondary indexes. This fix is motivated by a change in MySQL 5.7.28: Bug #29008298 MYSQLD CRASHES ITSELF WHEN CREATING INDEX mysql/mysql-server@f9fb96c20f9d190f654e7aa2387255bf80fd6e45 PageBulk::init(), PageBulk::latch(): Never acquire m_index->lock. PageBulk::storeExt(): Remove some pointer indirection, and improve a debug assertion that seems to prove that some code is redundant. BtrBulk::pageCommit(): Assert that m_index->lock is not being held. btr_blob_log_check_t: Do not acquire m_index->lock if m_op == BTR_STORE_INSERT_BULK. Add UNIV_UNLIKELY hints around that condition. btr_store_big_rec_extern_fields(): Allow index->lock not to be held while op == BTR_STORE_INSERT_BULK. Add UNIV_UNLIKELY hints around that condition.
-
- 16 Oct, 2019 1 commit
-
-
Monty authored
MDEV-18451 Server crashes in maria_create_trn_for_mysql upon ALTER TABLE Problem was that when table was locked many times, not all instances where removed from the transaction by _ma_remove_table_from_trnman()
-
- 15 Oct, 2019 4 commits
-
-
Oleksandr Byelkin authored
-
Monty authored
Problem was in a combination of LOCK TABLES on several Aria tables followed by an ALTER TABLE. After the ALTER TABLE there was a force close + reopen of the alter table. The close failed because the table was still part of a transaction. Fixed by calling extra(HA_EXTRA_PREPARE_FOR_FORCED_CLOSE) as part of closing the table, which ensures that the table is not anymore part of the current transaction.
-
Oleksandr Byelkin authored
IS NULL or <=> with unique field does not mean unique row, because several NULL possible, so we can not convert to normal join in this case.
-
Oleksandr Byelkin authored
Data should be sent with length.
-
- 14 Oct, 2019 5 commits
-
-
Eugene Kosov authored
Proper C-style type erasure is done via void*, not via char* or something else. free_key_cache() free_rpl_filter(): types were fixed to avoid function pointer type cast which is still undefined behavior. Note, that casting from void* to any other pointer type is safe and correct.
-
Marko Mäkelä authored
fil_crypt_rotate_page(): Skip the key rotation for pages that carry 0 in FIL_PAGE_TYPE. This avoids not only unnecessary writes, but also failures of the recently added debug assertion in buf_flush_init_for_writing() that the FIL_PAGE_TYPE should be nonzero. Note: the debug assertion can fail if the file was originally created before MySQL 5.5. In old InnoDB versions, FIL_PAGE_TYPE was only initialized for B-tree pages, to FIL_PAGE_INDEX. For any other pages, the field could be garbage, including FIL_PAGE_INDEX. In MariaDB 10.2 and later, buf_flush_init_for_writing() would initialize the FIL_PAGE_TYPE on such old pages, but only after passing the debug assertion that insists that pages have a nonzero FIL_PAGE_TYPE. Thus, the debug assertion at the start of buf_flush_init_for_writing() can fail when upgrading from very old debug files. This assertion is only present in debug builds, not release builds.
-
Marko Mäkelä authored
Do not merge the InnoDB changes for MDEV-20813.
-
Marko Mäkelä authored
Old InnoDB/XtraDB versions only initialized FIL_PAGE_TYPE for B-tree pages (to FIL_PAGE_INDEX), and left it uninitialized (possibly containing FIL_PAGE_INDEX) for others. In MySQL or MariaDB 5.5, the field is initialized on almost all pages, but still not all of them. In MariaDB 10.2 and later, buf_flush_init_for_writing() would initialize the FIL_PAGE_TYPE on such old pages, but only after passing the debug assertion that we are now removing from 10.1. There, we will be able to modify fil_crypt_rotate_page() so that it will skip the key rotation for pages that contain 0 in FIL_PAGE_TYPE. In MariaDB 10.1, there is no logic that would initialize FIL_PAGE_TYPE on data pages in old data files after an update. So, encryption key rotation may routinely cause page flushes on pages that contain 0 in FIL_PAGE_TYPE.
-
Marko Mäkelä authored
This is a backport of commit ec28f953 to MariaDB Server 10.1.
-
- 12 Oct, 2019 2 commits
-
-
Marko Mäkelä authored
MDEV-20813 Assertion failure in buf_flush_init_for_writing() for innodb_immediate_scrub_data_uncompressed=ON The assertion that was added in commit c0c003be to augment the fix of MDEV-20805 turns out to be invalid when innodb_immediate_scrub_data_uncompressed is enabled. In this mode, fsp_init_file_page() will be invoked on data pages that have been freed, causing writes of almost-all-zero pages. btr_page_free(): Adjust the comment. buf_flush_init_for_writing(): Disable the assertion with a note that it should be re-enabled in MDEV-15528.
-
Marko Mäkelä authored
-
- 11 Oct, 2019 5 commits
-
-
Julius Goryavsky authored
When the mysqld_multi script passes the --defaults-group-suffix option to mysqld, it must remove the initial substring with the group name ("mysqld") from option value, because otherwise substring "mysqld" will be added to the group name and then the group name will contain the word "mysqld" twice, which is wrong, because mysqld itself adds the suffix received to the group name.
-
Julius Goryavsky authored
When the mysqld_multi script passes the --defaults-group-suffix option to mysqld, it must remove the initial substring with the group name ("mysqld") from option value, because otherwise substring "mysqld" will be added to the group name and then the group name will contain the word "mysqld" twice, which is wrong, because mysqld itself adds the suffix received to the group name.
-
Marko Mäkelä authored
This is another follow-up fix to commit b393e2cb which turned out to be still broken. Replace the C++11 keyword 'constexpr' with #define. debug_sync_t::str: Remove the zero-length array. Replace sync->str with reinterpret_cast<char*>(&sync[1]).
-
Marko Mäkelä authored
During IMPORT TABLESPACE, we do invoke buf_flush_init_for_writing() with block==NULL and newest_lsn!=0.
-
Marko Mäkelä authored
-