Check oracle mode negative zero when double_cell_str with binary type
This commit is contained in:
3
deps/oblib/src/rpc/obmysql/ob_mysql_util.cpp
vendored
3
deps/oblib/src/rpc/obmysql/ob_mysql_util.cpp
vendored
@ -898,7 +898,8 @@ int ObMySQLUtil::double_cell_str(char *buf, const int64_t len, double val,
|
||||
LOG_WARN("invalid input", KP(buf), K(ret));
|
||||
} else {
|
||||
if (BINARY == type) {
|
||||
if (std::fpclassify(val) == FP_ZERO && std::signbit(val)) {
|
||||
if (lib::is_oracle_mode() && // only oracle mode need convert
|
||||
std::fpclassify(val) == FP_ZERO && std::signbit(val)) {
|
||||
val = val * -1; // if -0.0, change to 0.0
|
||||
}
|
||||
if (len - pos > DBL_SIZE) {
|
||||
|
||||
Reference in New Issue
Block a user