Skip to content

Commit c05abfb

Browse files
author
Michael Meskes
committed
*** empty log message ***
1 parent 7013090 commit c05abfb

File tree

5 files changed

+13
-8
lines changed

5 files changed

+13
-8
lines changed

src/interfaces/ecpg/ChangeLog

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -828,5 +828,9 @@ Tue Feb 22 13:48:18 CET 2000
828828
Wed Feb 23 17:08:28 CET 2000
829829

830830
- Even more clean ups.
831+
832+
Fri Feb 25 16:13:11 CET 2000
833+
834+
- Fixed some bugs I created when I cleaned up, thanks Christof.
831835
- Set library version to 3.1.0.
832836
- Set ecpg version to 2.7.0.

src/interfaces/ecpg/include/ecpglib.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ extern "C"
3737
char *ecpg_strdup(const char *, int);
3838
const char *ECPGtype_name(enum ECPGttype);
3939

40-
4140
/* and some vars */
4241
extern struct auto_mem *auto_allocs;
4342

src/interfaces/ecpg/lib/descriptor.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ ECPGDynamicType(Oid type)
4747
}
4848
}
4949

50-
#if 0
5150
static unsigned int
5251
ECPGDynamicType_DDT(Oid type)
5352
{
@@ -61,7 +60,7 @@ ECPGDynamicType_DDT(Oid type)
6160
return SQL3_DDT_ILLEGAL;
6261
}
6362
}
64-
#endif
63+
6564

6665
bool
6766
ECPGget_desc_header(int lineno, char * desc_name, int *count)
@@ -260,6 +259,12 @@ ECPGget_desc(int lineno, char *desc_name, int index, ...)
260259
ECPGlog("ECPGget_desc: TYPE = %d\n", ECPGDynamicType(PQftype(ECPGresult, index)));
261260
break;
262261

262+
case ECPGd_di_code:
263+
if (!get_int_item(lineno, var, vartype, ECPGDynamicType_DDT(PQftype(ECPGresult, index))))
264+
return (false);
265+
266+
ECPGlog("ECPGget_desc: TYPE = %d\n", ECPGDynamicType_DDT(PQftype(ECPGresult, index)));
267+
break;
263268
case ECPGd_data:
264269
if (!get_data(ECPGresult, 0, index, lineno, vartype, ECPGt_NO_INDICATOR, var, NULL, varcharsize, offset))
265270
return (false);

src/interfaces/ecpg/preproc/output.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ output_statement(char * stmt, int mode, char *descriptor)
120120
mode |= 2;
121121
whenever_action(mode);
122122
free(stmt);
123+
free(descriptor);
123124
if (connection != NULL)
124125
free(connection);
125126
}

src/interfaces/ecpg/preproc/preproc.y

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -491,11 +491,7 @@ stmt: AlterTableStmt { output_statement($1, 0, NULL); }
491491
free($1);
492492
}
493493
| ECPGExecute { output_statement($1, 0, NULL); }
494-
| ECPGFetchDescStmt {
495-
output_statement($1.str, 1, $1.name);
496-
free($1.str);
497-
free($1.name);
498-
}
494+
| ECPGFetchDescStmt { output_statement($1.str, 1, $1.name); }
499495
| ECPGFree {
500496
fprintf(yyout, "{ ECPGdeallocate(__LINE__, \"%s\");", $1);
501497

0 commit comments

Comments
 (0)