summaryrefslogtreecommitdiff
path: root/sql/my_apc.cc
Commit message (Collapse)AuthorAgeFilesLines
* Merge bb-10.2-ext into 10.3Marko Mäkelä2017-12-121-12/+12
|\
| * Move all kill mutex protection to LOCK_thd_killMonty2017-12-081-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Enusure that my_global.h is included firstMichael Widenius2017-08-241-0/+1
|/ | | | | | | | | | - Added sql/mariadb.h file that should be included first by files in sql directory, if sql_plugin.h is not used (sql_plugin.h adds SHOW variables that must be done before my_global.h is included) - Removed a lot of include my_global.h from include files - Removed include's of some files that my_global.h automatically includes - Removed duplicated include's of my_sys.h - Replaced include my_config.h with my_global.h
* Correct FSF addressiangilfillan2017-03-101-1/+1
|
* Merge branch '10.0' into 10.1Sergei Golubchik2016-03-211-1/+1
|\
| * Fix spelling: occurred, execute, which etcOtto Kekäläinen2016-03-041-1/+1
| |
* | MDEV-8030 - Apc_target::disable() locks mutex twiceSergey Vojtovich2015-06-231-39/+0
|/ | | | | | | | | | | | | | | Moved Apc_target::destroy(), Apc_target::enable() and Apc_targe::disable() definitions to my_apc.h so that they can be inlined. Apc_targe::disable() now calls Apc_target::process_apc_requests() only if there're APC requests. This saves one pthread_mutex_lock() call. Overhead change: Apc_target::disable 0.04% -> out of radar Apc_target::enable 0.03% -> out of radar Apc_target::process_apc_requests 0.02% -> out of radar pthread_mutex_lock 0.43% -> 0.42% pthread_mutex_unlock 0.26% -> 0.25%
* Merge 10.0-base -> 10.0Sergey Petrunya2013-10-161-0/+1
|\
| * SHOW EXPLAIN DELETE, post merge fixesSergey Petrunya2013-05-271-0/+1
| | | | | | | | | | | | | | | | - Fix asserts, make sure that mysql_delete() operates on thd->apc_target correctly* in all kinds of special cases * - correctly means that one must switch it OFF iff it was switched ON. - Added a few asserts to catch similar errors.
* | 10.0-base mergeSergei Golubchik2013-04-151-2/+1
|\ \ | |/
| * small cleanupSergei Golubchik2013-04-071-2/+1
| |
* | 10.0-base -> 10.0-montySergei Golubchik2012-10-191-4/+4
|/
* MWL#182: Explain running statementsSergey Petrunya2012-07-171-32/+0
| | | | | - Address feedback from the second code review.
* MWL#182: Explain running statements: address review feedbackSergey Petrunya2012-07-101-0/+28
| | | | - switch SHOW EXPLAIN to using an INFORMATION_SCHEMA table.
* Enable PERFORMANCE_SCHEMA tracking for SHOW EXPLAIN's conditions.Sergey Petrunya2012-07-071-3/+22
|
* Better comments.Sergey Petrunya2012-07-061-3/+0
|
* MWL#182: Explain running statementsSergey Petrunya2012-07-051-5/+16
| | | | | - Make SHOW EXPLAIN command be KILLable with KILL QUERY.
* - More "local" code in show_explain.testSergey Petrunya2012-06-301-5/+1
| | | | | | - Better comments - Make unittest compile on Windows
* MWL#182: Explain running statements: address review feedbackSergey Petrunya2012-06-291-1/+1
| | | | | | | - Fix the year in Monty Program Ab copyrights in the new files. - Fix permissions handling so that SHOW EXPLAIN's handling is the same as SHOW PROCESSLIST's.
* MWL#182: Explain running statements: address review feedbackSergey Petrunya2012-06-281-147/+11
| | | | | | - Move standalone tests to a unittest. - Added comments.
* MWL#182: Explain running statements: address review feedbackSergey Petrunya2012-06-281-7/+18
| | | | | | - Add Monty Program Ab copyright in new files - Change Apc_target::make_apc_call() to accept a C++-style functor (instead of C-style function + parameter)
* MWL#182: Explain running statementsSergey Petrunya2012-06-251-3/+2
| | | | - Remove out-of-date comments, add dbug assertions.
* MDEV-297: SHOW EXPLAIN: Server gets stuck until timeout occurs while ↵Sergey Petrunya2012-06-071-66/+43
| | | | | | | | executing SHOW INDEX and SHOW EXPLAIN in parallel - Rework locking code to use the LOCK_thd_data mutex for all synchronization. This also fixed MDEV-301.
* Merge of recent changes in MWL#182 in 5.3 with {Merge of MWL#182 with 5.5}Sergey Petrunya2012-05-171-11/+45
|\
| * MWL#182: Explain running statementsSergey Petrunya2012-04-261-11/+45
| | | | | | | | - Code cleanup
* | MWL#182: SHOW EXPLAIN: Merge 5.3->5.5Sergey Petrunya2012-05-161-1/+2
|/
* MWL#182: Explain running statementsSergey Petrunya2011-09-241-0/+8
| | | | | | | | - Implement new approach to testing (the DBUG_EXECUTE_IF variant) - add an 'evalp' mysqltest command that is like 'eval' except that it prints the original query. - Fix select_describe() not to change join_tab[i]->type - More tests
* MWL#182: Explain running statementsSergey Petrunya2011-08-251-1/+3
| | | | - Added TODO comments
* MWL#182: Explain running statementsSergey Petrunya2011-08-231-0/+355
First code - "Asynchronous procedure call" system - new THD::check_killed() that serves APC request is called from within most important loops - EXPLAIN code is now able to generate EXPLAIN output on-the-fly [incomplete] Parts that are still missing: - put THD::check_killed() call into every loop where we could spend significant amount of time - Make sure EXPLAIN code works for group-by queries that replace JOIN::join_tab with make_simple_join() and other such cases. - User interface: what error code to use, where to get timeout settings from, etc.