We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4bbed79 + b438ae9 commit 321231cCopy full SHA for 321231c
sql/sql_cache.cc
@@ -402,6 +402,9 @@ using std::max;
402
#define QC_DEBUG_SYNC(name)
403
#endif
404
405
+// Max aligned size for ulong type query_cache_min_res_unit.
406
+static const ulong max_aligned_min_res_unit_size= ((ULONG_MAX) &
407
+ (~(sizeof(double) - 1)));
408
409
/**
410
Thread state to be used when the query cache lock needs to be acquired.
@@ -1239,6 +1242,9 @@ ulong Query_cache::set_min_res_unit(ulong size)
1239
1242
{
1240
1243
if (size < min_allocation_unit)
1241
1244
size= min_allocation_unit;
1245
+ else if (size > max_aligned_min_res_unit_size)
1246
+ size= max_aligned_min_res_unit_size;
1247
+
1248
return (min_result_data_size= ALIGN_SIZE(size));
1249
}
1250
0 commit comments