Added a function comment to Field_varstring::mark_unused_memory_as_defined()
This commit is contained in:
parent
8d37ef2999
commit
4ea1c48abe
13
sql/field.cc
13
sql/field.cc
@ -7867,6 +7867,19 @@ bool Field_varstring::send(Protocol *protocol)
|
|||||||
|
|
||||||
|
|
||||||
#ifdef HAVE_MEM_CHECK
|
#ifdef HAVE_MEM_CHECK
|
||||||
|
|
||||||
|
/*
|
||||||
|
Mark the unused part of the varstring as defined.
|
||||||
|
|
||||||
|
This function is only used be Unique when calculating statistics.
|
||||||
|
|
||||||
|
The marking is needed as we write the whole tree to disk in case of
|
||||||
|
overflows. For using or comparing values the undefined value part
|
||||||
|
is never used. We could also use bzero() here, but it would be
|
||||||
|
slower in production environments.
|
||||||
|
This function is tested by main.stat_tables-enospc
|
||||||
|
*/
|
||||||
|
|
||||||
void Field_varstring::mark_unused_memory_as_defined()
|
void Field_varstring::mark_unused_memory_as_defined()
|
||||||
{
|
{
|
||||||
uint used_length __attribute__((unused)) = get_length();
|
uint used_length __attribute__((unused)) = get_length();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user