fix check_db_and_table_is_exist func when table name with special symbol

This commit is contained in:
obdev
2023-06-12 07:42:17 +00:00
committed by ob-robot
parent bb98de773c
commit 78df99f897
5 changed files with 60 additions and 30 deletions

View File

@ -2221,7 +2221,7 @@ DEF_TO_STRING(ObHexEscapeSqlStr)
int64_t buf_pos = 0;
if (buf != NULL && buf_len > 0 && !str_.empty()) {
const char *end = str_.ptr() + str_.length();
if (lib::is_oracle_mode()) {
if (do_oracle_mode_escape_) {
for (const char *cur = str_.ptr(); cur < end && buf_pos < buf_len; ++cur) {
if ('\'' == *cur) {
//在oracle模式中,只处理单引号转义
@ -2301,7 +2301,7 @@ int64_t ObHexEscapeSqlStr::get_extra_length() const
int64_t ret_length = 0;
if (!str_.empty()) {
const char *end = str_.ptr() + str_.length();
if (lib::is_oracle_mode()) {
if (do_oracle_mode_escape_) {
for (const char *cur = str_.ptr(); cur < end; ++cur) {
if ('\'' == *cur) {
++ret_length;