summaryrefslogtreecommitdiff
path: root/storage/myisammrg
diff options
context:
space:
mode:
authorunknown <sanja@askmonty.org>2014-04-28 09:13:53 +0300
committerunknown <sanja@askmonty.org>2014-04-28 09:13:53 +0300
commit968f4d4e2573fc409d5a17103269cfdcef7c2878 (patch)
tree380f052461b134a8ff9b1eb0edaaf2df0b4030fc /storage/myisammrg
parent772aa0c57525706a9f6e3285005ff22fc115b647 (diff)
downloadmariadb-git-968f4d4e2573fc409d5a17103269cfdcef7c2878.tar.gz
MDEV-6139: UPDATE w/ join against MRG_MyISAM table with read-only sub-table failsUPDATE w/ join against MRG_MyISAM table with read-only sub-table fails
The problem was that on opening all tables TL_WRITE, than local tables which is not updated set to TL_READ, but underlying tables of MyISAMmrg left untouched. Prartition engine has not this problem. All cases where lock_type assigned is not changed because call of virtual function is not cheap.
Diffstat (limited to 'storage/myisammrg')
-rw-r--r--storage/myisammrg/ha_myisammrg.cc18
-rw-r--r--storage/myisammrg/ha_myisammrg.h1
2 files changed, 19 insertions, 0 deletions
diff --git a/storage/myisammrg/ha_myisammrg.cc b/storage/myisammrg/ha_myisammrg.cc
index 1ee974c1b23..388c9c9895d 100644
--- a/storage/myisammrg/ha_myisammrg.cc
+++ b/storage/myisammrg/ha_myisammrg.cc
@@ -1713,6 +1713,24 @@ my_bool ha_myisammrg::register_query_cache_dependant_tables(THD *thd
DBUG_RETURN(FALSE);
}
+
+void ha_myisammrg::ha_set_lock_type(enum thr_lock_type lock)
+{
+ handler::ha_set_lock_type(lock);
+ if (children_l != NULL)
+ {
+ for (TABLE_LIST *child_table= children_l;;
+ child_table= child_table->next_global)
+ {
+ child_table->lock_type=
+ child_table->table->reginfo.lock_type= lock;
+
+ if (&child_table->next_global == children_last_l)
+ break;
+ }
+ }
+}
+
extern int myrg_panic(enum ha_panic_function flag);
int myisammrg_panic(handlerton *hton, ha_panic_function flag)
{
diff --git a/storage/myisammrg/ha_myisammrg.h b/storage/myisammrg/ha_myisammrg.h
index f5ba2ffef38..ce9c1917118 100644
--- a/storage/myisammrg/ha_myisammrg.h
+++ b/storage/myisammrg/ha_myisammrg.h
@@ -155,4 +155,5 @@ public:
Query_cache *cache,
Query_cache_block_table **block,
uint *n);
+ virtual void ha_set_lock_type(enum thr_lock_type lock);
};