summaryrefslogtreecommitdiff
path: root/storage/myisam/mi_preload.c
diff options
context:
space:
mode:
Diffstat (limited to 'storage/myisam/mi_preload.c')
-rw-r--r--storage/myisam/mi_preload.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/storage/myisam/mi_preload.c b/storage/myisam/mi_preload.c
index a2d751a709c..fad89215f35 100644
--- a/storage/myisam/mi_preload.c
+++ b/storage/myisam/mi_preload.c
@@ -56,6 +56,9 @@ int mi_preload(MI_INFO *info, ulonglong key_map, my_bool ignore_leaves)
if (!keys || !mi_is_any_key_active(key_map) || key_file_length == pos)
DBUG_RETURN(0);
+ /* Preload into a non initialized key cache should never happen. */
+ DBUG_ASSERT(share->key_cache->key_cache_inited);
+
block_length= keyinfo[0].block_length;
if (ignore_leaves)