mirror of
https://github.com/postgres/postgres.git
synced 2025-06-27 23:21:58 +03:00
Fix another small oversight in command_no_begin patch.
Need a "return false" to prevent tests from continuing after we've moved the "query" pointer. As it stood, it'd accept "DROP DISCARD ALL" as a match.
This commit is contained in:
@ -1350,6 +1350,7 @@ command_no_begin(const char *query)
|
|||||||
return true;
|
return true;
|
||||||
if (wordlen == 10 && pg_strncasecmp(query, "tablespace", 10) == 0)
|
if (wordlen == 10 && pg_strncasecmp(query, "tablespace", 10) == 0)
|
||||||
return true;
|
return true;
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* DISCARD ALL isn't allowed in xacts, but other variants are allowed. */
|
/* DISCARD ALL isn't allowed in xacts, but other variants are allowed. */
|
||||||
@ -1365,6 +1366,7 @@ command_no_begin(const char *query)
|
|||||||
|
|
||||||
if (wordlen == 3 && pg_strncasecmp(query, "all", 3) == 0)
|
if (wordlen == 3 && pg_strncasecmp(query, "all", 3) == 0)
|
||||||
return true;
|
return true;
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
Reference in New Issue
Block a user