File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 1
- /* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
1
+ /* Copyright (c) 2000, 2013, 2015, Oracle and/or its affiliates. All rights
2
+ reserved.
2
3
3
4
This program is free software; you can redistribute it and/or modify
4
5
it under the terms of the GNU General Public License as published by
@@ -404,6 +405,9 @@ using std::max;
404
405
#define QC_DEBUG_SYNC (name )
405
406
#endif
406
407
408
+ // Max aligned size for ulong type query_cache_min_res_unit.
409
+ static const ulong max_aligned_min_res_unit_size= ((ULONG_MAX) &
410
+ (~(sizeof (double ) - 1 )));
407
411
408
412
/* *
409
413
Thread state to be used when the query cache lock needs to be acquired.
@@ -1168,6 +1172,9 @@ ulong Query_cache::set_min_res_unit(ulong size)
1168
1172
{
1169
1173
if (size < min_allocation_unit)
1170
1174
size= min_allocation_unit;
1175
+ else if (size > max_aligned_min_res_unit_size)
1176
+ size= max_aligned_min_res_unit_size;
1177
+
1171
1178
return (min_result_data_size= ALIGN_SIZE (size));
1172
1179
}
1173
1180
You can’t perform that action at this time.
0 commit comments