Loading Docs/manual.texi +15 −0 Original line number Diff line number Diff line Loading @@ -46928,6 +46928,21 @@ not yet 100% confident in this code. @node News-3.23.54, News-3.23.53, News-3.23.x, News-3.23.x @appendixsubsec Changes in release 3.23.54 @itemize @item Fixed reference to freed memory when doing complicated @code{GROUP BY ... ORDER BY} queries. Symptom was that @code{mysqld} died in function @code{send_fields}. @item Allocate heap rows in smaller blocks to get better memory usage. @item Fixed memory allocation bug when storing BLOB values in internal temporary tables used for some (unlikely) @code{GROUP BY} queries. @item Fixed a bug in key optimizing handling where the expression @code{WHERE column_name = key_column_name} was calculated as true for @code{NULL} values. @end itemize @node News-3.23.53, News-3.23.52, News-3.23.54, News-3.23.x @appendixsubsec Changes in release 3.23.53 heap/heapdef.h +11 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,17 @@ #endif #include "heap.h" /* Structs & some defines */ /* When allocating keys /rows in the internal block structure, do it within the following boundaries. The challenge is to find the balance between allocate as few blocks as possible and keep memory consumption down. */ #define HP_MIN_RECORDS_IN_BLOCK 16 #define HP_MAX_RECORDS_IN_BLOCK 8192 /* Some extern variables */ extern LIST *heap_open_list,*heap_share_list; Loading heap/hp_open.c +8 −2 Original line number Diff line number Diff line Loading @@ -157,8 +157,14 @@ static void init_block(HP_BLOCK *block, uint reclength, ulong min_records, max_records=1000; /* As good as quess as anything */ recbuffer=(uint) (reclength+sizeof(byte**)-1) & ~(sizeof(byte**)-1); records_in_block=max_records/10; if (records_in_block < 10 && max_records) records_in_block=10; if (records_in_block < HP_MIN_RECORDS_IN_BLOCK && max_records) records_in_block= HP_MIN_RECORDS_IN_BLOCK; /* Don't allocate too many rows at one time too keep memory consumption done when we don't need it. */ if (records_in_block > HP_MAX_RECORDS_IN_BLOCK) records_in_block= HP_MAX_RECORDS_IN_BLOCK; if (!records_in_block || records_in_block*recbuffer > (my_default_record_cache_size-sizeof(HP_PTRS)*HP_MAX_LEVELS)) records_in_block=(my_default_record_cache_size-sizeof(HP_PTRS)* Loading mysql-test/r/distinct.result +1 −1 Original line number Diff line number Diff line Loading @@ -128,7 +128,7 @@ a 1 table type possible_keys key key_len ref rows Extra t1 index PRIMARY PRIMARY 4 NULL 2 Using index; Using temporary t3 ref a a 5 t1.a 10 Using index; Distinct t3 ref a a 5 t1.a 10 where used; Using index; Distinct a 1 2 Loading mysql-test/r/null_key.result +6 −0 Original line number Diff line number Diff line Loading @@ -120,3 +120,9 @@ id uniq_id 4 2 7 3 8 4 order_id product_id product_type order_id product_id product_type 3d7ce39b5d4b3e3d22aaafe9b633de51 1206029 3 3d7ce39b5d4b3e3d22aaafe9b633de51 5880836 3 id id id id Loading
Docs/manual.texi +15 −0 Original line number Diff line number Diff line Loading @@ -46928,6 +46928,21 @@ not yet 100% confident in this code. @node News-3.23.54, News-3.23.53, News-3.23.x, News-3.23.x @appendixsubsec Changes in release 3.23.54 @itemize @item Fixed reference to freed memory when doing complicated @code{GROUP BY ... ORDER BY} queries. Symptom was that @code{mysqld} died in function @code{send_fields}. @item Allocate heap rows in smaller blocks to get better memory usage. @item Fixed memory allocation bug when storing BLOB values in internal temporary tables used for some (unlikely) @code{GROUP BY} queries. @item Fixed a bug in key optimizing handling where the expression @code{WHERE column_name = key_column_name} was calculated as true for @code{NULL} values. @end itemize @node News-3.23.53, News-3.23.52, News-3.23.54, News-3.23.x @appendixsubsec Changes in release 3.23.53
heap/heapdef.h +11 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,17 @@ #endif #include "heap.h" /* Structs & some defines */ /* When allocating keys /rows in the internal block structure, do it within the following boundaries. The challenge is to find the balance between allocate as few blocks as possible and keep memory consumption down. */ #define HP_MIN_RECORDS_IN_BLOCK 16 #define HP_MAX_RECORDS_IN_BLOCK 8192 /* Some extern variables */ extern LIST *heap_open_list,*heap_share_list; Loading
heap/hp_open.c +8 −2 Original line number Diff line number Diff line Loading @@ -157,8 +157,14 @@ static void init_block(HP_BLOCK *block, uint reclength, ulong min_records, max_records=1000; /* As good as quess as anything */ recbuffer=(uint) (reclength+sizeof(byte**)-1) & ~(sizeof(byte**)-1); records_in_block=max_records/10; if (records_in_block < 10 && max_records) records_in_block=10; if (records_in_block < HP_MIN_RECORDS_IN_BLOCK && max_records) records_in_block= HP_MIN_RECORDS_IN_BLOCK; /* Don't allocate too many rows at one time too keep memory consumption done when we don't need it. */ if (records_in_block > HP_MAX_RECORDS_IN_BLOCK) records_in_block= HP_MAX_RECORDS_IN_BLOCK; if (!records_in_block || records_in_block*recbuffer > (my_default_record_cache_size-sizeof(HP_PTRS)*HP_MAX_LEVELS)) records_in_block=(my_default_record_cache_size-sizeof(HP_PTRS)* Loading
mysql-test/r/distinct.result +1 −1 Original line number Diff line number Diff line Loading @@ -128,7 +128,7 @@ a 1 table type possible_keys key key_len ref rows Extra t1 index PRIMARY PRIMARY 4 NULL 2 Using index; Using temporary t3 ref a a 5 t1.a 10 Using index; Distinct t3 ref a a 5 t1.a 10 where used; Using index; Distinct a 1 2 Loading
mysql-test/r/null_key.result +6 −0 Original line number Diff line number Diff line Loading @@ -120,3 +120,9 @@ id uniq_id 4 2 7 3 8 4 order_id product_id product_type order_id product_id product_type 3d7ce39b5d4b3e3d22aaafe9b633de51 1206029 3 3d7ce39b5d4b3e3d22aaafe9b633de51 5880836 3 id id id id