[cp]: fix 4 bugs for NO_BACKSLASH_ESCAPES mode.

This commit is contained in:
Monk-Liu
2021-11-30 11:13:39 +08:00
committed by LINxiansheng
parent e28151b107
commit db82de6a5b
10 changed files with 70 additions and 13 deletions

View File

@ -1395,6 +1395,11 @@ DEF_TO_STRING(ObHexEscapeSqlStr)
buf[buf_pos++] = *cur;
}
}
} else if (skip_escape_) {
// do not escape_ while in NO_BACKSLASH_ESCAPES mode
for (const char *cur = str_.ptr(); cur < end && buf_pos < buf_len; ++cur) {
buf[buf_pos++] = *cur;
}
} else {
for (const char* cur = str_.ptr(); cur < end && buf_pos < buf_len; ++cur) {
switch (*cur) {