Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit cf6420d

Browse files
author
Michael Meskes
committed
*** empty log message ***
1 parent a73b756 commit cf6420d

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

src/interfaces/ecpg/ChangeLog

+4
Original file line numberDiff line numberDiff line change
@@ -867,5 +867,9 @@ Wed Mar 15 17:36:02 CET 2000
867867
- Synced preproc.y with gram.y.
868868
- Synced pgc.l with scan.l.
869869
- Synced keyword.c.
870+
871+
Sun Mar 19 11:03:13 CET 2000
872+
873+
- Fixed quoting bug in disconnect statement.
870874
- Set library version to 3.1.0.
871875
- Set ecpg version to 2.7.0.

src/interfaces/ecpg/preproc/preproc.y

+5-5
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ stmt: AlterTableStmt { output_statement($1, 0, NULL, connection); }
486486
if (connection)
487487
mmerror(ET_ERROR, "no at option for disconnect statement.\n");
488488

489-
fprintf(yyout, "{ ECPGdisconnect(__LINE__, \"%s\");", $1);
489+
fprintf(yyout, "{ ECPGdisconnect(__LINE__, %s);", $1);
490490
whenever_action(2);
491491
free($1);
492492
}
@@ -4372,12 +4372,12 @@ ECPGDeclare: DECLARE STATEMENT ident
43724372
ECPGDisconnect: SQL_DISCONNECT dis_name { $$ = $2; }
43734373

43744374
dis_name: connection_object { $$ = $1; }
4375-
| CURRENT { $$ = make_str("CURRENT"); }
4376-
| ALL { $$ = make_str("ALL"); }
4377-
| /* empty */ { $$ = make_str("CURRENT"); }
4375+
| CURRENT { $$ = make_str("\"CURRENT\""); }
4376+
| ALL { $$ = make_str("\"ALL\""); }
4377+
| /* empty */ { $$ = make_str("\"CURRENT\""); }
43784378

43794379
connection_object: connection_target { $$ = $1; }
4380-
| DEFAULT { $$ = make_str("DEFAULT"); }
4380+
| DEFAULT { $$ = make_str("\"DEFAULT\""); }
43814381

43824382
/*
43834383
* execute a given string as sql command

src/interfaces/ecpg/test/test1.pgc

+2-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,8 @@ exec sql end declare section;
126126
exec sql at pm commit;
127127

128128
strcpy(msg, "disconnect");
129-
exec sql disconnect all;
129+
exec sql disconnect main;
130+
exec sql disconnect pm;
130131

131132
if (dbgs != NULL)
132133
fclose(dbgs);

0 commit comments

Comments
 (0)