From c05abfb1a845e1bf5e66638ee2b83609468ebfd6 Mon Sep 17 00:00:00 2001 From: Michael Meskes Date: Fri, 25 Feb 2000 15:26:12 +0000 Subject: [PATCH] *** empty log message *** --- src/interfaces/ecpg/ChangeLog | 4 ++++ src/interfaces/ecpg/include/ecpglib.h | 1 - src/interfaces/ecpg/lib/descriptor.c | 9 +++++++-- src/interfaces/ecpg/preproc/output.c | 1 + src/interfaces/ecpg/preproc/preproc.y | 6 +----- 5 files changed, 13 insertions(+), 8 deletions(-) diff --git a/src/interfaces/ecpg/ChangeLog b/src/interfaces/ecpg/ChangeLog index 7a0a577be3..0e6b37ae83 100644 --- a/src/interfaces/ecpg/ChangeLog +++ b/src/interfaces/ecpg/ChangeLog @@ -828,5 +828,9 @@ Tue Feb 22 13:48:18 CET 2000 Wed Feb 23 17:08:28 CET 2000 - Even more clean ups. + +Fri Feb 25 16:13:11 CET 2000 + + - Fixed some bugs I created when I cleaned up, thanks Christof. - Set library version to 3.1.0. - Set ecpg version to 2.7.0. diff --git a/src/interfaces/ecpg/include/ecpglib.h b/src/interfaces/ecpg/include/ecpglib.h index 43dd8bf1c4..fc416bd4fb 100644 --- a/src/interfaces/ecpg/include/ecpglib.h +++ b/src/interfaces/ecpg/include/ecpglib.h @@ -37,7 +37,6 @@ extern "C" char *ecpg_strdup(const char *, int); const char *ECPGtype_name(enum ECPGttype); - /* and some vars */ extern struct auto_mem *auto_allocs; diff --git a/src/interfaces/ecpg/lib/descriptor.c b/src/interfaces/ecpg/lib/descriptor.c index 1b85340864..1f0c5536f7 100644 --- a/src/interfaces/ecpg/lib/descriptor.c +++ b/src/interfaces/ecpg/lib/descriptor.c @@ -47,7 +47,6 @@ ECPGDynamicType(Oid type) } } -#if 0 static unsigned int ECPGDynamicType_DDT(Oid type) { @@ -61,7 +60,7 @@ ECPGDynamicType_DDT(Oid type) return SQL3_DDT_ILLEGAL; } } -#endif + bool ECPGget_desc_header(int lineno, char * desc_name, int *count) @@ -260,6 +259,12 @@ ECPGget_desc(int lineno, char *desc_name, int index, ...) ECPGlog("ECPGget_desc: TYPE = %d\n", ECPGDynamicType(PQftype(ECPGresult, index))); break; + case ECPGd_di_code: + if (!get_int_item(lineno, var, vartype, ECPGDynamicType_DDT(PQftype(ECPGresult, index)))) + return (false); + + ECPGlog("ECPGget_desc: TYPE = %d\n", ECPGDynamicType_DDT(PQftype(ECPGresult, index))); + break; case ECPGd_data: if (!get_data(ECPGresult, 0, index, lineno, vartype, ECPGt_NO_INDICATOR, var, NULL, varcharsize, offset)) return (false); diff --git a/src/interfaces/ecpg/preproc/output.c b/src/interfaces/ecpg/preproc/output.c index c60adf8f40..91b2308317 100644 --- a/src/interfaces/ecpg/preproc/output.c +++ b/src/interfaces/ecpg/preproc/output.c @@ -120,6 +120,7 @@ output_statement(char * stmt, int mode, char *descriptor) mode |= 2; whenever_action(mode); free(stmt); + free(descriptor); if (connection != NULL) free(connection); } diff --git a/src/interfaces/ecpg/preproc/preproc.y b/src/interfaces/ecpg/preproc/preproc.y index a42b68f7de..ed5e27db3a 100644 --- a/src/interfaces/ecpg/preproc/preproc.y +++ b/src/interfaces/ecpg/preproc/preproc.y @@ -491,11 +491,7 @@ stmt: AlterTableStmt { output_statement($1, 0, NULL); } free($1); } | ECPGExecute { output_statement($1, 0, NULL); } - | ECPGFetchDescStmt { - output_statement($1.str, 1, $1.name); - free($1.str); - free($1.name); - } + | ECPGFetchDescStmt { output_statement($1.str, 1, $1.name); } | ECPGFree { fprintf(yyout, "{ ECPGdeallocate(__LINE__, \"%s\");", $1); -- 2.11.0