1
0
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:
Alexander Barkov
2018-08-07 10:48:42 +04:00
parent 01e4426a63
commit cb7b5fbf1c
26 changed files with 595 additions and 847 deletions

View File

@ -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;
}