summaryrefslogtreecommitdiff
path: root/storage
Commit message (Collapse)AuthorAgeFilesLines
* Fixed result file for rocksdb.i_s_deadlockMonty2022-01-271-9/+9
| | | | This failed because of MDEV-18918 which removed DEFAULT's
* MDEV-26768 Spider table crashes the server after the mysql_list_fields() ↵bb-10.3-hf-2Alexey Botchkov2022-01-203-6/+28
| | | | | | client's call and produces weird result for SHOW FIELDS. Suppress errors in ha_spider::info() called from mysqld_show_fields()
* Updated rocksdb.corrupted_data_reads_debug result fileMonty2022-01-191-5/+5
| | | | The change was because of new rocksdb error message.
* rocksdb.tbl_opt_data_index_dir test fixAleksey Midenkov2022-01-142-20/+20
| | | | | Handler error codes in storage engine may change as they depend on volatile HA_ERR_LAST.
* improve checks for libatomic linkingalexfanqi2021-12-301-1/+2
| | | | | | | | | This code piece is adapted from https://github.com/KDE/krita/blob/451e1415fd1b3a0f9c24de2fd4707d1b1e164236/cmake/modules/CheckAtomic.cmake#L23 Fixes: f502ccbcb5dfce29067434885a23db8d1bd5f134 Fixes: https://bugs.gentoo.org/828065 Tested-by: Yixun Lan <dlan@gentoo.org> Reviewed-by: Daniel Black
* Merge branch 10.2 into 10.3Julius Goryavsky2021-12-232-3/+14
|\
| * MDEV-27268 Failed InnoDB initialization leaves garbage files behindMarko Mäkelä2021-12-151-4/+11
| | | | | | | | | | | | | | | | | | create_log_files(): Check log_set_capacity() before modifying or creating any log files. innobase_start_or_create_for_mysql(): If create_log_files() fails and we were initializing a new database, delete the system tablespace files before exiting.
| * MDEV-27235: Crash on SET GLOBAL innodb_encrypt_tablesMarko Mäkelä2021-12-131-0/+4
| | | | | | | | | | fil_crypt_set_encrypt_tables(): If no encryption threads have been initialized, do nothing.
* | MDEV-27332 SIGSEGV in fetch_data_into_cache()Marko Mäkelä2021-12-211-1/+3
| | | | | | | | | | | | | | | | | | | | Since commit fb335b48b5e3263698b7d9a74ff3f20ef406df9f we may have a null pointer in purge_sys.query when fetch_data_into_cache() is invoked and innodb_force_recovery>4. This is because the call to purge_sys.create() would be skipped. fetch_data_into_cache(): Load the purge_sys pseudo transaction pointer to a local variable (null pointer if purge_sys is not initialized).
* | MDEV-21108 Add option for setting install paths of groongabb-10.3-robertLukas Javorsky2021-12-022-2/+6
| | | | | | | | Include gronnga and groonga-normalizer-mysql install path
* | Merge 10.2 into 10.3Marko Mäkelä2021-11-295-0/+30
|\ \ | |/
| * MDEV-22522 RPM packages have meaningless summary/descriptionbb-10.2-MDEV-22522Alexey Bychko2021-11-235-0/+30
| | | | | | | | | | this patch moves cpack summury and description for optional packages to the appropriate CMakeLists.txt files
* | Merge 10.2 into 10.3Marko Mäkelä2021-11-173-45/+26
|\ \ | |/
| * MDEV-26747 improve corruption check for encrypted tables on ALTER IMPORTbb-10.2-MDEV-26747-corruption-checkEugene Kosov2021-11-173-45/+26
| | | | | | | | | | | | fil_space_decrypt(): change signature to return status via dberr_t only. Also replace impossible condition with an assertion and prove it via test cases.
* | Merge branch '10.2' into 10.3Vladislav Vaintroub2021-11-121-0/+8
|\ \ | |/
| * MDEV-27030 vcol.vcol_keys_myisam fails on Windows x64, with Visual Studio 2022Vladislav Vaintroub2021-11-111-0/+8
| | | | | | | | | | | | | | Upon investigation, decided this to be a compiler bug (happens with new compiler, on code that did not change for the last 15 years) Fixed by de-optimizing single function remove_key(), using MSVC pragma
* | Merge 10.2 into 10.3Marko Mäkelä2021-11-093-3/+9
|\ \ | |/
| * Remove a warning for clang 11 or earlierMarko Mäkelä2021-11-092-2/+2
| | | | | | | | This fixes up commit d22c8cae00f7a7517c9b8228efbb543037c23c97
| * Merge mariadb-10.2.41 into 10.2Marko Mäkelä2021-11-099-219/+241
| |\
| | * MDEV-23328 Server hang due to Galera lock conflict resolutionsjaakola2021-10-293-150/+196
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mutex order violation when wsrep bf thread kills a conflicting trx, the stack is wsrep_thd_LOCK() wsrep_kill_victim() lock_rec_other_has_conflicting() lock_clust_rec_read_check_and_lock() row_search_mvcc() ha_innobase::index_read() ha_innobase::rnd_pos() handler::ha_rnd_pos() handler::rnd_pos_by_record() handler::ha_rnd_pos_by_record() Rows_log_event::find_row() Update_rows_log_event::do_exec_row() Rows_log_event::do_apply_event() Log_event::apply_event() wsrep_apply_events() and mutexes are taken in the order lock_sys->mutex -> victim_trx->mutex -> victim_thread->LOCK_thd_data When a normal KILL statement is executed, the stack is innobase_kill_query() kill_handlerton() plugin_foreach_with_mask() ha_kill_query() THD::awake() kill_one_thread() and mutexes are victim_thread->LOCK_thd_data -> lock_sys->mutex -> victim_trx->mutex This patch is the plan D variant for fixing potetial mutex locking order exercised by BF aborting and KILL command execution. In this approach, KILL command is replicated as TOI operation. This guarantees total isolation for the KILL command execution in the first node: there is no concurrent replication applying and no concurrent DDL executing. Therefore there is no risk of BF aborting to happen in parallel with KILL command execution either. Potential mutex deadlocks between the different mutex access paths with KILL command execution and BF aborting cannot therefore happen. TOI replication is used, in this approach, purely as means to provide isolated KILL command execution in the first node. KILL command should not (and must not) be applied in secondary nodes. In this patch, we make this sure by skipping KILL execution in secondary nodes, in applying phase, where we bail out if applier thread is trying to execute KILL command. This is effective, but skipping the applying of KILL command could happen much earlier as well. This also fixed unprotected calls to wsrep_thd_abort that will use wsrep_abort_transaction. This is fixed by holding THD::LOCK_thd_data while we abort transaction. Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
| | * MDEV-25114: Crash: WSREP: invalid state ROLLED_BACK (FATAL)Jan Lindström2021-10-291-112/+72
| | | | | | | | | | | | | | | | | | Revert "MDEV-23328 Server hang due to Galera lock conflict resolution" This reverts commit 29bbcac0ee841faaa68eeb09c86ff825eabbe6b6.
| * | Revert "MDEV-19129: Xcode compatibility update: deprecated vfork -> fork"Sergei Krivonos2021-11-031-1/+1
| | | | | | | | | | | | This reverts commit 5d6f3cebca77ee650e6cde3bd738d1fac0a8110c.
| * | MDEV-22284 Aria table key read crash because wrong index usedbb-10.2-midenok2Aleksey Midenkov2021-11-021-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When restoring lastinx last_key.keyinfo must be updated as well. The good example is in _ma_check_index(). The point of failure is extra(HA_EXTRA_NO_KEYREAD) in ha_maria::get_auto_increment(): 1. extra(HA_EXTRA_KEYREAD) saves lastinx; 2. maria_rkey() changes index, so the lastinx and last_key.keyinfo; 3. extra(HA_EXTRA_NO_KEYREAD) restores lastinx but not last_key.keyinfo. So we have discrepancy between lastinx and last_key.keyinfo after 3.
| * | MDEV-19129: Xcode compatibility update: deprecated vfork -> forkSergei Krivonos2021-10-311-1/+1
| | |
* | | Merge mariadb-10.3.32 into 10.3Marko Mäkelä2021-11-099-217/+241
|\ \ \
| * | | MDEV-23328 Server hang due to Galera lock conflict resolutionsjaakola2021-10-293-151/+196
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mutex order violation when wsrep bf thread kills a conflicting trx, the stack is wsrep_thd_LOCK() wsrep_kill_victim() lock_rec_other_has_conflicting() lock_clust_rec_read_check_and_lock() row_search_mvcc() ha_innobase::index_read() ha_innobase::rnd_pos() handler::ha_rnd_pos() handler::rnd_pos_by_record() handler::ha_rnd_pos_by_record() Rows_log_event::find_row() Update_rows_log_event::do_exec_row() Rows_log_event::do_apply_event() Log_event::apply_event() wsrep_apply_events() and mutexes are taken in the order lock_sys->mutex -> victim_trx->mutex -> victim_thread->LOCK_thd_data When a normal KILL statement is executed, the stack is innobase_kill_query() kill_handlerton() plugin_foreach_with_mask() ha_kill_query() THD::awake() kill_one_thread() and mutexes are victim_thread->LOCK_thd_data -> lock_sys->mutex -> victim_trx->mutex This patch is the plan D variant for fixing potetial mutex locking order exercised by BF aborting and KILL command execution. In this approach, KILL command is replicated as TOI operation. This guarantees total isolation for the KILL command execution in the first node: there is no concurrent replication applying and no concurrent DDL executing. Therefore there is no risk of BF aborting to happen in parallel with KILL command execution either. Potential mutex deadlocks between the different mutex access paths with KILL command execution and BF aborting cannot therefore happen. TOI replication is used, in this approach, purely as means to provide isolated KILL command execution in the first node. KILL command should not (and must not) be applied in secondary nodes. In this patch, we make this sure by skipping KILL execution in secondary nodes, in applying phase, where we bail out if applier thread is trying to execute KILL command. This is effective, but skipping the applying of KILL command could happen much earlier as well. This also fixed unprotected calls to wsrep_thd_abort that will use wsrep_abort_transaction. This is fixed by holding THD::LOCK_thd_data while we abort transaction. Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
| * | | MDEV-25114: Crash: WSREP: invalid state ROLLED_BACK (FATAL)Jan Lindström2021-10-291-108/+71
| | | | | | | | | | | | | | | | | | | | | | | | Revert "MDEV-23328 Server hang due to Galera lock conflict resolution" This reverts commit 29bbcac0ee841faaa68eeb09c86ff825eabbe6b6.
| * | | Merge branch '10.2' into 10.3Oleksandr Byelkin2021-10-286-17/+33
| |\ \ \ | | | |/ | | |/|
| | * | fix depricated pthread_yield() for tokudbOleksandr Byelkin2021-10-281-1/+3
| | | |
| | * | Merge remote-tracking branch 'connect/10.2' into 10.2Oleksandr Byelkin2021-10-285-16/+30
| | |\ \ | | | |/ | | |/|
| | | * Fix MDEV-24493Olivier Bertrand2021-10-152-6/+5
| | | |
| | | * Fix bson crash and mongo testOlivier Bertrand2021-07-312-2/+13
| | | |
| | | * Fix slow processing of pretty json files by BSON tablesOlivier Bertrand2021-07-302-8/+12
| | | |
* | | | MDEV-25803 Inplace ALTER breaks MyISAM/Aria table when order of keys is changedAleksey Midenkov2021-11-022-1/+10
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mysql_prepare_create_table() does my_qsort(sort_keys) on key info. This sorting is indeterministic: a table is created with one order and inplace alter may overwrite frm with another order. Since inplace alter does nothing about key info for MyISAM/Aria storage engines this results in discrepancy between frm and storage engine key definitions. The fix avoids the sorting of keys when no new keys added by ALTER (and this is ok for MyISAM/Aria since it cannot add new keys inplace). Notes: mi_keydef_write()/mi_keyseg_write() are used only in mi_create(). They should be used in ha_inplace_alter_table() as well. Aria corruption detection is unimplemented: maria_check_definition() is never used! MySQL 8.0 has this bug as well as of 8.0.26. This breaks main.long_unique in 10.4. The new result is correct and should be applied as it just different (original) order of keys.
* | | Merge 10.2 into 10.3Marko Mäkelä2021-10-2816-102/+72
|\ \ \ | |/ /
| * | MDEV-26867: Update the InnoDB version number to 5.7.36Marko Mäkelä2021-10-281-1/+1
| | | | | | | | | | | | | | | The InnoDB changes in MySQL 5.7.36 that were applicable to MariaDB were covered by MDEV-26864, MDEV-26865, MDEV-26866.
| * | MDEV-26866 FOREIGN KEY…SET NULL corrupts an index on a virtual columnNikita Malyavin2021-10-287-71/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The initial test case for MySQL Bug #33053297 is based on mysql/mysql-server@27130e25078864b010d81266f9613d389d4a229b. innobase_get_field_from_update_vector is not a suitable function to fetch updated row info, as well as parent table's update vector is not always suitable. For instance, in case of DELETE it contains undefined data. castade->update vector seems to be good enough to fetch all base columns update data, and besides faster, and less error-prone.
| * | Fix compile warning:bb-10.2-tmpSergei Petrunia2021-10-271-9/+7
| | | | | | | | | | | | | | | ha_rocksdb.h:459:15: warning: 'table_type' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
| * | Fix tests for PLUGIN_PARTITION=NOMarko Mäkelä2021-10-271-0/+1
| | |
| * | MDEV-26902 Auxilary fts table evicts during DDLbb-10.2-thiruThirunarayanan Balathandayuthapani2021-10-261-2/+2
| | | | | | | | | | | | | | | | | | MDEV-25702(commit 696de6d06c0eeaf7b20d5f89278ed7d62a9f204f) should've closed the fts table further. This patch closes the table after finishing the bulk insert operation.
| * | compilation fixes for sys-devel/gcc-11.2.0:11Sergei Golubchik2021-10-255-6/+19
| | |
| * | MDEV-23267 Assertion on --bootstrap --innodb-force-recoveryMarko Mäkelä2021-10-251-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SysTablespace::file_not_found(): If the system tablespace cannot be found and innodb_force_recovery has been specified, refuse to start up. The system tablespace is necessary for accessing any InnoDB tables, because it contains the TRX_SYS page (the state of transactions) and the InnoDB data dictionary. This is similar to our handling of innodb_read_only except that we will happily create the InnoDB temporary tablespace even if innodb_force_recovry is set.
* | | Merge 10.2 into 10.3Marko Mäkelä2021-10-215-6/+6
|\ \ \ | |/ /
| * | MDEV-19129: Xcode compatibility update: mysql-test-run.pl: rename ↵Sergei Krivonos2021-10-214-4/+4
| | | | | | | | | | | | $opt_vs_config to $multiconfig to use with other cmake multiconfig generators
| * | MDEV-19522 fixup: Use correct printf formatMarko Mäkelä2021-10-211-2/+2
| | |
* | | Merge 10.2 into 10.3Marko Mäkelä2021-10-211-2/+2
|\ \ \ | |/ /
| * | MDEV-19522 fixup: Integer type mismatch in unit testMarko Mäkelä2021-10-211-2/+2
| | |
* | | Merge 10.2 into 10.3Marko Mäkelä2021-10-2118-281/+300
|\ \ \ | |/ /
| * | MDEV-26865: Add test case and instrumentationMarko Mäkelä2021-10-211-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Based on mysql/mysql-server@bc9c46bf2894673d0df17cd0ee872d0d99663121 but without sleeps. The test was verified to hit the debug assertion if the change to fts_add_doc_by_id() in commit 2d98b967e31623d9027c0db55330dde2c9d1d99a was reverted.
| * | MDEV-26865 fts_optimize_thread cannot keep up with workloadMarko Mäkelä2021-10-215-43/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fts_cache_t::total_size_at_sync: New field, to sample total_size. fts_add_doc_by_id(): Invoke sync if total_size has grown too much since the previous sync request. (Maintain cache->total_size_at_sync.) ib_wqueue_t::length: Caches ib_list_len(*items). ib_wqueue_len(): Removed. We will refer to fts_optimize_wq->length directly. Based on mysql/mysql-server@bc9c46bf2894673d0df17cd0ee872d0d99663121