summaryrefslogtreecommitdiff
path: root/sql/mdl.cc
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch '10.0' into 10.1Sergei Golubchik2016-08-251-0/+67
|\
| * MDEV-10630 rpl.rpl_mdev6020 fails in buildbot with timeoutMonty2016-08-221-4/+16
| | | | | | | | | | | | | | | | | | | | The issue was that when running with valgrind the wait for master_pos_Wait() was not long enough. This patch also fixes two other failures that could affect rpl_mdev6020: - check_if_conflicting_replication_locks() didn't properly check domains - 'did_mark_start_commit' was after signals to other threads was sent which could get the variable read too early.
| * With parallel replication we have had a couple of bugs where DDL'sMonty2016-08-121-0/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (like DROP TABLE) has been scheduled before conflicting DDL's (like INSERT) are commited. What makes these bugs hard to detect is that in most cases any wrong schduling are caught by MDL locks. It's only when there are timing issues that the bugs (usually deadlocks) are noticed. This patch adds a DBUG_ASSERT() that detects, in parallel replication, if a DDL is scheduled before any depending DML'S are commited. It does this be checking if there are any conflicting replication locks when the DDL is about to wait for getting it's MDL lock. I also did some minor code cleanups in sql_base.cc to make this code similar to other related code.
| * MDEV-9728 - Hard crash in metadata_lock_infoSergey Vojtovich2016-06-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | metadata_lock_info plugin called MDL_context::find_ticket() to obtain lock duration, which in turn iterates foreign thread private lists. These lists can be updated by owner thread without protection. Fixed by iterating threads (instead of MDL locks and tickets) and obtaining data through APC. Also fixed mdl_iterate_lock() to initialize iterator under prlock protection.
* | Merge branch '10.0-galera' into bb-10.1-sergNirbhay Choubey2016-02-241-1/+10
|\ \
| * | refs codership/mysql-wsrep#233sjaakola2016-02-231-1/+1
| | | | | | | | | | | | | | | | | | - avoiding the race condition, by not grabbing thd->LOCK_wsrep_thd for accessing thd->wsrep_exec_mode. The caller is same thread and exec mode can only be changed by self.
| * | refs codership/mysql-wsrep#233sjaakola2016-02-231-0/+10
| | | | | | | | | | | | - added dbug sync points for further mtr test for this issue
* | | Merge branch '10.1' into bb-10.1-sergSergei Golubchik2015-11-201-1/+1
|\ \ \
| * | | Fixed compile warnings on SolarisMonty2015-11-201-1/+1
| | | |
* | | | Merge branch 'github/10.0-galera' into 10.1Sergei Golubchik2015-11-191-3/+17
|\ \ \ \ | |/ / / |/| / / | |/ /
| * | refs codership/mysql-wsrep#202 Added schema info into wsrep messagesPhilip Stoev2015-10-191-3/+5
| | | | | | | | | | | | Added schema info to wsrep messages above debug level.
| * | Refs codership/mysql-wsrep#113sjaakola2015-09-091-5/+2
| | | | | | | | | | | | | | | - changed BF thread's MDL wait to never timeout - all explicit locks are now honored by BF threads
| * | Refs codership/mysql-wsrep#113 - Extended the protection of local FLUSHsjaakola2015-09-091-0/+17
| | | | | | | | | | | | sessions to cover all exclusive MDL locks
| * | Merge branch '5.5-galera' into 10.0-galeraNirbhay Choubey2015-06-231-1/+11
| |\ \
| | * | MDEV-8260 : Issues related to concurrent CTASNirbhay Choubey2015-06-191-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Wait for aborted thd (victim) to release MDL locks * Skip aborting an already aborted thd * Defer setting OK status in case of CTAS * Minor cosmetic changes * Added a test case
| | * | * Merged the missing revision 3934 fromNirbhay Choubey2014-02-051-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | codership-mysql/5.5 (missed in the last merge). * Merged changes from Innodb to xtradb. * Updated WSREP_PATCH_REVNO
| | * | Fixes for some compiler warnings.Nirbhay Choubey2014-01-091-1/+1
| | | |
| | * | Merging revision 3839..3932 from codership-mysql/5.5.Nirbhay Choubey2014-01-091-2/+3
| | | |
| | * | References: lp:1233353 - releasing explicit MDL locks for BF aborted ↵Seppo Jaakola2013-09-301-1/+6
| | | | | | | | | | | | | | | | transactions
| | * | References lp:1115708 - merged with lp:mariadb/5.5 revision 3657Seppo Jaakola2013-02-051-4/+8
| | |\ \
| | * | | References: lp:1066784 - Merged revisions 3810-3827 from lp:codership-mysqlSeppo Jaakola2012-11-281-0/+30
| | | | |
| | * | | References lp:1066784 - bzr merge lp:maria/5.5 (rev: 3562)Seppo Jaakola2012-10-241-8/+112
| | |\ \ \
| | * | | | References lp:1066784Seppo Jaakola2012-10-231-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | merged with patch: bzr diff lp:codership-mysql/5.5 -r3795..3809
| | * | | | Initial push of codership-wsrep API implementation for MariaDB. Seppo Jaakola2012-04-131-2/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge of: lp:maria/5.5, #3334: http://bazaar.launchpad.net/~maria-captains/maria/5.5/revision/3334 lp:codership-mysql/5.5, #3725: http://bazaar.launchpad.net/~codership/codership-mysql/wsrep-5.5/revision/3725
| * | | | | maria-10.0.16 mergeNirbhay Choubey2015-01-261-0/+1
| |\ \ \ \ \ | | | |_|_|/ | | |/| | | | | | | | | | | | | | | bzr merge -r4588 maria/10.0
| * | | | | bzr merge -r4209 maria/10.0.Nirbhay Choubey2014-05-211-3/+34
| |\ \ \ \ \
| * \ \ \ \ \ Merging mariadb-10.0.10.Nirbhay Choubey2014-04-081-7/+0
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bzr merge -rtag:mariadb-10.0.10 maria/10.0.
| * \ \ \ \ \ \ Merging revision from codership-mysql/5.5 (r3928..3968) andNirbhay Choubey2014-03-271-5/+5
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | codership-mysql/5.6 (r4021..4065). - Also contains fixes for some build failures.
| | * | | | | | | * bzr merge -r4027..4061 codership/5.6Nirbhay Choubey2014-03-261-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Merged Innodb changes to xtradb
| | * | | | | | | bzr merge -r3933..3945 codership/5.5 (Non-InnoDB changes only).Nirbhay Choubey2014-03-251-4/+4
| | | | | | | | |
| * | | | | | | | * bzr merge -rtag:mariadb-10.0.9 maria/10.0Nirbhay Choubey2014-03-261-22/+20
| |\ \ \ \ \ \ \ \ | | |/ / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | * Fix for post-merge build failures.
| * | | | | | | | Merge MariaDB-10.0.7 revision 3961.Jan Lindström2014-01-251-0/+42
| |\ \ \ \ \ \ \ \
| * \ \ \ \ \ \ \ \ merge with MariaDB 5.6 bzr merge lp:maria --rtag:mariadb-10.0.6Seppo Jaakola2013-12-041-10/+10
| |\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and a number of fixes to make this buildable. Run also few short multi-master high conflict rate tests, with no issues
| * | | | | | | | | | bzr merge -r3890..3891 lp:codership-mysql/5.5Seppo Jaakola2013-11-061-0/+1
| | | | | | | | | | |
| * | | | | | | | | | Merged revisions 3425..3430 from mariadb-galera-5.5Seppo Jaakola2013-10-071-1/+6
| | | | | | | | | | |
| * | | | | | | | | | Merge 10.0 to galera-10.0Jan Lindström2013-09-031-171/+312
| |\ \ \ \ \ \ \ \ \ \ | | |/ / / / / / / / /
| * | | | | | | | | | Merged with lp:maria revision #3766Seppo Jaakola2013-07-131-1/+1
| |\ \ \ \ \ \ \ \ \ \
| * | | | | | | | | | | Initial merge result with mariaDB 10: lp:mariaSeppo Jaakola2013-07-131-1/+134
| | | | | | | | | | | |
* | | | | | | | | | | | Merge branch '10.0-galera' into 10.1Nirbhay Choubey2015-07-141-1/+11
| | | | | | | | | | | |
* | | | | | | | | | | | - Renaming variables so that they don't shadow others (After this patch one ↵Monty2015-07-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | can compile with -Wshadow and get much fewer warnings) - Changed ER(ER_...) to ER_THD(thd, ER_...) when thd was known or if there was many calls to current_thd in the same function. - Changed ER(ER_..) to ER_THD_OR_DEFAULT(current_thd, ER...) in some places where current_thd is not necessary defined. - Removing calls to current_thd when we have access to thd Part of this is optimization (not calling current_thd when not needed), but part is bug fixing for error condition when current_thd is not defined (For example on startup and end of mysqld) Notable renames done as otherwise a lot of functions would have to be changed: - In JOIN structure renamed: examined_rows -> join_examined_rows record_count -> join_record_count - In Field, renamed new_field() to make_new_field() Other things: - Added DBUG_ASSERT(thd == tmp_thd) in Item_singlerow_subselect() just to be safe. - Removed old 'tab' prefix in JOIN_TAB::save_explain_data() and use members directly - Added 'thd' as argument to a few functions to avoid calling current_thd.
* | | | | | | | | | | | MDEV-7952 - clock_gettime() takes 0.24% in OLTP ROSergey Vojtovich2015-06-191-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Initialize abs_timeout when it is about to be used. This saves one my_hrtime() call on hot path (when we acquire MDL lock without waiting). When filling I_S.PROCESSLIST use THD::start_utime/THD::utime_after_query instead of THD::start_time. This allows us to save 2 clock_gettime() calls. Overhead change: __clock_gettime 0.13% -> 0.11% (122 -> 76 calls per OLTP RO transaction) my_interval_timer 0.07% -> 0.06% my_hrtime 0.04% -> 0.01%
* | | | | | | | | | | | MDEV-8073 - Build error in sql/mdl.cc on OS X 10.10Sergey Vojtovich2015-04-301-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | C++03 seem to require default constructor for const objects even though they're fully initialized. There is defect report for this: http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#253 Apparently some compilers (e.g. gcc) addressed this defect report, while some (e.g. clang) did not. Added empty default constructor to MDL_scoped_lock and MDL_object_lock classes. Also replaced lf_hash_search_using_hash_value() with lf_hash_search(). The latter will call mdl_key->hash_value() anyway.
* | | | | | | | | | | | MDEV-6089 - MySQL WL#7305 "Improve MDL scalability by using lock-free hash"Sergey Vojtovich2015-03-041-164/+128
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replaced hash with lock-free hash.
* | | | | | | | | | | | MDEV-6089 - MySQL WL#7305 "Improve MDL scalability by using lock-free hash"Sergey Vojtovich2015-03-041-196/+150
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Simplified MDL_object_lock and MDL_scoped_lock dichotomy so that they can be stored in LF_HASH. This was done by moving out their differences to a MDL_lock_strategy structure which is referenced from the MDL_lock object by pointer.
* | | | | | | | | | | | MDEV-6089 - MySQL WL#7305 "Improve MDL scalability by using lock-free hash"Sergey Vojtovich2015-03-041-129/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replaced m_ref_usage, m_ref_release, m_is_destroyed and m_version with single m_state, which is updated atomically. Needed to get rid of MDL_map::m_mutex.
* | | | | | | | | | | | MDEV-6089 - MySQL WL#7305 "Improve MDL scalability by using lock-free hash"Sergey Vojtovich2015-03-041-189/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removed MDL map partitions. Won't be needed when this MDEV is implemented.
* | | | | | | | | | | | MDEV-6089 - MySQL WL#7305 "Improve MDL scalability by using lock-free hash"Sergey Vojtovich2015-03-041-149/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removed MDL objects cache. Won't be needed when this MDEV is implemented.
* | | | | | | | | | | | Merge branch '10.0' into merge-wipSergei Golubchik2015-01-311-0/+1
|\ \ \ \ \ \ \ \ \ \ \ \ | | |_|_|_|_|_|_|/ / / / | |/| | | | | | | | | |
| * | | | | | | | | | | MDEV-7299 Assertion `m_status == DA_ERROR || m_status == DA_OK' fails on ↵Sergei Golubchik2015-01-191-0/+1
| | |_|_|_|_|_|/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | concurrent execution of DDL, queries from I_S, and KILL QUERY Fix MDL to report an error when a wait was killed, but preserve the old documented behavior of GET_LOCK() where killing it is not an error. Also remove race conditions in main.create_or_replace test
* | | | | | | | | | | cleanup: s/const CHARSET_INFO/CHARSET_INFO/Sergei Golubchik2014-12-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | as CHARSET_INFO is already const, using const on it is redundant and results in compiler warnings (on Windows)