summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSunny Bains <Sunny.Bains@Oracle.Com>2010-08-20 12:57:04 +1000
committerSunny Bains <Sunny.Bains@Oracle.Com>2010-08-20 12:57:04 +1000
commiteff4a5d202faa088c13a4ea2cc966dfb830ffd18 (patch)
tree236695809c7caacab79676cde60beb3bf7d7e8f1
parent73c92b14081461b8fe6d1aac27e7ac812608240c (diff)
downloadmariadb-git-eff4a5d202faa088c13a4ea2cc966dfb830ffd18.tar.gz
Fix Bug #55027: assertion: mutex_own(&dict_sys->mutex) in dict_table_get_on_id()
The callers should indicate that the dictionary is locked or not using the trx->dict_operation_lock_mode == RW_X_LATCH mode. Checking explicitly for system tables is unnecessary. Approved by Marko on IRC.
-rw-r--r--storage/innobase/dict/dict0dict.c3
-rw-r--r--storage/innodb_plugin/dict/dict0dict.c3
2 files changed, 2 insertions, 4 deletions
diff --git a/storage/innobase/dict/dict0dict.c b/storage/innobase/dict/dict0dict.c
index 9f9c4da46f4..0e323d2bf24 100644
--- a/storage/innobase/dict/dict0dict.c
+++ b/storage/innobase/dict/dict0dict.c
@@ -616,8 +616,7 @@ dict_table_get_on_id(
{
dict_table_t* table;
- if (ut_dulint_cmp(table_id, DICT_FIELDS_ID) <= 0
- || trx->dict_operation_lock_mode == RW_X_LATCH) {
+ if (trx->dict_operation_lock_mode == RW_X_LATCH) {
/* Note: An X latch implies that the transaction
already owns the dictionary mutex. */
diff --git a/storage/innodb_plugin/dict/dict0dict.c b/storage/innodb_plugin/dict/dict0dict.c
index fe4e058e122..a79f084e327 100644
--- a/storage/innodb_plugin/dict/dict0dict.c
+++ b/storage/innodb_plugin/dict/dict0dict.c
@@ -568,8 +568,7 @@ dict_table_get_on_id(
{
dict_table_t* table;
- if (ut_dulint_cmp(table_id, DICT_FIELDS_ID) <= 0
- || trx->dict_operation_lock_mode == RW_X_LATCH) {
+ if (trx->dict_operation_lock_mode == RW_X_LATCH) {
/* Note: An X latch implies that the transaction
already owns the dictionary mutex. */