diff options
-rw-r--r-- | sql/lock.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/lock.cc b/sql/lock.cc index 376a582ae32..889761369b6 100644 --- a/sql/lock.cc +++ b/sql/lock.cc @@ -601,6 +601,7 @@ int lock_table_name(THD *thd, TABLE_LIST *table_list) DBUG_RETURN(-1); table->s= &table->share_not_to_be_used; memcpy((table->s->table_cache_key= (char*) (table+1)), key, key_length); + table->s->db= table->s->table_cache_key; table->s->key_length=key_length; table->in_use=thd; table->locked_by_name=1; |