summaryrefslogtreecommitdiff
path: root/sql/sql_base.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r--sql/sql_base.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index 424f572deca..d4fb2a8b8bb 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -1434,6 +1434,9 @@ unique_table(THD *thd, TABLE_LIST *table, TABLE_LIST *table_list,
bool check_alias)
{
TABLE_LIST *dup;
+
+ table= table->find_table_for_update();
+
if (table->table && table->table->file->ht->db_type == DB_TYPE_MRG_MYISAM)
{
TABLE_LIST *child;