This is an automated email from the ASF dual-hosted git repository.
chenjinbao1989 pushed a commit to branch cbdb-postgres-merge
in repository https://gitbox.apache.org/repos/asf/cloudberry.git
The following commit(s) were added to refs/heads/cbdb-postgres-merge by this
push:
new 39d532208b6 Fix conflicts for fe_tils
39d532208b6 is described below
commit 39d532208b640ac239120b6fffa72039905b69a1
Author: Jinbao Chen <[email protected]>
AuthorDate: Wed Oct 8 19:50:59 2025 +0800
Fix conflicts for fe_tils
---
src/Makefile.global.in | 16 ++++----
src/fe_utils/cancel.c | 4 --
src/fe_utils/string_utils.c | 99 ---------------------------------------------
3 files changed, 8 insertions(+), 111 deletions(-)
diff --git a/src/Makefile.global.in b/src/Makefile.global.in
index 320d4dd1b3b..eb91ddaa065 100644
--- a/src/Makefile.global.in
+++ b/src/Makefile.global.in
@@ -871,14 +871,14 @@ TAS = @TAS@
#
# Global targets and rules
-%.c: %.l
-ifdef FLEX
- $(FLEX) $(if $(FLEX_NO_BACKUP),-b) $(FLEXFLAGS) -o'$@' $<
- @$(if $(FLEX_NO_BACKUP),if [ `wc -l <lex.backup` -eq 1 ]; then rm
lex.backup; else echo "Scanner requires backup; see lex.backup." 1>&2; exit 1;
fi)
- $(if $(FLEX_FIX_WARNING),$(PERL)
$(top_srcdir)/src/tools/fix-old-flex-code.pl '$@')
-else
- @$(missing) flex $< '$@'
-endif
+#%.c: %.l
+#ifdef FLEX
+# $(FLEX) $(if $(FLEX_NO_BACKUP),-b) $(FLEXFLAGS) -o'$@' $<
+# @$(if $(FLEX_NO_BACKUP),if [ `wc -l <lex.backup` -eq 1 ]; then rm
lex.backup; else echo "Scanner requires backup; see lex.backup." 1>&2; exit 1;
fi)
+# $(if $(FLEX_FIX_WARNING),$(PERL)
$(top_srcdir)/src/tools/fix-old-flex-code.pl '$@')
+#else
+# @$(missing) flex $< '$@'
+#endif
%.c: %.y
$(if $(BISON_CHECK_CMD),$(BISON_CHECK_CMD))
diff --git a/src/fe_utils/cancel.c b/src/fe_utils/cancel.c
index 3e0df11a138..10c0cd45545 100644
--- a/src/fe_utils/cancel.c
+++ b/src/fe_utils/cancel.c
@@ -185,11 +185,7 @@ handle_sigint(SIGNAL_ARGS)
void
setup_cancel_handler(void (*query_cancel_callback) (void))
{
-<<<<<<< HEAD
- cancel_callback = callback;
-=======
cancel_callback = query_cancel_callback;
->>>>>>> REL_16_9
cancel_sent_msg = _("Cancel request sent\n");
cancel_not_sent_msg = _("Could not send cancel request: ");
diff --git a/src/fe_utils/string_utils.c b/src/fe_utils/string_utils.c
index 1f613912d9a..c6e2770e917 100644
--- a/src/fe_utils/string_utils.c
+++ b/src/fe_utils/string_utils.c
@@ -180,7 +180,6 @@ fmtIdEnc(const char *rawid, int encoding)
/* Slow path for possible multibyte characters */
charlen = pg_encoding_mblen(encoding, cp);
-<<<<<<< HEAD
if (remaining < charlen)
{
/*
@@ -228,44 +227,6 @@ fmtIdEnc(const char *rawid, int encoding)
*/
remaining -= charlen;
cp += charlen;
-=======
- if (remaining < charlen ||
- pg_encoding_verifymbchar(encoding, cp, charlen)
== -1)
- {
- /*
- * Multibyte character is invalid. It's
important to verify
- * that as invalid multibyte characters could
e.g. be used to
- * "skip" over quote characters, e.g. when
parsing
- * character-by-character.
- *
- * Replace the character's first byte with an
invalid
- * sequence. The invalid sequence ensures that
the escaped
- * string will trigger an error on the
server-side, even if we
- * can't directly report an error here.
- *
- * It would be a bit faster to verify the whole
string the
- * first time we encounter a set highbit, but
this way we can
- * replace just the invalid data, which
probably makes it
- * easier for users to find the invalidly
encoded portion of a
- * larger string.
- */
- if (enlargePQExpBuffer(id_return, 2))
- {
- pg_encoding_set_invalid(encoding,
-
id_return->data + id_return->len);
- id_return->len += 2;
- id_return->data[id_return->len] = '\0';
- }
-
- /*
- * Handle the following bytes as if this byte
didn't exist.
- * That's safer in case the subsequent bytes
contain
- * characters that are significant for the
caller (e.g. '>' in
- * html).
- */
- remaining--;
- cp++;
->>>>>>> REL_16_9
}
else
{
@@ -434,7 +395,6 @@ appendStringLiteral(PQExpBuffer buf, const char *str,
/* Slow path for possible multibyte characters */
charlen = PQmblen(source, encoding);
-<<<<<<< HEAD
if (remaining < charlen)
{
/*
@@ -442,58 +402,16 @@ appendStringLiteral(PQExpBuffer buf, const char *str,
* the string with an invalid sequence. The invalid
sequence
* ensures that the escaped string will trigger an
error on the
* server-side, even if we can't directly report an
error here.
-=======
- if (remaining < charlen ||
- pg_encoding_verifymbchar(encoding, source, charlen) ==
-1)
- {
- /*
- * Multibyte character is invalid. It's important to
verify that
- * as invalid multibyte characters could e.g. be used
to "skip"
- * over quote characters, e.g. when parsing
- * character-by-character.
- *
- * Replace the character's first byte with an invalid
sequence.
- * The invalid sequence ensures that the escaped string
will
- * trigger an error on the server-side, even if we
can't directly
- * report an error here.
->>>>>>> REL_16_9
*
* We know there's enough space for the invalid
sequence because
* the "target" buffer is 2 * length + 2 long, and at
worst we're
* replacing a single input byte with two invalid bytes.
-<<<<<<< HEAD
-=======
- *
- * It would be a bit faster to verify the whole string
the first
- * time we encounter a set highbit, but this way we can
replace
- * just the invalid data, which probably makes it
easier for users
- * to find the invalidly encoded portion of a larger
string.
->>>>>>> REL_16_9
*/
pg_encoding_set_invalid(encoding, target);
target += 2;
-<<<<<<< HEAD
/* there's no more valid input data, so we can stop */
break;
-=======
- /*
- * Handle the following bytes as if this byte didn't
exist. That's
- * safer in case the subsequent bytes contain important
characters
- * for the caller (e.g. '>' in html).
- */
- source++;
- remaining--;
- }
- else
- {
- /* Copy the character */
- for (i = 0; i < charlen; i++)
- {
- *target++ = *source++;
- remaining--;
- }
->>>>>>> REL_16_9
}
else if (pg_encoding_verifymbchar(encoding, source, charlen) ==
-1)
{
@@ -1195,14 +1113,9 @@ processSQLNamePattern(PGconn *conn, PQExpBuffer buf,
const char *pattern,
*/
patternToSQLRegex(PQclientEncoding(conn),
(schemavar ? dbnamebuf : NULL),
-<<<<<<< HEAD
- (schemavar ? &schemabuf: NULL),
- &namebuf, pattern, force_escape,
true, dotcnt);
-=======
(schemavar ? &schemabuf : NULL),
&namebuf,
pattern, force_escape, true, dotcnt);
->>>>>>> REL_16_9
/*
* Now decide what we need to emit. We may run under a hostile
@@ -1485,18 +1398,6 @@ patternToSQLRegex(int encoding, PQExpBuffer dbnamebuf,
PQExpBuffer schemabuf,
appendPQExpBufferStr(schemabuf, curbuf->data);
termPQExpBuffer(curbuf);
curbuf--;
-<<<<<<< HEAD
- }
-
- if (dbnamebuf && curbuf >= buf)
- {
- if (want_literal_dbname)
- appendPQExpBufferStr(dbnamebuf, left_literal.data);
- else
- appendPQExpBufferStr(dbnamebuf, curbuf->data);
- termPQExpBuffer(curbuf);
-=======
->>>>>>> REL_16_9
}
if (dbnamebuf && curbuf >= buf)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]