summaryrefslogtreecommitdiff
path: root/sql/debug_sync.h
Commit message (Collapse)AuthorAgeFilesLines
* Extended debug_sync_control life timeSergey Vojtovich2020-03-131-1/+5
| | | | | | | | It now lives from THD constructor to THD destructor. Reset before THD is released to a cache. Change user doesn't reset debug_sync_control anymore. Needed to be able to make use of DEBUG_SYNC() at later stages like ha_close_connection().
* Merge 10.2 into 10.3Marko Mäkelä2019-05-141-1/+1
|\
| * Merge 10.1 into 10.2Marko Mäkelä2019-05-131-1/+1
| |\
| | * Merge branch '5.5' into 10.1Vicențiu Ciorbaru2019-05-111-1/+1
| | |\
| | | * Update FSF AddressVicențiu Ciorbaru2019-05-111-1/+1
| | | | | | | | | | | | | | | | * Update wrong zip-code
* | | | Enusure that my_global.h is included firstMichael Widenius2017-08-241-2/+0
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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
* | | Merge branch '10.1' into 10.2Sergei Golubchik2016-06-301-1/+0
|\ \ \ | |/ /
| * | Fixed failing test cases and compiler warningsMonty2016-04-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Fixed wait condition in kill_processlist-6619 - Updated Ssl_chiper for openssl tests - Added supression for valgrinds when using libcrypto - Fixed wrong argument to pthread_mutex in server_audit.c when compiling with debug - Adding missing debug_sync_update() to debug_sync.h - Added initializers to some variables and fixed error handling in jsonudf.cpp - Fixed cluster_filter_unpack_varchar which doesn't have a stable index type. - Updated compiler_warnings.supp
* | | MDEV-6353 my_ismbchar() and my_mbcharlen() refactoringAlexander Barkov2016-05-171-0/+3
|/ /
* | mdl_sync now works.Michael Widenius2013-07-021-0/+3
|/ | | | | | | | | | | | | | | mysql-test/r/mdl_sync.result: Full merge with 5.6 mysql-test/t/mdl_sync.test: Full merge with 5.6 sql/debug_sync.cc: Full merge with 5.6 sql/debug_sync.h: Full merge with 5.6 sql/mdl.cc: Full merge with 5.6 sql/sql_base.cc: Removed code not in 5.6 anymore
* debug_sync is now a service, available to dynamically loaded plugins.Sergei Golubchik2012-03-281-14/+0
| | | | | | | | new make target - abi_update libservices/HOWTO: remove references to Makefile.am small tweaks
* 5.3 mergeSergei Golubchik2012-01-131-1/+1
|\
| * Initail merge with MySQL 5.1 (XtraDB still needs to be merged)Michael Widenius2011-11-211-2/+2
| |\ | | | | | | | | | Fixed up copyright messages.
* | \ Updated/added copyright headersKent Boortz2011-06-301-2/+2
|\ \ \ | | |/ | |/|
| * | Updated/added copyright headersKent Boortz2011-06-301-2/+2
| |/
* | Fixed such that debug_sync can be used by plugins on WindowsMikael Ronström2011-02-031-1/+1
|/
* Bug #51648 DBUG_SYNC_POINT is not defined on all platforms and mtr cant ↵Andrei Elkin2010-03-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pre-check that DBUG_SYNC_POINT has at least one strong limitation that it's not defined on all platforms. It has issues cooperating with @@debug. All in all its functionality is superseded by DEBUG_SYNC facility and there is no reason to maintain the old less flexible one. Fixed with adding debug_sync_set_action() function as a facility to set up a sync-action in the server sources code and re-writing existing simulations (found 3) to use it. Couple of tests have been reworked as well. The patch offers a pattern for setting sync-points in replication threads where the standard DEBUG_SYNC does not suffice to reach goals. mysql-test/extra/rpl_tests/rpl_get_master_version_and_clock.test: rewriting the test from GET_LOCK()-based to DEBUG_SYNC-based; a pattern of usage DEBUG_SYNC for replication testing is provided. mysql-test/suite/rpl/r/rpl_get_master_version_and_clock.result: results are changed. mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test: rewriting the test from GET_LOCK()-based to DEBUG_SYNC-based; limiting the test to run only with MIXED binlog-format as the test last some 10 secs sensitively contributing to the total of tests run. mysql-test/suite/rpl/t/rpl_show_slave_running.test: rewriting the test from GET_LOCK()-based to DEBUG_SYNC-based. sql/debug_sync.cc: adding debug_sync_set_action() function as a facility to set up a sync-action in the server sources code. sql/debug_sync.h: externalizing debug_sync_set_action(). sql/item_func.cc: purging sources from DBUG_SYNC_POINT. sql/mysql_priv.h: purging sources from DBUG_SYNC_POINT. sql/slave.cc: rewriting failure simulations to base on DEBUG_SYNC rather than GET_LOCK()-based DBUG_SYNC_POINT. sql/sql_repl.cc: removing an orphan failure simulation line because no counterpart in tests existing.
* WL#4259 - Debug Sync FacilityIngo Struewing2009-09-291-0/+60
Backport from 6.0 to 5.1. Only those sync points are included, which are used in debug_sync.test. The Debug Sync Facility allows to place synchronization points in the code: open_tables(...) DEBUG_SYNC(thd, "after_open_tables"); lock_tables(...) When activated, a sync point can - Send a signal and/or - Wait for a signal Nomenclature: - signal: A value of a global variable that persists until overwritten by a new signal. The global variable can also be seen as a "signal post" or "flag mast". Then the signal is what is attached to the "signal post" or "flag mast". - send a signal: Assign the value (the signal) to the global variable ("set a flag") and broadcast a global condition to wake those waiting for a signal. - wait for a signal: Loop over waiting for the global condition until the global value matches the wait-for signal. Please find more information in the top comment in debug_sync.cc or in the worklog entry. .bzrignore: WL#4259 - Debug Sync Facility Added the symbolic link libmysqld/debug_sync.cc. CMakeLists.txt: WL#4259 - Debug Sync Facility Added definition for ENABLED_DEBUG_SYNC. configure.in: WL#4259 - Debug Sync Facility Added definition for ENABLED_DEBUG_SYNC. include/my_sys.h: WL#4259 - Debug Sync Facility Added definition for the DEBUG_SYNC_C macro. libmysqld/CMakeLists.txt: WL#4259 - Debug Sync Facility Added sql/debug_sync.cc. libmysqld/Makefile.am: WL#4259 - Debug Sync Facility Added sql/debug_sync.cc. mysql-test/include/have_debug_sync.inc: WL#4259 - Debug Sync Facility New include file. mysql-test/mysql-test-run.pl: WL#4259 - Debug Sync Facility Added option --debug_sync_timeout. mysql-test/r/debug_sync.result: WL#4259 - Debug Sync Facility New test result. mysql-test/r/have_debug_sync.require: WL#4259 - Debug Sync Facility New require file. mysql-test/t/debug_sync.test: WL#4259 - Debug Sync Facility New test file. mysys/my_static.c: WL#4259 - Debug Sync Facility Added definition for debug_sync_C_callback_ptr. mysys/thr_lock.c: WL#4259 - Debug Sync Facility Added sync point "wait_for_lock". sql/CMakeLists.txt: WL#4259 - Debug Sync Facility Added debug_sync.cc and debug_sync.h. sql/Makefile.am: WL#4259 - Debug Sync Facility Added debug_sync.cc and debug_sync.h. sql/debug_sync.cc: WL#4259 - Debug Sync Facility New source file. sql/debug_sync.h: WL#4259 - Debug Sync Facility New header file. sql/mysqld.cc: WL#4259 - Debug Sync Facility Added opt_debug_sync_timeout. Added calls to debug_sync_init() and debug_sync_end(). Fixed a purecov comment (unrelated). sql/set_var.cc: WL#4259 - Debug Sync Facility Added server variable "debug_sync". sql/set_var.h: WL#4259 - Debug Sync Facility Added declaration for server variable "debug_sync". sql/share/errmsg.txt: WL#4259 - Debug Sync Facility Added error messages ER_DEBUG_SYNC_TIMEOUT and ER_DEBUG_SYNC_HIT_LIMIT. sql/sql_base.cc: WL#4259 - Debug Sync Facility Added sync points "after_flush_unlock" and "before_lock_tables_takes_lock". sql/sql_class.cc: WL#4259 - Debug Sync Facility Added initialization for debug_sync_control to THD::THD. Added calls to debug_sync_init_thread() and debug_sync_end_thread(). sql/sql_class.h: WL#4259 - Debug Sync Facility Added element debug_sync_control to THD. storage/myisam/myisamchk.c: Fixed a typo in an error message string (unrelated).