Skip to content

Commit ee770ff

Browse files
authored
Merge pull request IvorySQL#1214 from Data-Bene/upstream/fix-GB18030-C90
Move GB18030 skip after buffer setup in test_escape
2 parents bb7d6f1 + c37c555 commit ee770ff

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

src/oracle_test/modules/test_escape/test_escape.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -633,10 +633,6 @@ test_psql_parse(pe_test_config *tc, PQExpBuffer testname,
633633
static void
634634
test_one_vector_escape(pe_test_config *tc, const pe_test_vector *tv, const pe_test_escape_func *ef)
635635
{
636-
if (strcmp(tv->client_encoding, "GB18030") == 0 &&
637-
(memchr(tv->escape, 0x81, tv->escape_len) != NULL)) {
638-
goto out;
639-
}
640636
PQExpBuffer testname;
641637
PQExpBuffer details;
642638
PQExpBuffer raw_buf;
@@ -656,6 +652,10 @@ test_one_vector_escape(pe_test_config *tc, const pe_test_vector *tv, const pe_te
656652
raw_buf = createPQExpBuffer();
657653
escape_buf = createPQExpBuffer();
658654

655+
if (strcmp(tv->client_encoding, "GB18030") == 0 &&
656+
(memchr(tv->escape, 0x81, tv->escape_len) != NULL))
657+
goto out;
658+
659659
if (ef->supports_only_ascii_overlap &&
660660
encoding_conflicts_ascii(PQclientEncoding(tc->conn)))
661661
{

src/test/modules/test_escape/test_escape.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -633,10 +633,6 @@ test_psql_parse(pe_test_config *tc, PQExpBuffer testname,
633633
static void
634634
test_one_vector_escape(pe_test_config *tc, const pe_test_vector *tv, const pe_test_escape_func *ef)
635635
{
636-
if (strcmp(tv->client_encoding, "GB18030") == 0 &&
637-
(memchr(tv->escape, 0x81, tv->escape_len) != NULL)) {
638-
goto out;
639-
}
640636
PQExpBuffer testname;
641637
PQExpBuffer details;
642638
PQExpBuffer raw_buf;
@@ -656,6 +652,10 @@ test_one_vector_escape(pe_test_config *tc, const pe_test_vector *tv, const pe_te
656652
raw_buf = createPQExpBuffer();
657653
escape_buf = createPQExpBuffer();
658654

655+
if (strcmp(tv->client_encoding, "GB18030") == 0 &&
656+
(memchr(tv->escape, 0x81, tv->escape_len) != NULL))
657+
goto out;
658+
659659
if (ef->supports_only_ascii_overlap &&
660660
encoding_conflicts_ascii(PQclientEncoding(tc->conn)))
661661
{

0 commit comments

Comments
 (0)