summaryrefslogtreecommitdiff
path: root/sql/sql_cache.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_cache.cc')
-rw-r--r--sql/sql_cache.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/sql_cache.cc b/sql/sql_cache.cc
index 210d259f364..96814562757 100644
--- a/sql/sql_cache.cc
+++ b/sql/sql_cache.cc
@@ -1348,9 +1348,10 @@ ulong Query_cache::resize(ulong query_cache_size_arg)
ulong Query_cache::set_min_res_unit(ulong size)
{
+ DBUG_ASSERT(size % 8 == 0);
if (size < min_allocation_unit)
- size= min_allocation_unit;
- return (min_result_data_size= ALIGN_SIZE(size));
+ size= ALIGN_SIZE(min_allocation_unit);
+ return (min_result_data_size= size);
}