Commit 88d639e6 authored by Bruce Momjian's avatar Bruce Momjian

Protect from null param on ecpg disconnect, verified by Roland Karch

parent 0f8e9b4d
/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/Attic/preproc.y,v 1.204 2002/12/12 21:50:01 momjian Exp $ */ /* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/Attic/preproc.y,v 1.205 2002/12/13 20:29:07 momjian Exp $ */
/* Copyright comment */ /* Copyright comment */
%{ %{
...@@ -554,7 +554,8 @@ stmt: AlterDatabaseSetStmt { output_statement($1, 0, connection); } ...@@ -554,7 +554,8 @@ stmt: AlterDatabaseSetStmt { output_statement($1, 0, connection); }
if (connection) if (connection)
mmerror(PARSE_ERROR, ET_ERROR, "no at option for disconnect statement.\n"); mmerror(PARSE_ERROR, ET_ERROR, "no at option for disconnect statement.\n");
fprintf(yyout, "{ ECPGdisconnect(__LINE__, %s);", $1); fprintf(yyout, "{ ECPGdisconnect(__LINE__, %s);",
$1 ? $1 : "\"CURRENT\"");
whenever_action(2); whenever_action(2);
free($1); free($1);
} }
......
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