summaryrefslogtreecommitdiff
path: root/sql/mdl.cc
Commit message (Collapse)AuthorAgeFilesLines
* Merge 10.1 into 10.2Marko Mäkelä2019-05-131-1/+1
|\
| * Update FSF addressVicențiu Ciorbaru2019-05-111-1/+1
| |
| * Fixed compiler warningMonty2018-03-261-1/+1
| |
* | Fixed wrong arguments to printf and related functionsMonty2018-01-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Other things, mainly to get create_mysqld_error_find_printf_error tool to work: - Added protection to not include mysqld_error.h twice - Include "unireg.h" instead of "mysqld_error.h" in server - Added protection if ER_XX messages are already defined - Removed wrong calls to my_error(ER_OUTOFMEMORY) as my_malloc() and my_alloc will do this automatically - Added missing %s to ER_DUP_QUERY_NAME - Removed old and wrong calls to my_strerror() when using MY_ERROR_ON_RENAME (wrong merge) - Fixed deadlock error message from Galera. Before the extra information given to ER_LOCK_DEADLOCK was missing because ER_LOCK_DEADLOCK doesn't provide any extra information. I kept #ifdef mysqld_error_find_printf_error_used in sql_acl.h to make it easy to do this kind of check again in the future
* | MDEV-12882 - Assertion failed in MDL_context::upgrade_shared_lockSergey Vojtovich2017-06-261-2/+3
| | | | | | | | | | | | Relaxed assertion (in MySQL it was removed). For "LOCK TABLES t1 WRITE CONCURRENT, t1 READ" upgrade lock to weakest existing suitable lock, which is MDL_SHARED_NO_READ_WRITE.
* | Merge branch '10.1' into 10.2Sergei Golubchik2017-03-301-1/+2
|\ \ | |/
| * MDEV-12005: GET_LOCK: Fractional part of timeout is ignoredNirbhay Choubey2017-02-071-1/+2
| | | | | | | | | | | | In order to include the fractional part, convert lock_wait_timeout (in secs) to nanoseconds before calculating the absolute time for timeout.
* | MDEV-11227 - mysqlimport -l doesn't issue UNLOCK TABLESSergey Vojtovich2016-12-211-39/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implementation of MDEV-7660 introduced unwanted incompatible change: modifications under LOCK TABLES with autocommit enabled are rolled back on disconnect. Previously everything was committed, because LOCK TABLES didn't adjust autocommit setting. This patch restores original behavior by reverting some changes done in MDEV-7660: - sql/sql_parse.cc: do not reset autocommit on LOCK TABLES - sql/sql_base.cc: do not set autocommit on UNLOCK TABLES - test cases: main.lock_tables_lost_commit, main.partition_explicit_prune, rpl.rpl_switch_stm_row_mixed, tokudb.nested_txn_implicit_commit, tokudb_bugs.db806 But it makes InnoDB tables under LOCK TABLES ... READ [LOCAL] not protected against DML. To restore protection some changes from WL#6671 were merged, specifically MDL_SHARED_READ_ONLY and test cases. WL#6671 merge highlights: - Not all tests merged. - In MySQL LOCK TABLES ... READ acquires MDL_SHARED_READ_ONLY for all engines, in MariaDB MDL_SHARED_READ is always acquired first and then upgraded to MDL_SHARED_READ_ONLY for InnoDB only. - The above allows us to omit MDL_SHARED_WRITE_LOW_PRIO implementation in MariaDB, which is rather useless with InnoDB. In MySQL it is needed to preserve locking behavior between low priority writes and LOCK TABLES ... READ for non-InnoDB engines (covered by sys_vars.sql_low_priority_updates_func). - Omitted HA_NO_READ_LOCAL_LOCK, we rely on lock_count() instead. - Omitted "piglets": in MariaDB stream of DML against InnoDB table may lead to concurrent LOCK TABLES ... READ starvation. - HANDLER ... OPEN acquires MDL_SHARED_READ instead of MDL_SHARED in MariaDB. - Omitted SNRW->X MDL lock upgrade for IMPORT/DISCARD TABLESPAECE under LOCK TABLES. - Omitted strong locks for views, triggers and SP under LOCK TABLES. - Omitted IX schema lock for LOCK TABLES READ. - Omitted deadlock weight juggling for LOCK TABLES. Full WL#6671 merge status: - innodb.innodb-lock: fully merged - main.alter_table: not merged due to different HANDLER solution - main.debug_sync: fully merged - main.handler_innodb: not merged due to different HANDLER solution - main.handler_myisam: not merged due to different HANDLER solution - main.innodb_mysql_lock: fully merged - main.insert_notembedded: fully merged - main.lock: not merged (due to no strong locks for views) - main.lock_multi: not merged - main.lock_sync: fully merged (partially in MDEV-7660) - main.mdl_sync: not merged - main.partition_debug_sync: not merged due to different HANDLER solution - main.status: fully merged - main.view: fully merged - perfschema.mdl_func: not merged (no such test in MariaDB) - perfschema.table_aggregate_global_2u_2t: not merged (didn't fail in MariaDB) - perfschema.table_aggregate_global_2u_3t: not merged (didn't fail in MariaDB) - perfschema.table_aggregate_global_4u_2t: not merged (didn't fail in MariaDB) - perfschema.table_aggregate_global_4u_3t: not merged (didn't fail in MariaDB) - perfschema.table_aggregate_hist_2u_2t: not merged (didn't fail in MariaDB) - perfschema.table_aggregate_hist_2u_3t: not merged (didn't fail in MariaDB) - perfschema.table_aggregate_hist_4u_2t: not merged (didn't fail in MariaDB) - perfschema.table_aggregate_hist_4u_3t: not merged (didn't fail in MariaDB) - perfschema.table_aggregate_thread_2u_2t: not merged (didn't fail in MariaDB) - perfschema.table_aggregate_thread_2u_3t: not merged (didn't fail in MariaDB) - perfschema.table_aggregate_thread_4u_2t: not merged (didn't fail in MariaDB) - perfschema.table_aggregate_thread_4u_3t: not merged (didn't fail in MariaDB) - perfschema.table_lock_aggregate_global_2u_2t: not merged (didn't fail in MariaDB) - perfschema.table_lock_aggregate_global_2u_3t: not merged (didn't fail in MariaDB) - perfschema.table_lock_aggregate_global_4u_2t: not merged (didn't fail in MariaDB) - perfschema.table_lock_aggregate_global_4u_3t: not merged (didn't fail in MariaDB) - perfschema.table_lock_aggregate_hist_2u_2t: not merged (didn't fail in MariaDB) - perfschema.table_lock_aggregate_hist_2u_3t: not merged (didn't fail in MariaDB) - perfschema.table_lock_aggregate_hist_4u_2t: not merged (didn't fail in MariaDB) - perfschema.table_lock_aggregate_hist_4u_3t: not merged (didn't fail in MariaDB) - perfschema.table_lock_aggregate_thread_2u_2t: not merged (didn't fail in MariaDB) - perfschema.table_lock_aggregate_thread_2u_3t: not merged (didn't fail in MariaDB) - perfschema.table_lock_aggregate_thread_4u_2t: not merged (didn't fail in MariaDB) - perfschema.table_lock_aggregate_thread_4u_3t: not merged (didn't fail in MariaDB) - sys_vars.sql_low_priority_updates_func: not merged - include/thr_rwlock.h: not merged, rw_pr_lock_assert_write_owner and rw_pr_lock_assert_not_write_owner are macros in MariaDB - sql/handler.h: not merged (HA_NO_READ_LOCAL_LOCK) - sql/mdl.cc: partially merged (MDL_SHARED_READ_ONLY only) - sql/mdl.h: partially merged (MDL_SHARED_READ_ONLY only) - sql/lock.cc: fully merged - sql/sp_head.cc: not merged - sql/sp_head.h: not merged - sql/sql_base.cc: partially merged (MDL_SHARED_READ_ONLY only) - sql/sql_base.h: not merged - sql/sql_class.cc: fully merged - sql/sql_class.h: fully merged - sql/sql_handler.cc: merged partially (different solution in MariaDB) - sql/sql_parse.cc: partially merged, mostly omitted low priority write part - sql/sql_reload.cc: not merged comment change - sql/sql_table.cc: not merged SNRW->X upgrade for IMPORT/DISCARD TABLESPACE - sql/sql_view.cc: not merged - sql/sql_yacc.yy: not merged (MDL_SHARED_WRITE_LOW_PRIO, MDL_SHARED_READ_ONLY) - sql/table.cc: not merged (MDL_SHARED_WRITE_LOW_PRIO) - sql/table.h: not merged (MDL_SHARED_WRITE_LOW_PRIO) - sql/trigger.cc: not merged - storage/innobase/handler/ha_innodb.cc: merged store_lock()/lock_count() changes (in MDEV-7660), didn't merge HA_NO_READ_LOCAL_LOCK - storage/innobase/handler/ha_innodb.h: fully merged in MDEV-7660 - storage/myisammrg/ha_myisammrg.cc: not merged comment change - storage/perfschema/table_helper.cc: not merged (no MDL support in MariaDB PFS) - unittest/gunit/mdl-t.cc: not merged - unittest/gunit/mdl_sync-t.cc: not merged MariaDB specific changes: - handler.heap: different HANDLER solution, MDEV-7660 - handler.innodb: different HANDLER solution, MDEV-7660 - handler.interface: different HANDLER solution, MDEV-7660 - handler.myisam: different HANDLER solution, MDEV-7660 - main.mdl_sync: MDEV-7660 specific changes - main.partition_debug_sync: removed test due to different HANDLER solution, MDEV-7660 - main.truncate_coverage: removed test due to different HANDLER solution, MDEV-7660 - mysql-test/include/mtr_warnings.sql: additional cleanup, MDEV-7660 - mysql-test/lib/v1/mtr_report.pl: additional cleanup, MDEV-7660 - plugin/metadata_lock_info/metadata_lock_info.cc: not in MySQL - sql/sql_handler.cc: MariaDB specific fix for mysql_ha_read(), MDEV-7660
* | Merge branch '10.1' into 10.2Sergei Golubchik2016-09-091-0/+67
|\ \ | |/
| * 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.
* | | Cleanup around wsrep mdl exception.Nirbhay Choubey2016-07-301-27/+47
| | |
* | | Fixed compiler warnings and test failures found by buildbotMonty2016-06-241-1/+1
|/ / | | | | | | Fixed ccfilter to detect errors where the column is included in the error message
* | 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
| | | | | | | | | | | |