Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
postgres-lambda-diff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Huber
postgres-lambda-diff
Commits
1fe8d171
Commit
1fe8d171
authored
16 years ago
by
Michael Meskes
Browse files
Options
Downloads
Patches
Plain Diff
Check for non-existant connection in prepare statement handling.
Do not close files that weren't opened.
parent
000086b4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/interfaces/ecpg/ChangeLog
+5
-0
5 additions, 0 deletions
src/interfaces/ecpg/ChangeLog
src/interfaces/ecpg/ecpglib/prepare.c
+7
-3
7 additions, 3 deletions
src/interfaces/ecpg/ecpglib/prepare.c
src/interfaces/ecpg/preproc/preproc.y
+5
-3
5 additions, 3 deletions
src/interfaces/ecpg/preproc/preproc.y
with
17 additions
and
6 deletions
src/interfaces/ecpg/ChangeLog
+
5
−
0
View file @
1fe8d171
...
@@ -2346,6 +2346,11 @@ Thu, 10 Apr 2008 12:42:25 +0200
...
@@ -2346,6 +2346,11 @@ Thu, 10 Apr 2008 12:42:25 +0200
- Fixed bug in PGTYPEStimestamp_sub that used pointers instead of the
- Fixed bug in PGTYPEStimestamp_sub that used pointers instead of the
values to substract.
values to substract.
Mon, 12 May 2008 18:19:08 +0200
- Check for non-existant connection in prepare statement handling.
- Do not close files that weren't opened.
- Set pgtypes library version to 3.1.
- Set pgtypes library version to 3.1.
- Set compat library version to 3.1.
- Set compat library version to 3.1.
- Set ecpg library version to 6.2.
- Set ecpg library version to 6.2.
...
...
This diff is collapsed.
Click to expand it.
src/interfaces/ecpg/ecpglib/prepare.c
+
7
−
3
View file @
1fe8d171
/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/prepare.c,v 1.2
6
2008/0
2/07 11:09:13
meskes Exp $ */
/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/prepare.c,v 1.2
7
2008/0
5/12 16:29:04
meskes Exp $ */
#define POSTGRES_ECPG_INTERNAL
#define POSTGRES_ECPG_INTERNAL
#include
"postgres_fe.h"
#include
"postgres_fe.h"
...
@@ -120,10 +120,11 @@ ECPGprepare(int lineno, const char *connection_name, const int questionmarks, co
...
@@ -120,10 +120,11 @@ ECPGprepare(int lineno, const char *connection_name, const int questionmarks, co
struct
sqlca_t
*
sqlca
=
ECPGget_sqlca
();
struct
sqlca_t
*
sqlca
=
ECPGget_sqlca
();
PGresult
*
query
;
PGresult
*
query
;
ecpg_init_sqlca
(
sqlca
);
con
=
ecpg_get_connection
(
connection_name
);
con
=
ecpg_get_connection
(
connection_name
);
if
(
!
ecpg_init
(
con
,
connection_name
,
lineno
))
return
false
;
/* check if we already have prepared this statement */
/* check if we already have prepared this statement */
this
=
find_prepared_statement
(
name
,
con
,
&
prev
);
this
=
find_prepared_statement
(
name
,
con
,
&
prev
);
if
(
this
&&
!
deallocate_one
(
lineno
,
ECPG_COMPAT_PGSQL
,
con
,
prev
,
this
))
if
(
this
&&
!
deallocate_one
(
lineno
,
ECPG_COMPAT_PGSQL
,
con
,
prev
,
this
))
...
@@ -256,6 +257,9 @@ ECPGdeallocate(int lineno, int c, const char *connection_name, const char *name)
...
@@ -256,6 +257,9 @@ ECPGdeallocate(int lineno, int c, const char *connection_name, const char *name)
con
=
ecpg_get_connection
(
connection_name
);
con
=
ecpg_get_connection
(
connection_name
);
if
(
!
ecpg_init
(
con
,
connection_name
,
lineno
))
return
false
;
this
=
find_prepared_statement
(
name
,
con
,
&
prev
);
this
=
find_prepared_statement
(
name
,
con
,
&
prev
);
if
(
this
)
if
(
this
)
return
deallocate_one
(
lineno
,
c
,
con
,
prev
,
this
);
return
deallocate_one
(
lineno
,
c
,
con
,
prev
,
this
);
...
...
This diff is collapsed.
Click to expand it.
src/interfaces/ecpg/preproc/preproc.y
+
5
−
3
View file @
1fe8d171
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/preproc.y,v 1.36
3
2008/0
3/27 07:56:00
meskes Exp $ */
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/preproc.y,v 1.36
4
2008/0
5/12 16:29:04
meskes Exp $ */
/* Copyright comment */
/* Copyright comment */
%{
%{
...
@@ -87,8 +87,10 @@ mmerror(int error_code, enum errortype type, char * error, ...)
...
@@ -87,8 +87,10 @@ mmerror(int error_code, enum errortype type, char * error, ...)
ret_value = error_code;
ret_value = error_code;
break;
break;
case ET_FATAL:
case ET_FATAL:
fclose(yyin);
if (yyin)
fclose(yyout);
fclose(yyin);
if (yyout)
fclose(yyout);
if (unlink(output_filename) != 0 && *output_filename != '-')
if (unlink(output_filename) != 0 && *output_filename != '-')
fprintf(stderr, "Could not remove output file %s!\n", output_filename);
fprintf(stderr, "Could not remove output file %s!\n", output_filename);
exit(error_code);
exit(error_code);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment