mirror of
https://github.com/MariaDB/server.git
synced 2026-05-14 19:07:15 +02:00
Polishing: use constants instead of magic numbers.
include/my_global.h: Introduce constants to be used instead of magic numbers. sql/field.cc: Polishing: use contants instead of magic numbers. sql/ha_innodb.cc: Polishing: use contants instead of magic numbers. sql/handler.cc: Polishing: use contants instead of magic numbers. sql/item.cc: Polishing: use contants instead of magic numbers. sql/item.h: Polishing: use contants instead of magic numbers. sql/item_func.cc: Polishing: use contants instead of magic numbers. sql/item_subselect.cc: Polishing: use contants instead of magic numbers. sql/log_event.cc: Polishing: use contants instead of magic numbers. sql/sql_base.cc: Polishing: use contants instead of magic numbers. sql/sql_select.cc: Polishing: use contants instead of magic numbers. sql/sql_show.cc: Polishing: use contants instead of magic numbers. sql/sql_table.cc: Polishing: use contants instead of magic numbers.
This commit is contained in:
parent
980569877a
commit
a0521cd749
13 changed files with 72 additions and 48 deletions
|
|
@ -1203,12 +1203,12 @@ static bool test_if_real(const char *str,int length, CHARSET_INFO *cs)
|
|||
String *Field::val_int_as_str(String *val_buffer, my_bool unsigned_val)
|
||||
{
|
||||
CHARSET_INFO *cs= &my_charset_bin;
|
||||
uint length= 21;
|
||||
uint length;
|
||||
longlong value= val_int();
|
||||
if (val_buffer->alloc(length))
|
||||
if (val_buffer->alloc(MY_INT64_NUM_DECIMAL_DIGITS))
|
||||
return 0;
|
||||
length= (uint) (*cs->cset->longlong10_to_str)(cs, (char*) val_buffer->ptr(),
|
||||
length,
|
||||
MY_INT64_NUM_DECIMAL_DIGITS,
|
||||
unsigned_val ? 10 : -10,
|
||||
value);
|
||||
val_buffer->length(length);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue