dbms: development.

This commit is contained in:
Alexey Milovidov 2010-06-04 18:34:25 +00:00
parent 167a7b19c0
commit 6951a0b7c1

View File

@ -41,7 +41,7 @@ void writeIntText(T x, WriteBuffer & buf)
if (res >= WRITE_HELPERS_MAX_INT_WIDTH || res <= 0) if (res >= WRITE_HELPERS_MAX_INT_WIDTH || res <= 0)
throw Exception("Cannot print integer", ErrorCodes::CANNOT_PRINT_INTEGER); throw Exception("Cannot print integer", ErrorCodes::CANNOT_PRINT_INTEGER);
buf.write(tmp, res - 1); buf.write(tmp, res);
} }
template <typename T> template <typename T>
@ -54,7 +54,7 @@ void writeFloatText(T x, WriteBuffer & buf, unsigned precision = WRITE_HELPERS_D
if (res >= static_cast<int>(size) || res <= 0) if (res >= static_cast<int>(size) || res <= 0)
throw Exception("Cannot print float or double number", ErrorCodes::CANNOT_PRINT_FLOAT_OR_DOUBLE_NUMBER); throw Exception("Cannot print float or double number", ErrorCodes::CANNOT_PRINT_FLOAT_OR_DOUBLE_NUMBER);
buf.write(tmp, res - 1); buf.write(tmp, res);
} }
inline void writeString(const String & s, WriteBuffer & buf) inline void writeString(const String & s, WriteBuffer & buf)