mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
Merge of mysql-5.1-bugteam into mysql-trunk-merge.
This commit is contained in:
@@ -408,7 +408,7 @@ void field_real::add()
|
||||
|
||||
if ((decs = decimals()) == NOT_FIXED_DEC)
|
||||
{
|
||||
length= my_sprintf(buff, (buff, "%g", num));
|
||||
length= sprintf(buff, "%g", num);
|
||||
if (rint(num) != num)
|
||||
max_notzero_dec_len = 1;
|
||||
}
|
||||
@@ -419,7 +419,7 @@ void field_real::add()
|
||||
snprintf(buff, sizeof(buff)-1, "%-.*f", (int) decs, num);
|
||||
length = (uint) strlen(buff);
|
||||
#else
|
||||
length= my_sprintf(buff, (buff, "%-.*f", (int) decs, num));
|
||||
length= sprintf(buff, "%-.*f", (int) decs, num);
|
||||
#endif
|
||||
|
||||
// We never need to check further than this
|
||||
@@ -1006,9 +1006,9 @@ void field_decimal::get_opt_type(String *answer,
|
||||
my_decimal_set_zero(&zero);
|
||||
my_bool is_unsigned= (my_decimal_cmp(&zero, &min_arg) >= 0);
|
||||
|
||||
length= my_sprintf(buff, (buff, "DECIMAL(%d, %d)",
|
||||
(int) (max_length - (item->decimals ? 1 : 0)),
|
||||
item->decimals));
|
||||
length= my_snprintf(buff, sizeof(buff), "DECIMAL(%d, %d)",
|
||||
(int) (max_length - (item->decimals ? 1 : 0)),
|
||||
item->decimals);
|
||||
if (is_unsigned)
|
||||
length= (uint) (strmov(buff+length, " UNSIGNED")- buff);
|
||||
answer->append(buff, length);
|
||||
|
||||
Reference in New Issue
Block a user