Commit 6c2925b8 authored by Bruce Momjian's avatar Bruce Momjian

Prevent empty queries from crashing server.

parent 02db1f58
......@@ -6,7 +6,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/parser.c,v 1.11 1996/11/13 20:49:07 scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/parser.c,v 1.12 1996/11/25 03:03:48 momjian Exp $
*
*-------------------------------------------------------------------------
*/
......@@ -69,10 +69,8 @@ parser(char *str, Oid *typev, int nargs)
init_io();
/* Set things up to read from the string, if there is one */
if (strlen(str) != 0) {
parseString = (char *) palloc(strlen(str) + 1);
memmove(parseString,str,strlen(str)+1);
}
parser_init(typev, nargs);
yyresult = yyparse();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment