summaryrefslogtreecommitdiff
path: root/include/waiting_threads.h
Commit message (Collapse)AuthorAgeFilesLines
* header typosmusvaage2022-12-201-1/+1
|
* Merge 10.2 into 10.3Marko Mäkelä2019-05-141-1/+1
|\
| * Update FSF addressMichal Schorm2019-05-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit is based on the work of Michal Schorm, rebased on the earliest MariaDB version. Th command line used to generate this diff was: find ./ -type f \ -exec sed -i -e 's/Foundation, Inc., 59 Temple Place, Suite 330, Boston, /Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, /g' {} \; \ -exec sed -i -e 's/Foundation, Inc. 59 Temple Place.* Suite 330, Boston, /Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, /g' {} \; \ -exec sed -i -e 's/MA.*.....-1307.*USA/MA 02110-1335 USA/g' {} \; \ -exec sed -i -e 's/Foundation, Inc., 59 Temple/Foundation, Inc., 51 Franklin/g' {} \; \ -exec sed -i -e 's/Place, Suite 330, Boston, MA.*02111-1307.*USA/Street, Fifth Floor, Boston, MA 02110-1335 USA/g' {} \; \ -exec sed -i -e 's/MA.*.....-1307/MA 02110-1335/g' {} \;
* | Enusure that my_global.h is included firstMichael Widenius2017-08-241-1/+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
* | Correct FSF addressiangilfillan2017-03-101-1/+1
|/
* use PSI wrappers in aria and other non-MySQL codeSergei Golubchik2011-07-131-1/+1
|
* compilation fixesSergei Golubchik2009-01-191-1/+1
|
* post-review fixesSergei Golubchik2009-01-151-97/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | include/atomic/generic-msvc.h: prevent possible compiler warnings include/lf.h: comments, better definition for LF_HASH_OVERHEAD include/maria.h: define MARIA_CANNOT_ROLLBACK here include/my_pthread.h: avoid possible name clash include/waiting_threads.h: comments, const, move WT_RESOURCE to waiting_threads.c mysql-test/suite/maria/r/maria_notembedded.result: new test mysql-test/suite/maria/t/maria_notembedded.test: new test - 5-way deadlock mysys/lf_hash.c: better definition for LF_HASH_OVERHEAD mysys/my_static.c: comment mysys/my_thr_init.c: casts mysys/waiting_threads.c: comments, asserts, etc server-tools/instance-manager/parse.cc: fix my_init_dynamic_array() to follow new calling conventions sql/mysqld.cc: call wt_init after set_proper_floating_point_mode sql/sql_class.h: comment storage/maria/ha_maria.cc: move MARIA_CANNOT_ROLLBACK to a common header storage/maria/ma_commit.c: comment storage/maria/ma_write.c: comments, check for HA_ERR_FOUND_DUPP_KEY storage/maria/trnman.c: comments, assert storage/maria/trnman.h: comments storage/maria/unittest/trnman-t.c: be paranoid unittest/mysys/lf-t.c: comments unittest/mysys/waiting_threads-t.c: comments, safety, memory leak
* Bug#40990 Maria: failure of maria.test & maria_notemebedded in deadlock ↵Sergei Golubchik2009-01-071-0/+1
| | | | | | | detection detect a case when a blocker has removed itself and signalled after the condition timed out but before it (cond_wait) acquired the mutex back
* commentSergei Golubchik2008-11-041-1/+25
| | | | | include/waiting_threads.h: comment with a deadlock example
* don't use #pragma packSergei Golubchik2008-11-031-3/+1
| | | | | | | | | include/waiting_threads.h: don't #pragma pack mysys/lf_hash.c: typo in a comment mysys/waiting_threads.c: use the size of data, not the size of (possibly padded) structure
* #pragma pack() syntax compatible with sun studioSergei Golubchik2008-10-271-2/+2
|
* wt needs to use its own implementation of rwlocks withSergei Golubchik2008-10-241-3/+18
| | | | | | | | | | | | | | reader preference, at least where system rwlocks are fair. include/my_global.h: wt uses mutex-based rwlock implementation unless on linux include/waiting_threads.h: mutex-based rwlock implementation with reader preference mysys/thr_rwlock.c: revert the change. make my_rw_locks fair mysys/waiting_threads.c: mutex-based rwlock implementation with reader preference. convert complex multi-line macros to static functions
* win32: compilation failures, maria.test failureSergei Golubchik2008-10-211-3/+6
| | | | | | | | | | | | include/my_global.h: enable compile_time_assert for all compilers include/waiting_threads.h: 1. don't #extern "C" system includes, they don't like it. 2. remove any padding from WT_RESOURCE_ID structure - we want to compare it with memcmp mysys/waiting_threads.c: assert that WT_RESOURCE_ID can be compared with memcmp and has no random padding bytes
* wt: don't support a key as a union { ulonglong, void* }. Although convenient,Sergei Golubchik2008-09-011-4/+1
| | | | | | | | | | | | | | | | | | | | it forces the user to bzero a key before setting it as a pointer, otherwise it'll have random content on architectures where sizeof(void*) < sizeof(ulonglong). Declaring a key as ulonglong only (not a union) makes this user mistake impossible. include/waiting_threads.h: WT_RESOURCE_ID::value is an ulonglong, not a union mysys/waiting_threads.c: WT_RESOURCE_ID::value is an ulonglong, not a union storage/maria/ma_write.c: WT_RESOURCE_ID::value is an ulonglong, not a union storage/maria/trnman.c: WT_RESOURCE_ID::value is an ulonglong, not a union unittest/mysys/waiting_threads-t.c: WT_RESOURCE_ID::value is an ulonglong, not a union
* fixes for windowsSergei Golubchik2008-08-311-1/+1
|
* wt: comments, OOM checks, test case for deadlock detectionSergei Golubchik2008-08-281-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | include/waiting_threads.h: make wt_thd_dontwait private mysql-test/r/maria.result: deadlock example mysql-test/t/maria.test: deadlock example mysys/waiting_threads.c: comments, OOM checks sql/mysqld.cc: fix variables sql/sql_class.cc: move wt_lazy_init to THD constructor sql/sql_class.h: move wt_lazy_init to THD constructor storage/maria/ha_maria.cc: backport from 6.0 storage/maria/ma_write.c: poset-review fixes, set thd->proc_info storage/maria/trnman.c: bugfixing storage/myisam/mi_check.c: warnings storage/myisam/mi_page.c: warnings storage/myisam/mi_search.c: warnings storage/myisammrg/myrg_create.c: warnings unittest/mysys/waiting_threads-t.c: fixes
* wt_thd_lazy_init(), per-thread deadlock search depths and timeoutsSergei Golubchik2008-08-081-4/+6
| | | | | | | | | | | | | mysys/array.c: lazy alloc in dynamic array sql-common/client.c: for dynamic array, specify init_alloc==alloc_increment explicitly sql/mysqld.cc: per-thread deadlock search depths and timeouts sql/set_var.cc: per-thread deadlock search depths and timeouts sql/sql_class.h: per-thread deadlock search depths and timeouts
* move wt* maintainance from maria to the serverSergei Golubchik2008-08-071-0/+5
| | | | | | | | | | | | | | include/waiting_threads.h: C_MODE_START/END mysys/waiting_threads.c: relax the checks - auto init thd in will_wait_for, allow to destroy uninited thd (=noop), allow a "release" an unexistent resource (=noop), sql/sql_class.cc: move wt* maintainance from maria to the server. do THD::cleanup after ha_close_connection() and plugin_thdvar_cleanup(). storage/maria/unittest/trnman-t.c: update to new prototype
* maria: deadlock detection when waiting on unique key (useless until we can ↵Sergei Golubchik2008-08-061-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | rollback) include/my_pthread.h: cleanup include/waiting_threads.h: header guard mysys/waiting_threads.c: bug - kill strategy were not applied to deadlocks of length 1. cast timeout to ulonglong. storage/maria/ma_static.c: declare WT_RESOURCE_TYPE ma_rc_dup_unique storage/maria/ma_write.c: deadlock detection when waiting on unique key (useless until we can rollback) storage/maria/maria_def.h: deadlock detection when waiting on unique key (useless until we can rollback) storage/maria/trnman.c: use deadlock detector. protect state transitions of a TRN with a mutex. trnman_trid_to_trn() function. storage/maria/trnman.h: trnman_trid_to_trn() function protect state transitions of a TRN with a mutex use deadlock detector. storage/maria/trnman_public.h: trnman_trid_to_trn()
* WL#3064 - waiting threads - wait-for graph and deadlock detectionSergei Golubchik2008-07-291-0/+154
client/mysqltest.c: compiler warnings configure.in: remove old tests for unused programs disable the use of gcc built-ins if smp assembler atomics were selected explictily. add waiting_threads.o to THREAD_LOBJECTS include/lf.h: replace the end-of-stack pointer with the pointer to the end-of-stack pointer. the latter could be stored in THD (mysys_vars) and updated in pool-of-threads scheduler. constructor/destructor in lf-alloc include/my_pthread.h: shuffle set_timespec/set_timespec_nsec macros a bit to be able to fill several timeout structures with only one my_getsystime() call include/waiting_threads.h: waiting threads - wait-for graph and deadlock detection mysys/Makefile.am: add waiting_threads.c mysys/lf_alloc-pin.c: replace the end-of-stack pointer with the pointer to the end-of-stack pointer. the latter could be stored in THD (mysys_vars) and updated in pool-of-threads scheduler. constructor/destructor in lf-alloc mysys/lf_hash.c: constructor/destructor in lf-alloc mysys/my_thr_init.c: remember end-of-stack pointer in the mysys_var mysys/waiting_threads.c: waiting threads - wait-for graph and deadlock detection storage/maria/ha_maria.cc: replace the end-of-stack pointer with the pointer to the end-of-stack pointer. the latter could be stored in THD (mysys_vars) and updated in pool-of-threads scheduler. storage/maria/ma_commit.c: replace the end-of-stack pointer with the pointer to the end-of-stack pointer. the latter could be stored in THD (mysys_vars) and updated in pool-of-threads scheduler. storage/maria/trnman.c: replace the end-of-stack pointer with the pointer to the end-of-stack pointer. the latter could be stored in THD (mysys_vars) and updated in pool-of-threads scheduler. storage/maria/trnman_public.h: replace the end-of-stack pointer with the pointer to the end-of-stack pointer. the latter could be stored in THD (mysys_vars) and updated in pool-of-threads scheduler. storage/maria/unittest/trnman-t.c: replace the end-of-stack pointer with the pointer to the end-of-stack pointer. the latter could be stored in THD (mysys_vars) and updated in pool-of-threads scheduler. unittest/mysys/Makefile.am: add waiting_threads-t unittest/mysys/lf-t.c: factor out the common code for multi-threaded stress unit tests move lf tests to a separate file unittest/mysys/my_atomic-t.c: factor out the common code for multi-threaded stress unit tests move lf tests to a separate file unittest/mysys/thr_template.c: factor out the common code for multi-threaded stress unit tests unittest/mysys/waiting_threads-t.c: wt tests