MCPcopy Create free account
hub / github.com/Meituan-Dianping/SQLAdvisor / store_decimal

Method store_decimal

sql/protocol.cc:851–862  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

849
850
851bool Protocol_text::store_decimal(const my_decimal *d)
852{
853#ifndef DBUG_OFF
854 DBUG_ASSERT(field_types == 0 ||
855 field_types[field_pos] == MYSQL_TYPE_NEWDECIMAL);
856 field_pos++;
857#endif
858 char buff[DECIMAL_MAX_STR_LENGTH + 1];
859 String str(buff, sizeof(buff), &my_charset_bin);
860 (void) my_decimal2string(E_DEC_FATAL_ERROR, d, 0, 0, 0, &str);
861 return net_store_data((uchar*) str.ptr(), str.length());
862}
863
864
865bool Protocol_text::store(float from, uint32 decimals, String *buffer)

Callers

nothing calls this directly

Calls 5

my_decimal2stringFunction · 0.85
net_store_dataFunction · 0.85
ptrMethod · 0.45
lengthMethod · 0.45
charsetMethod · 0.45

Tested by

no test coverage detected