Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0755d2b

Browse files
committed
Change query_text constant pointer.
Earlier it was pointed to pstate->p_sourcetext - Query C-string. It was detected by valgrind as an error. Now we use strdup() and store Query source string into query_text variable.
1 parent1bc93c6 commit0755d2b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎preprocessing.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
"SELECT 1 FROM ONLY \"public\".\"aqo_queries\" x WHERE \"query_hash\"\
5757
OPERATOR(pg_catalog.=) $1 FOR KEY SHARE OF x"
5858

59-
staticconstchar*query_text;
59+
staticchar*query_text=NULL;
6060
staticboolisQueryUsingSystemRelation(Query*query);
6161
staticboolisQueryUsingSystemRelation_walker(Node*node,void*context);
6262

@@ -68,7 +68,7 @@ void
6868
get_query_text(ParseState*pstate,Query*query)
6969
{
7070
if (pstate)
71-
query_text=pstate->p_sourcetext;
71+
Assert((query_text=strdup(pstate->p_sourcetext))!=NULL);
7272

7373
if (prev_post_parse_analyze_hook)
7474
prev_post_parse_analyze_hook(pstate,query);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp