mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-16910 Add class VDec
Adding classes VDec and VDec2_lazy, according to the task description. This patch removes around 250 duplicate code lines.
This commit is contained in:
@ -5298,16 +5298,8 @@ bool Protocol_local::store_longlong(longlong value, bool unsigned_flag)
|
||||
|
||||
bool Protocol_local::store_decimal(const my_decimal *value)
|
||||
{
|
||||
char buf[DECIMAL_MAX_STR_LENGTH];
|
||||
String str(buf, sizeof (buf), &my_charset_bin);
|
||||
int rc;
|
||||
|
||||
rc= my_decimal2string(E_DEC_FATAL_ERROR, value, 0, 0, 0, &str);
|
||||
|
||||
if (rc)
|
||||
return TRUE;
|
||||
|
||||
return store_column(str.ptr(), str.length());
|
||||
StringBuffer<DECIMAL_MAX_STR_LENGTH> str;
|
||||
return value->to_string(&str) ? store_column(str.ptr(), str.length()) : true;
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user