- 08 Dec, 2017 14 commits
-
-
Marko Mäkelä authored
fil_get_space_names(): Remove. fts_drop_orphaned_tables(): Iterate fil_system->space_list directly.
-
Marko Mäkelä authored
-
Vladislav Vaintroub authored
-
Monty authored
- Changed rocksdb.2pcgroup_commit.test to print information on error - Updated myisam_views-big.result
-
Monty authored
LOCK_thd_data was used to protect both THD data and ensure that the THD is not deleted while it was in use This patch moves the THD delete protection to LOCK_thd_kill, which already protects the THD for kill. The benefits are: - More well defined what LOCK_thd_data protects - LOCK_thd_data usage is now much simpler and easier to verify - Less chance of deadlocks in SHOW PROCESS LIST as there is less chance of interactions between mutexes - Remove not needed LOCK_thread_count from thd_get_error_context_description() - Fewer mutex taken for thd->awake() Other things: - Don't take mysys->var mutex in show processlist to check if thread is kill marked - thd->awake() now automatically takes the LOCK_thd_kill mutex (Simplifies code) - Apc uses LOCK_thd_kill instead of LOCK_thd_data
-
Monty authored
-
Monty authored
This will allow show processlist to continue, without blocking all new connections, if some threads gets stuck while holding LOCK_thd_data or mysys_var->mutex Connections that has mutex 'stuck' are marked as 'Busy' in 'Command' Todo: Make F_BACKOFF to do 'pause' instead of just (1)
-
Sergey Vojtovich authored
Moved InnoDB UT_RELAX_CPU() to server. Restored cross-platform LF_BACKOFF implementation basing on UT_RELAX_CPU().
-
Jan Lindström authored
-
Alexander Barkov authored
-
Marko Mäkelä authored
Allow DROP TABLE `#mysql50##sql-...._.` to drop tables that were being rebuilt by ALGORITHM=INPLACE NOTE: If the server is killed after the table-rebuilding ALGORITHM=INPLACE commits inside InnoDB but before the .frm file has been replaced, then the recovery will involve something else than DROP TABLE. NOTE: If the server is killed in a true inplace ALTER TABLE commits inside InnoDB but before the .frm file has been replaced, then we are really out of luck. To properly handle that situation, we would need a transactional mysql.ddl_fixup table that directs recovery to rename or remove files. prepare_inplace_alter_table_dict(): Use the altered_table->s->table_name for generating the new_table_name. table_name_t::part_suffix: The start of the partition name suffix. table_name_t::dbend(): Return the end of the schema name. table_name_t::dblen(): Return the length of the schema name, in bytes. table_name_t::basename(): Return the name without the schema name. table_name_t::part(): Return the partition name, or NULL if none. row_drop_table_for_mysql(): Assert for #sql, not #sql-ib.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
fseg_alloc_free_page_low(): Remove a bogus and redundant assertion about fil_space_t::purpose. The debug function fsp_space_modify_check() is asserting something similar, but more accurately.
-
Alexander Barkov authored
-
- 07 Dec, 2017 10 commits
-
-
Sergei Petrunia authored
Update the .result file. Old EXPLAIN output was incorrect due to hitting MDEV-14563.
-
Alexander Barkov authored
-
Jan Lindström authored
-
Jan Lindström authored
MDEV-14401: Stored procedure that declares a handler that catches ER_LOCK_DEADLOCK error causes thd->is_error() assertion This was missing bug fix from MySQL wsrep i.e. Galera. Problem was that if stored procedure declares a handler that catches deadlock error, then the error may have been cleared in method sp_rcontext::handle_sql_condition(). Use wsrep_conflict_state correctly to determine is the error already sent to client. Add test case for both this bug and MDEV-12837: WSREP: BF lock wait long. Test requires both fixes to pass.
-
Jan Lindström authored
Problem was a merge error from MySQL wsrep i.e. Galera. wsrep_on_check New check function. Galera can't be enabled if innodb-lock-schedule-algorithm=VATS. innobase_kill_query In Galera async kill we could own lock mutex. innobase_init If Variance-Aware-Transaction-Sheduling Algorithm (VATS) is used on Galera we fall back to First-Come-First-Served (FCFS) with notice to user. Changed innodb-lock-schedule-algorithm as read-only parameter as it was designed to be. lock_reset_lock_and_trx_wait Use ib::hex() to print out transaction ID. lock_rec_other_has_expl_req, lock_rec_other_has_conflicting, RecLock::add_to_waitq lock_rec_lock_slow lock_table_other_has_incompatible lock_rec_insert_check_and_lock lock_prdt_other_has_conflicting Change pointer to conflicting lock to normal pointer as this pointer contents could be changed later. RecLock::create Conclicting lock pointer is moved to last parameter with default value NULL. This conflicting transaction could be selected as victim in Galera if requesting transaction is BF (brute force) transaction. In this case contents of conflicting lock pointer will be changed. Use ib::hex() to print transaction ids.
-
Monty authored
Backported patch from 10.3 that allows one to remove short .frm files
-
Monty authored
Increase the number of status variabels that can be handled
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
dict_stats_process_entry_from_defrag_pool(): Release the mutex
-
- 06 Dec, 2017 10 commits
-
-
Marko Mäkelä authored
-
Marko Mäkelä authored
Follow-up fix to MDEV-13201 Assertion `srv_undo_sources || ...` failed on shutdown during DDL operation Introduce the debug flag trx_t::persistent_stats to suppress the assertion for the updates of persistent statistics during fast shutdown. dict_stats_exec_sql(): Do execute the statement even though shutdown has been initiated.
-
Marko Mäkelä authored
dict_stats_exec_sql(): Expect the caller to always provide a transaction. Remove some redundant assertions. The caller must hold dict_sys->mutex, but holding dict_operation_lock is only necessary for accessing data dictionary tables, which we are not accessing. dict_stats_save_index_stat(): Acquire dict_sys->mutex for invoking dict_stats_exec_sql(). dict_stats_save(), dict_stats_update_for_index(), dict_stats_update(), dict_stats_drop_index(), dict_stats_delete_from_table_stats(), dict_stats_delete_from_index_stats(), dict_stats_drop_table(), dict_stats_rename_in_table_stats(), dict_stats_rename_in_index_stats(), dict_stats_rename_table(): Use a single caller-provided transaction that is started and committed or rolled back by the caller. dict_stats_process_entry_from_recalc_pool(): Let the caller provide a transaction object. ha_innobase::open(): Pass a transaction to dict_stats_init(). ha_innobase::create(), ha_innobase::discard_or_import_tablespace(): Pass a transaction to dict_stats_update(). ha_innobase::rename_table(): Pass a transaction to dict_stats_rename_table(). We do not use the same transaction as the one that updated the data dictionary tables, because we already released the dict_operation_lock. (FIXME: there is a race condition; a lock wait on SYS_* tables could occur in another DDL transaction until the data dictionary transaction is committed.) ha_innobase::info_low(): Pass a transaction to dict_stats_update() when calculating persistent statistics. alter_stats_norebuild(), alter_stats_rebuild(): Update the persistent statistics as well. In this way, a single transaction will be used for updating the statistics of a whole table, even for partitioned tables. ha_innobase::commit_inplace_alter_table(): Drop statistics for all partitions when adding or dropping virtual columns, so that the statistics will be recalculated on the next handler::open(). This is a refactored version of Oracle Bug#22469660 fix. RecLock::add_to_waitq(), lock_table_enqueue_waiting(): Do not allow a lock wait to occur for updating statistics in a data dictionary transaction, such as DROP TABLE. Instead, return the previously unused error code DB_QUE_THR_SUSPENDED. row_merge_lock_table(), row_mysql_lock_table(): Remove dead code for handling DB_QUE_THR_SUSPENDED. row_drop_table_for_mysql(), row_truncate_table_for_mysql(): Drop the statistics as part of the data dictionary transaction. After TRUNCATE TABLE, the statistics will be recalculated on subsequent ha_innobase::open(), similar to how the logic after the above-mentioned Oracle Bug#22469660 fix in ha_innobase::commit_inplace_alter_table() works. btr_defragment_thread(): Use a single transaction object for updating defragmentation statistics. dict_stats_save_defrag_stats(), dict_stats_save_defrag_stats(), dict_stats_process_entry_from_defrag_pool(), dict_defrag_process_entries_from_defrag_pool(), dict_stats_save_defrag_summary(), dict_stats_save_defrag_stats(): Add a parameter for the transaction. dict_stats_empty_table(): Make public. This will be called by row_truncate_table_for_mysql() after dropping persistent statistics, to clear the memory-based statistics as well.
-
Sergei Petrunia authored
Part #2: Don't use the new code for the clustered PK, it is handled in the special way right above.
-
Sergei Petrunia authored
TABLE_SHARE::init_from_binary_frm_image() calls handler_file->index_flags() before it has set TABLE_SHARE::primary_key (it is 0 while it should be MAX_KEY in my example). This causes MyRocks to report wrong index flags (it thinks it's a PK while it is not), which causes invalid query plans later on. Do the only thing that seems feasible: adjust field->part_of key to have correct value in ha_rocksdb::open.
-
Sergei Petrunia authored
Part#1: Set field->part_of_key correctly for PK fields.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
- 05 Dec, 2017 3 commits
-
-
Marko Mäkelä authored
-
Marko Mäkelä authored
MDEV-14587 dict_stats_process_entry_from_defrag_pool() fails to call dict_table_close() when index==NULL dict_stats_process_entry_from_defrag_pool(): Simplify the logic, and always call dict_table_close() when dict_table_open() returned a non-NULL handle.
-
Marko Mäkelä authored
MDEV-13670/MDEV-14550 Error log flood : "InnoDB: page_cleaner: 1000ms intended loop took N ms. The settings might not be optimal." Silence the error log output that was introduced in MySQL 5.7 (MariaDB 10.2.2) if log_warnings=2 or less. We should still figure out what these messages really indicate and how to solve the problems. pc_sleep_if_needed(): Add a parameter for the current time, so that there will be fewer successive calls to ut_time_ms() with no I/O between them. buf_flush_page_cleaner_coordinator(): Exit the first loop whenever shutdown has been requested. At the start of the loop, call ut_time_ms() only once. Do not display the message if log_warnings=2 or less.
-
- 04 Dec, 2017 2 commits
-
-
Marko Mäkelä authored
The function dict_stats_update_if_needed() replaced row_update_statistics_if_needed(). Adjust the comments accordingly.
-
Marko Mäkelä authored
-
- 03 Dec, 2017 1 commit
-
-
Monty authored
Problem was that Binlog_checkpoint can happen at random times. Fixed by not write binlog_checkpoint for the rpl_log test. Other things: - Removed not used variable "$keep_gtid_events" - Added option for show_binlog_events to skip binlog_checkpoint
-