Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
3f9aace7
Commit
3f9aace7
authored
Jun 21, 2006
by
Michael Meskes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added some more coverity report patches send in by Martijn van Oosterhout <kleptog@svana.org>.
parent
6bba4311
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
5 deletions
+13
-5
src/interfaces/ecpg/ChangeLog
src/interfaces/ecpg/ChangeLog
+5
-0
src/interfaces/ecpg/ecpglib/connect.c
src/interfaces/ecpg/ecpglib/connect.c
+4
-1
src/interfaces/ecpg/ecpglib/execute.c
src/interfaces/ecpg/ecpglib/execute.c
+2
-2
src/interfaces/ecpg/ecpglib/misc.c
src/interfaces/ecpg/ecpglib/misc.c
+2
-2
No files found.
src/interfaces/ecpg/ChangeLog
View file @
3f9aace7
...
@@ -2021,5 +2021,10 @@ We Jun 21 09:24:53 CEST 2006
...
@@ -2021,5 +2021,10 @@ We Jun 21 09:24:53 CEST 2006
- Added fixes from the coverity report send in by Joachim Wieland
- Added fixes from the coverity report send in by Joachim Wieland
<joe@mcknight.de>.
<joe@mcknight.de>.
- Added missing error handling in a few functions in ecpglib.
- Added missing error handling in a few functions in ecpglib.
we Jun 21 13:37:00 CEST 2006
- Added some more coverity report patches send in by Martijn van
Oosterhout <kleptog@svana.org>.
- Set ecpg library version to 5.2.
- Set ecpg library version to 5.2.
- Set ecpg version to 4.2.1.
- Set ecpg version to 4.2.1.
src/interfaces/ecpg/ecpglib/connect.c
View file @
3f9aace7
/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/connect.c,v 1.
29 2006/06/21 10:24:40
meskes Exp $ */
/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/connect.c,v 1.
30 2006/06/21 11:38:07
meskes Exp $ */
#define POSTGRES_ECPG_INTERNAL
#define POSTGRES_ECPG_INTERNAL
#include "postgres_fe.h"
#include "postgres_fe.h"
...
@@ -227,6 +227,9 @@ ECPGnoticeReceiver(void *arg, const PGresult *result)
...
@@ -227,6 +227,9 @@ ECPGnoticeReceiver(void *arg, const PGresult *result)
if
(
sqlstate
==
NULL
)
if
(
sqlstate
==
NULL
)
sqlstate
=
ECPG_SQLSTATE_ECPG_INTERNAL_ERROR
;
sqlstate
=
ECPG_SQLSTATE_ECPG_INTERNAL_ERROR
;
if
(
message
==
NULL
)
/* Shouldn't happen, but need to be sure */
message
=
"No message received"
;
/* these are not warnings */
/* these are not warnings */
if
(
strncmp
(
sqlstate
,
"00"
,
2
)
==
0
)
if
(
strncmp
(
sqlstate
,
"00"
,
2
)
==
0
)
return
;
return
;
...
...
src/interfaces/ecpg/ecpglib/execute.c
View file @
3f9aace7
/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/execute.c,v 1.4
7 2006/06/21 10:24:40
meskes Exp $ */
/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/execute.c,v 1.4
8 2006/06/21 11:38:07
meskes Exp $ */
/*
/*
* The aim is to get a simpler inteface to the database routines.
* The aim is to get a simpler inteface to the database routines.
...
@@ -891,7 +891,6 @@ ECPGstore_input(const int lineno, const bool force_indicator, const struct varia
...
@@ -891,7 +891,6 @@ ECPGstore_input(const int lineno, const bool force_indicator, const struct varia
PGTYPESnumeric_from_decimal
((
decimal
*
)
((
var
+
var
->
offset
*
element
)
->
value
),
nval
);
PGTYPESnumeric_from_decimal
((
decimal
*
)
((
var
+
var
->
offset
*
element
)
->
value
),
nval
);
str
=
PGTYPESnumeric_to_asc
(
nval
,
nval
->
dscale
);
str
=
PGTYPESnumeric_to_asc
(
nval
,
nval
->
dscale
);
PGTYPESnumeric_free
(
nval
);
slen
=
strlen
(
str
);
slen
=
strlen
(
str
);
if
(
!
(
mallocedval
=
ECPGrealloc
(
mallocedval
,
strlen
(
mallocedval
)
+
slen
+
sizeof
(
"array [] "
),
lineno
)))
if
(
!
(
mallocedval
=
ECPGrealloc
(
mallocedval
,
strlen
(
mallocedval
)
+
slen
+
sizeof
(
"array [] "
),
lineno
)))
...
@@ -907,6 +906,7 @@ ECPGstore_input(const int lineno, const bool force_indicator, const struct varia
...
@@ -907,6 +906,7 @@ ECPGstore_input(const int lineno, const bool force_indicator, const struct varia
strncpy
(
mallocedval
+
strlen
(
mallocedval
),
str
,
slen
+
1
);
strncpy
(
mallocedval
+
strlen
(
mallocedval
),
str
,
slen
+
1
);
strcpy
(
mallocedval
+
strlen
(
mallocedval
),
","
);
strcpy
(
mallocedval
+
strlen
(
mallocedval
),
","
);
}
}
PGTYPESnumeric_free
(
nval
);
strcpy
(
mallocedval
+
strlen
(
mallocedval
)
-
1
,
"]"
);
strcpy
(
mallocedval
+
strlen
(
mallocedval
)
-
1
,
"]"
);
}
}
else
else
...
...
src/interfaces/ecpg/ecpglib/misc.c
View file @
3f9aace7
/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/misc.c,v 1.2
6 2005/10/15 02:49:47 momjian
Exp $ */
/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/misc.c,v 1.2
7 2006/06/21 11:38:07 meskes
Exp $ */
#define POSTGRES_ECPG_INTERNAL
#define POSTGRES_ECPG_INTERNAL
#include "postgres_fe.h"
#include "postgres_fe.h"
...
@@ -179,7 +179,7 @@ ECPGtrans(int lineno, const char *connection_name, const char *transaction)
...
@@ -179,7 +179,7 @@ ECPGtrans(int lineno, const char *connection_name, const char *transaction)
if
(
!
ECPGinit
(
con
,
connection_name
,
lineno
))
if
(
!
ECPGinit
(
con
,
connection_name
,
lineno
))
return
(
false
);
return
(
false
);
ECPGlog
(
"ECPGtrans line %d action = %s connection = %s
\n
"
,
lineno
,
transaction
,
con
->
name
);
ECPGlog
(
"ECPGtrans line %d action = %s connection = %s
\n
"
,
lineno
,
transaction
,
con
?
con
->
name
:
"(nil)"
);
/* if we have no connection we just simulate the command */
/* if we have no connection we just simulate the command */
if
(
con
&&
con
->
connection
)
if
(
con
&&
con
->
connection
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment