Fix prepare stmt error 4016
This commit is contained in:
6
deps/oblib/src/lib/number/ob_number_v2.cpp
vendored
6
deps/oblib/src/lib/number/ob_number_v2.cpp
vendored
@ -3539,7 +3539,11 @@ int ObNumber::to_sci_str_(ObString &num_str, char *buf,
|
||||
}
|
||||
buf[digit_start_pos] = '1';
|
||||
buf[digit_start_pos + 1] = '.';
|
||||
++pow_size;
|
||||
if ('-' == pow_str[1]) {
|
||||
--pow_size;
|
||||
} else {
|
||||
++pow_size;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1696,7 +1696,11 @@ int ObNFMBase::num_str_to_sci(const common::ObString &num_str, const int32_t sca
|
||||
if (decimal_appear) {
|
||||
buf[digit_start_pos + 1] = '.';
|
||||
}
|
||||
++pow_size;
|
||||
if ('-' == pow_str[1]) {
|
||||
--pow_size;
|
||||
} else {
|
||||
++pow_size;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -54,7 +54,7 @@ int ObPrepareResolver::resolve(const ParseNode &parse_tree)
|
||||
prepare_stmt->set_prepare_sql(stmt_expr);
|
||||
}
|
||||
} else {
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
ret = OB_ERR_PARSER_SYNTAX;
|
||||
LOG_WARN("invalid name node", K(name_node->type_), K(ret));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user