From cf6420dd942f87d3f13cd302af6df60f3ff42658 Mon Sep 17 00:00:00 2001 From: Michael Meskes Date: Sun, 19 Mar 2000 10:04:47 +0000 Subject: [PATCH] *** empty log message *** --- src/interfaces/ecpg/ChangeLog | 4 ++++ src/interfaces/ecpg/preproc/preproc.y | 10 +++++----- src/interfaces/ecpg/test/test1.pgc | 3 ++- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/interfaces/ecpg/ChangeLog b/src/interfaces/ecpg/ChangeLog index 712a4a02ab..806c6e56e7 100644 --- a/src/interfaces/ecpg/ChangeLog +++ b/src/interfaces/ecpg/ChangeLog @@ -867,5 +867,9 @@ Wed Mar 15 17:36:02 CET 2000 - Synced preproc.y with gram.y. - Synced pgc.l with scan.l. - Synced keyword.c. + +Sun Mar 19 11:03:13 CET 2000 + + - Fixed quoting bug in disconnect statement. - Set library version to 3.1.0. - Set ecpg version to 2.7.0. diff --git a/src/interfaces/ecpg/preproc/preproc.y b/src/interfaces/ecpg/preproc/preproc.y index 1a76984c53..386097a48d 100644 --- a/src/interfaces/ecpg/preproc/preproc.y +++ b/src/interfaces/ecpg/preproc/preproc.y @@ -486,7 +486,7 @@ stmt: AlterTableStmt { output_statement($1, 0, NULL, connection); } if (connection) mmerror(ET_ERROR, "no at option for disconnect statement.\n"); - fprintf(yyout, "{ ECPGdisconnect(__LINE__, \"%s\");", $1); + fprintf(yyout, "{ ECPGdisconnect(__LINE__, %s);", $1); whenever_action(2); free($1); } @@ -4372,12 +4372,12 @@ ECPGDeclare: DECLARE STATEMENT ident ECPGDisconnect: SQL_DISCONNECT dis_name { $$ = $2; } dis_name: connection_object { $$ = $1; } - | CURRENT { $$ = make_str("CURRENT"); } - | ALL { $$ = make_str("ALL"); } - | /* empty */ { $$ = make_str("CURRENT"); } + | CURRENT { $$ = make_str("\"CURRENT\""); } + | ALL { $$ = make_str("\"ALL\""); } + | /* empty */ { $$ = make_str("\"CURRENT\""); } connection_object: connection_target { $$ = $1; } - | DEFAULT { $$ = make_str("DEFAULT"); } + | DEFAULT { $$ = make_str("\"DEFAULT\""); } /* * execute a given string as sql command diff --git a/src/interfaces/ecpg/test/test1.pgc b/src/interfaces/ecpg/test/test1.pgc index 5bbabc6a44..cb79d74644 100644 --- a/src/interfaces/ecpg/test/test1.pgc +++ b/src/interfaces/ecpg/test/test1.pgc @@ -126,7 +126,8 @@ exec sql end declare section; exec sql at pm commit; strcpy(msg, "disconnect"); - exec sql disconnect all; + exec sql disconnect main; + exec sql disconnect pm; if (dbgs != NULL) fclose(dbgs); -- 2.40.0