From 2a74511bf4a66bc878ebf1eb097fa68062b7233f Mon Sep 17 00:00:00 2001 From: "Marc G. Fournier" Date: Wed, 3 Jun 1998 13:55:15 +0000 Subject: From: Michael Meskes + Wed Jun 3 13:38:57 CEST 1998 + + - Made sqlca struct compatible with other systems. + - Give back a warning in case of truncation + - Changed the handling of OptimizableStmt since the old one broke + CREATE RULE + - Set library version to 2.3 + - Set version to 2.3.3 --- src/interfaces/ecpg/lib/ecpglib.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/interfaces/ecpg/lib/ecpglib.c') diff --git a/src/interfaces/ecpg/lib/ecpglib.c b/src/interfaces/ecpg/lib/ecpglib.c index 504a0388cc..ecbd235461 100644 --- a/src/interfaces/ecpg/lib/ecpglib.c +++ b/src/interfaces/ecpg/lib/ecpglib.c @@ -38,7 +38,7 @@ static FILE *debugstream = NULL; static int committed = true; static void -register_error(int code, char *fmt,...) +register_error(long code, char *fmt,...) { va_list args; @@ -131,9 +131,9 @@ ECPGdo(int lineno, char *query,...) long offset, ind_offset; enum ECPGttype ind_type; + memset((char *) &sqlca, 0, sizeof (sqlca)); va_start(ap, query); - sqlca.sqlcode = 0; copiedquery = strdup(query); type = va_arg(ap, enum ECPGttype); @@ -666,6 +666,7 @@ ECPGdo(int lineno, char *query,...) default: break; } + sqlca.sqlwarn[0] = sqlca.sqlwarn[1] = 'W'; } } } @@ -702,6 +703,7 @@ ECPGdo(int lineno, char *query,...) default: break; } + sqlca.sqlwarn[0] = sqlca.sqlwarn[1] = 'W'; var->len = varcharsize; } -- cgit v1.2.1