summaryrefslogtreecommitdiff
path: root/sql/sql_admin.cc
diff options
context:
space:
mode:
authorMattias Jonsson <mattias.jonsson@oracle.com>2011-12-14 15:33:01 +0100
committerMattias Jonsson <mattias.jonsson@oracle.com>2011-12-14 15:33:01 +0100
commit7e63c8ac0dca423081296133090aad2dbf74b48b (patch)
tree4adb688db824badb3db784673d38d1ae5e61621a /sql/sql_admin.cc
parentfc516afc88747ad58b14dc6d570f25d62057467a (diff)
parent52076824c988c036b0cb84ee3b8a382a48a66612 (diff)
downloadmariadb-git-7e63c8ac0dca423081296133090aad2dbf74b48b.tar.gz
merged bug#12361113.
Also added tests for partitions key caches.
Diffstat (limited to 'sql/sql_admin.cc')
-rw-r--r--sql/sql_admin.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/sql/sql_admin.cc b/sql/sql_admin.cc
index ab59ff501aa..5bb777437b0 100644
--- a/sql/sql_admin.cc
+++ b/sql/sql_admin.cc
@@ -911,6 +911,11 @@ bool mysql_assign_to_keycache(THD* thd, TABLE_LIST* tables,
DBUG_RETURN(TRUE);
}
mysql_mutex_unlock(&LOCK_global_system_variables);
+ if (!key_cache->key_cache_inited)
+ {
+ my_error(ER_UNKNOWN_KEY_CACHE, MYF(0), key_cache_name->str);
+ DBUG_RETURN(true);
+ }
check_opt.key_cache= key_cache;
DBUG_RETURN(mysql_admin_table(thd, tables, &check_opt,
"assign_to_keycache", TL_READ_NO_INSERT, 0, 0,