summaryrefslogtreecommitdiff
path: root/sql/my_apc.h
Commit message (Collapse)AuthorAgeFilesLines
* Apply clang-tidy to remove empty constructors / destructorsVicențiu Ciorbaru2023-02-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is the result of running run-clang-tidy -fix -header-filter=.* -checks='-*,modernize-use-equals-default' . Code style changes have been done on top. The result of this change leads to the following improvements: 1. Binary size reduction. * For a -DBUILD_CONFIG=mysql_release build, the binary size is reduced by ~400kb. * A raw -DCMAKE_BUILD_TYPE=Release reduces the binary size by ~1.4kb. 2. Compiler can better understand the intent of the code, thus it leads to more optimization possibilities. Additionally it enabled detecting unused variables that had an empty default constructor but not marked so explicitly. Particular change required following this patch in sql/opt_range.cc result_keys, an unused template class Bitmap now correctly issues unused variable warnings. Setting Bitmap template class constructor to default allows the compiler to identify that there are no side-effects when instantiating the class. Previously the compiler could not issue the warning as it assumed Bitmap class (being a template) would not be performing a NO-OP for its default constructor. This prevented the "unused variable warning".
* Merge 10.2 into 10.3Marko Mäkelä2019-05-141-1/+1
|\
| * Merge branch '5.5' into 10.1Vicențiu Ciorbaru2019-05-111-1/+1
| |
* | Move all kill mutex protection to LOCK_thd_killMonty2017-12-081-3/+3
|/ | | | | | | | | | | | | | | | | | | | | | | | 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
* Correct FSF addressiangilfillan2017-03-101-1/+1
|
* MDEV-8030 - Apc_target::disable() locks mutex twiceSergey Vojtovich2015-06-231-4/+23
| | | | | | | | | | | | | | | 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%
* MDEV-5314 - Compiling fails on OSX using clangSergey Vojtovich2014-02-191-1/+1
| | | | | | | | | | | | | This is port of fix for MySQL BUG#17647863. revno: 5572 revision-id: jon.hauglid@oracle.com-20131030232243-b0pw98oy72uka2sj committer: Jon Olav Hauglid <jon.hauglid@oracle.com> timestamp: Thu 2013-10-31 00:22:43 +0100 message: Bug#17647863: MYSQL DOES NOT COMPILE ON OSX 10.9 GM Rename test() macro to MY_TEST() to avoid conflict with libc++.
* MDEV-5220 - [PATCH] MariaDB 10.0.4 doesn't compile without perfschemaSergey Vojtovich2013-11-141-0/+2
| | | | | | | | | | | | Fixed the following compilation errors and test failures: - maria SE: "stage_waiting_for_a_resource" wasn't declared w/o PFS - sql_repl.h: PSI_mutex_key is not available in non-PFS builds - mysqld.cc: pfs_param is not available in non-PFS builds - mysqld.cc: init_show_explain_psi_keys() is not available in non-PFS builds - mysqld.cc: call net_before_header_psi, net_after_header_psi even if PFS is not available so that thread enters stage_init at proper time. Fixes sp-threads and a few tests in funcs_1. - myisam_file_io.opt: added missing loose prefix
* [SHOW] EXPLAIN UPDATE/DELETE - Merge with 10.0-baseSergey Petrunya2013-05-271-0/+2
|\
| * EXPLAIN DELETE for MariaDBSergey Petrunya2013-02-121-0/+2
| | | | | | | | | | - Backported the code to 10.0-base - Removed incorrect assert
* | small cleanupSergei Golubchik2013-04-071-4/+4
|/
* MWL#182: Explain running statementsSergey Petrunya2012-07-171-1/+5
| | | | | - Address feedback from the second code review.
* MWL#182: Explain running statements: address review feedbackSergey Petrunya2012-07-111-0/+9
| | | | | - Make THD::check_killed() an inline function which makes calls to non-inline functions only whern there are APC requests to be served.
* Enable PERFORMANCE_SCHEMA tracking for SHOW EXPLAIN's conditions.Sergey Petrunya2012-07-071-0/+4
|
* MWL#182: Explain running statementsSergey Petrunya2012-07-051-1/+3
| | | | | - Make SHOW EXPLAIN command be KILLable with KILL QUERY.
* Better commentsSergey Petrunya2012-06-301-1/+3
|
* - More "local" code in show_explain.testSergey Petrunya2012-06-301-3/+3
| | | | | | - 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-10/+5
| | | | | | - Move standalone tests to a unittest. - Added comments.
* MWL#182: Explain running statements: address review feedbackSergey Petrunya2012-06-281-8/+22
| | | | | | - 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-1/+1
| | | | - Remove out-of-date comments, add dbug assertions.
* SHOW EXPLAIN: better commentsSergey Petrunya2012-06-191-23/+4
|
* SHOW EXPLAIN: Code cleanupSergey Petrunya2012-06-081-2/+1
|
* MDEV-297: SHOW EXPLAIN: Server gets stuck until timeout occurs while ↵Sergey Petrunya2012-06-071-9/+30
| | | | | | | | 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.
* MWL#182: Explain running statementsSergey Petrunya2012-04-261-29/+34
| | | | - Code cleanup
* MWL#182: Explain running statementsSergey Petrunya2011-09-241-1/+5
| | | | | | | | - 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-231-0/+98
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.