From 3291301385ee5e9ca38d70a68b93ce31cc2674ac Mon Sep 17 00:00:00 2001 From: Alvaro Herrera Date: Thu, 16 Jan 2014 16:36:41 -0300 Subject: [PATCH] Split ECPGdo() in constituent parts MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This splits ECPGdo() into ecpg_prologue(), ecpg_do() and ecpg_epilogue(), and renames free_params() into ecpg_free_params() and exports it. This makes it possible for future code to use these routines for their own purposes. There is no user-visible functionality change here, only code reorganization. Zoltán Böszörményi Reviewed by Antonin Houska. Larger, older versions of this patch were reviewed by Noah Misch and Michael Meskes. --- src/interfaces/ecpg/ecpglib/execute.c | 228 +++++++++++------- src/interfaces/ecpg/ecpglib/extern.h | 10 + .../expected/compat_informix-rnull.stderr | 34 +-- .../expected/compat_informix-sqlda.stderr | 4 +- .../compat_informix-test_informix.stderr | 8 +- .../compat_informix-test_informix2.stderr | 6 +- .../test/expected/pgtypeslib-dt_test.stderr | 6 +- .../test/expected/pgtypeslib-nan_test.stderr | 28 +-- .../test/expected/pgtypeslib-num_test.stderr | 2 +- .../test/expected/preproc-autoprep.stderr | 8 +- .../ecpg/test/expected/preproc-type.stderr | 2 +- .../ecpg/test/expected/sql-array.stderr | 14 +- .../ecpg/test/expected/sql-binary.stderr | 8 +- .../ecpg/test/expected/sql-code100.stderr | 20 +- .../ecpg/test/expected/sql-desc.stderr | 22 +- .../ecpg/test/expected/sql-execute.stderr | 6 +- .../ecpg/test/expected/sql-fetch.stderr | 2 +- .../ecpg/test/expected/sql-indicators.stderr | 6 +- .../ecpg/test/expected/sql-oldexec.stderr | 4 +- .../ecpg/test/expected/sql-sqlda.stderr | 4 +- 20 files changed, 246 insertions(+), 176 deletions(-) diff --git a/src/interfaces/ecpg/ecpglib/execute.c b/src/interfaces/ecpg/ecpglib/execute.c index e5ee8a9b84..c39b9b32a6 100644 --- a/src/interfaces/ecpg/ecpglib/execute.c +++ b/src/interfaces/ecpg/ecpglib/execute.c @@ -104,6 +104,7 @@ free_statement(struct statement * stmt) free_variable(stmt->outlist); ecpg_free(stmt->command); ecpg_free(stmt->name); + ecpg_free(stmt->oldlocale); ecpg_free(stmt); } @@ -1077,21 +1078,22 @@ ecpg_store_input(const int lineno, const bool force_indicator, const struct vari return true; } -static void -free_params(char **paramValues, int nParams, bool print, int lineno) +void +ecpg_free_params(struct statement * stmt, bool print) { int n; - for (n = 0; n < nParams; n++) + for (n = 0; n < stmt->nparams; n++) { if (print) - ecpg_log("free_params on line %d: parameter %d = %s\n", lineno, n + 1, paramValues[n] ? paramValues[n] : "null"); - ecpg_free(paramValues[n]); + ecpg_log("ecpg_free_params on line %d: parameter %d = %s\n", stmt->lineno, n + 1, stmt->paramvalues[n] ? stmt->paramvalues[n] : "null"); + ecpg_free(stmt->paramvalues[n]); } - ecpg_free(paramValues); + ecpg_free(stmt->paramvalues); + stmt->paramvalues = NULL; + stmt->nparams = 0; } - static bool insert_tobeinserted(int position, int ph_len, struct statement * stmt, char *tobeinserted) { @@ -1133,8 +1135,6 @@ ecpg_execute(struct statement * stmt) PGnotify *notify; struct variable *var; int desc_counter = 0; - char **paramValues = NULL; - int nParams = 0; int position = 0; struct sqlca_t *sqlca = ECPGget_sqlca(); bool clear_result = true; @@ -1337,7 +1337,7 @@ ecpg_execute(struct statement * stmt) ecpg_raise(stmt->lineno, ECPG_TOO_MANY_ARGUMENTS, ECPG_SQLSTATE_USING_CLAUSE_DOES_NOT_MATCH_PARAMETERS, NULL); - free_params(paramValues, nParams, false, stmt->lineno); + ecpg_free_params(stmt, false); return false; } @@ -1352,7 +1352,7 @@ ecpg_execute(struct statement * stmt) if (!insert_tobeinserted(position, ph_len, stmt, tobeinserted)) { - free_params(paramValues, nParams, false, stmt->lineno); + ecpg_free_params(stmt, false); return false; } tobeinserted = NULL; @@ -1367,21 +1367,24 @@ ecpg_execute(struct statement * stmt) { if (!insert_tobeinserted(position, 2, stmt, tobeinserted)) { - free_params(paramValues, nParams, false, stmt->lineno); + ecpg_free_params(stmt, false); return false; } tobeinserted = NULL; } else { - nParams++; - if (!(paramValues = (char **) ecpg_realloc(paramValues, sizeof(char *) * nParams, stmt->lineno))) + char **paramvalues; + + if (!(paramvalues = (char **) ecpg_realloc(stmt->paramvalues, sizeof(char *) * (stmt->nparams + 1), stmt->lineno))) { - ecpg_free(paramValues); + ecpg_free_params(stmt, false); return false; } - paramValues[nParams - 1] = tobeinserted; + stmt->nparams++; + stmt->paramvalues = paramvalues; + stmt->paramvalues[stmt->nparams - 1] = tobeinserted; /* let's see if this was an old style placeholder */ if (stmt->command[position] == '?') @@ -1392,7 +1395,7 @@ ecpg_execute(struct statement * stmt) if (!(tobeinserted = (char *) ecpg_alloc(buffersize, stmt->lineno))) { - free_params(paramValues, nParams, false, stmt->lineno); + ecpg_free_params(stmt, false); return false; } @@ -1400,7 +1403,7 @@ ecpg_execute(struct statement * stmt) if (!insert_tobeinserted(position, 2, stmt, tobeinserted)) { - free_params(paramValues, nParams, false, stmt->lineno); + ecpg_free_params(stmt, false); return false; } tobeinserted = NULL; @@ -1416,7 +1419,7 @@ ecpg_execute(struct statement * stmt) { ecpg_raise(stmt->lineno, ECPG_TOO_FEW_ARGUMENTS, ECPG_SQLSTATE_USING_CLAUSE_DOES_NOT_MATCH_PARAMETERS, NULL); - free_params(paramValues, nParams, false, stmt->lineno); + ecpg_free_params(stmt, false); return false; } @@ -1427,33 +1430,33 @@ ecpg_execute(struct statement * stmt) results = PQexec(stmt->connection->connection, "begin transaction"); if (!ecpg_check_PQresult(results, stmt->lineno, stmt->connection->connection, stmt->compat)) { - free_params(paramValues, nParams, false, stmt->lineno); + ecpg_free_params(stmt, false); return false; } PQclear(results); } - ecpg_log("ecpg_execute on line %d: query: %s; with %d parameter(s) on connection %s\n", stmt->lineno, stmt->command, nParams, stmt->connection->name); + ecpg_log("ecpg_execute on line %d: query: %s; with %d parameter(s) on connection %s\n", stmt->lineno, stmt->command, stmt->nparams, stmt->connection->name); if (stmt->statement_type == ECPGst_execute) { - results = PQexecPrepared(stmt->connection->connection, stmt->name, nParams, (const char *const *) paramValues, NULL, NULL, 0); + results = PQexecPrepared(stmt->connection->connection, stmt->name, stmt->nparams, (const char *const *) stmt->paramvalues, NULL, NULL, 0); ecpg_log("ecpg_execute on line %d: using PQexecPrepared for \"%s\"\n", stmt->lineno, stmt->command); } else { - if (nParams == 0) + if (stmt->nparams == 0) { results = PQexec(stmt->connection->connection, stmt->command); ecpg_log("ecpg_execute on line %d: using PQexec\n", stmt->lineno); } else { - results = PQexecParams(stmt->connection->connection, stmt->command, nParams, NULL, (const char *const *) paramValues, NULL, NULL, 0); + results = PQexecParams(stmt->connection->connection, stmt->command, stmt->nparams, NULL, (const char *const *) stmt->paramvalues, NULL, NULL, 0); ecpg_log("ecpg_execute on line %d: using PQexecParams\n", stmt->lineno); } } - free_params(paramValues, nParams, true, stmt->lineno); + ecpg_free_params(stmt, true); if (!ecpg_check_PQresult(results, stmt->lineno, stmt->connection->connection, stmt->compat)) return (false); @@ -1701,28 +1704,49 @@ ecpg_execute(struct statement * stmt) return status; } +/* + * ecpg_do_prologue + * + * Initialize various infrastructure elements for executing the statement: + * + * - create the statement structure + * - set the C numeric locale for communicating with the backend + * - preprocess the variable list of input/output parameters into + * linked lists + */ bool -ECPGdo(const int lineno, const int compat, const int force_indicator, const char *connection_name, const bool questionmarks, const int st, const char *query,...) +ecpg_do_prologue(int lineno, const int compat, const int force_indicator, + const char *connection_name, const bool questionmarks, + enum ECPG_statement_type statement_type, const char *query, + va_list args, struct statement ** stmt_out) { - va_list args; struct statement *stmt; struct connection *con; - bool status; - char *oldlocale; enum ECPGttype type; struct variable **list; - enum ECPG_statement_type statement_type = (enum ECPG_statement_type) st; char *prepname; + *stmt_out = NULL; + if (!query) { ecpg_raise(lineno, ECPG_EMPTY, ECPG_SQLSTATE_ECPG_INTERNAL_ERROR, NULL); return (false); } - /* Make sure we do NOT honor the locale for numeric input/output */ - /* since the database wants the standard decimal point */ - oldlocale = ecpg_strdup(setlocale(LC_NUMERIC, NULL), lineno); + if (!(stmt = (struct statement *) ecpg_alloc(sizeof(struct statement), lineno))) + return false; + + /* + * Make sure we do NOT honor the locale for numeric input/output since the + * database wants the standard decimal point + */ + stmt->oldlocale = ecpg_strdup(setlocale(LC_NUMERIC, NULL), lineno); + if (stmt->oldlocale == NULL) + { + ecpg_do_epilogue(stmt); + return false; + } setlocale(LC_NUMERIC, "C"); #ifdef ENABLE_THREAD_SAFETY @@ -1733,34 +1757,10 @@ ECPGdo(const int lineno, const int compat, const int force_indicator, const char if (!ecpg_init(con, connection_name, lineno)) { - setlocale(LC_NUMERIC, oldlocale); - ecpg_free(oldlocale); + ecpg_do_epilogue(stmt); return (false); } - /* construct statement in our own structure */ - va_start(args, query); - - /* - * create a list of variables The variables are listed with input - * variables preceding outputvariables The end of each group is marked by - * an end marker. per variable we list: type - as defined in ecpgtype.h - * value - where to store the data varcharsize - length of string in case - * we have a stringvariable, else 0 arraysize - 0 for pointer (we don't - * know the size of the array), 1 for simple variable, size for arrays - * offset - offset between ith and (i+1)th entry in an array, normally - * that means sizeof(type) ind_type - type of indicator variable ind_value - * - pointer to indicator variable ind_varcharsize - empty ind_arraysize - - * arraysize of indicator array ind_offset - indicator offset - */ - if (!(stmt = (struct statement *) ecpg_alloc(sizeof(struct statement), lineno))) - { - setlocale(LC_NUMERIC, oldlocale); - ecpg_free(oldlocale); - va_end(args); - return false; - } - /* * If statement type is ECPGst_prepnormal we are supposed to prepare the * statement before executing them @@ -1769,10 +1769,7 @@ ECPGdo(const int lineno, const int compat, const int force_indicator, const char { if (!ecpg_auto_prepare(lineno, connection_name, compat, &prepname, query)) { - setlocale(LC_NUMERIC, oldlocale); - ecpg_free(oldlocale); - free_statement(stmt); - va_end(args); + ecpg_do_epilogue(stmt); return (false); } @@ -1801,10 +1798,7 @@ ECPGdo(const int lineno, const int compat, const int force_indicator, const char else { ecpg_raise(lineno, ECPG_INVALID_STMT, ECPG_SQLSTATE_INVALID_SQL_STATEMENT_NAME, stmt->command); - setlocale(LC_NUMERIC, oldlocale); - ecpg_free(oldlocale); - free_statement(stmt); - va_end(args); + ecpg_do_epilogue(stmt); return (false); } } @@ -1816,6 +1810,27 @@ ECPGdo(const int lineno, const int compat, const int force_indicator, const char stmt->questionmarks = questionmarks; stmt->statement_type = statement_type; + /*------ + * create a list of variables + * + * The variables are listed with input variables preceding outputvariables + * The end of each group is marked by an end marker. per variable we list: + * + * type - as defined in ecpgtype.h + * value - where to store the data + * varcharsize - length of string in case we have a stringvariable, else 0 + * arraysize - 0 for pointer (we don't know the size of the array), 1 for + * simple variable, size for arrays + * offset - offset between ith and (i+1)th entry in an array, normally + * that means sizeof(type) + * ind_type - type of indicator variable + * ind_value - pointer to indicator variable + * ind_varcharsize - empty + * ind_arraysize - arraysize of indicator array + * ind_offset - indicator offset + *------ + */ + list = &(stmt->inlist); type = va_arg(args, enum ECPGttype); @@ -1831,10 +1846,7 @@ ECPGdo(const int lineno, const int compat, const int force_indicator, const char if (!(var = (struct variable *) ecpg_alloc(sizeof(struct variable), lineno))) { - setlocale(LC_NUMERIC, oldlocale); - ecpg_free(oldlocale); - free_statement(stmt); - va_end(args); + ecpg_do_epilogue(stmt); return false; } @@ -1889,14 +1901,12 @@ ECPGdo(const int lineno, const int compat, const int force_indicator, const char { ecpg_raise(lineno, ECPG_INVALID_STMT, ECPG_SQLSTATE_INVALID_SQL_STATEMENT_NAME, NULL); ecpg_free(var); - setlocale(LC_NUMERIC, oldlocale); - ecpg_free(oldlocale); - free_statement(stmt); - va_end(args); + ecpg_do_epilogue(stmt); return false; } - for (ptr = *list; ptr && ptr->next; ptr = ptr->next); + for (ptr = *list; ptr && ptr->next; ptr = ptr->next) + ; if (ptr == NULL) *list = var; @@ -1907,29 +1917,79 @@ ECPGdo(const int lineno, const int compat, const int force_indicator, const char type = va_arg(args, enum ECPGttype); } - va_end(args); - /* are we connected? */ if (con == NULL || con->connection == NULL) { - free_statement(stmt); ecpg_raise(lineno, ECPG_NOT_CONN, ECPG_SQLSTATE_ECPG_INTERNAL_ERROR, (con) ? con->name : ecpg_gettext("")); - setlocale(LC_NUMERIC, oldlocale); - ecpg_free(oldlocale); + ecpg_do_epilogue(stmt); return false; } /* initialize auto_mem struct */ ecpg_clear_auto_mem(); - status = ecpg_execute(stmt); + *stmt_out = stmt; + + return true; +} + +/* + * ecpg_do_epilogue + * Restore the application locale and free the statement structure. + */ +void +ecpg_do_epilogue(struct statement * stmt) +{ + if (stmt == NULL) + return; + + setlocale(LC_NUMERIC, stmt->oldlocale); free_statement(stmt); +} + +/* + * Execute SQL statements in the backend. + * The input/output parameters (variable argument list) are passed + * in a va_list, so other functions can use this interface. + */ +bool +ecpg_do(const int lineno, const int compat, const int force_indicator, const char *connection_name, const bool questionmarks, const int st, const char *query, va_list args) +{ + struct statement *stmt; + bool status; + + if (!ecpg_do_prologue(lineno, compat, force_indicator, connection_name, + questionmarks, (enum ECPG_statement_type) st, + query, args, &stmt)) + { + ecpg_do_epilogue(stmt); + return false; + } + + status = ecpg_execute(stmt); /* and reset locale value so our application is not affected */ - setlocale(LC_NUMERIC, oldlocale); - ecpg_free(oldlocale); + ecpg_do_epilogue(stmt); + + return status; +} + +/* + * Execute SQL statements in the backend. + * The input/output parameters are passed as variable-length argument list. + */ +bool +ECPGdo(const int lineno, const int compat, const int force_indicator, const char *connection_name, const bool questionmarks, const int st, const char *query,...) +{ + va_list args; + bool ret; + + va_start(args, query); + ret = ecpg_do(lineno, compat, force_indicator, connection_name, + questionmarks, st, query, args); + va_end(args); - return (status); + return ret; } /* old descriptor interface */ diff --git a/src/interfaces/ecpg/ecpglib/extern.h b/src/interfaces/ecpg/ecpglib/extern.h index 835e70c38f..83ea011853 100644 --- a/src/interfaces/ecpg/ecpglib/extern.h +++ b/src/interfaces/ecpg/ecpglib/extern.h @@ -60,6 +60,9 @@ struct statement bool questionmarks; struct variable *inlist; struct variable *outlist; + char *oldlocale; + int nparams; + char **paramvalues; }; /* structure to store prepared statements for a connection */ @@ -164,6 +167,13 @@ struct prepared_statement *ecpg_find_prepared_statement(const char *, bool ecpg_store_result(const PGresult *results, int act_field, const struct statement * stmt, struct variable * var); bool ecpg_store_input(const int, const bool, const struct variable *, char **, bool); +void ecpg_free_params(struct statement *stmt, bool print); +void ecpg_do_epilogue(struct statement *); +bool ecpg_do_prologue(int, const int, const int, const char *, const bool, + enum ECPG_statement_type, const char *, va_list, + struct statement **); +bool ecpg_do(const int, const int, const int, const char *, const bool, + const int, const char *, va_list); bool ecpg_check_PQresult(PGresult *, int, PGconn *, enum COMPAT_MODE); void ecpg_raise(int line, int code, const char *sqlstate, const char *str); diff --git a/src/interfaces/ecpg/test/expected/compat_informix-rnull.stderr b/src/interfaces/ecpg/test/expected/compat_informix-rnull.stderr index dc906c85b4..ef334568cc 100644 --- a/src/interfaces/ecpg/test/expected/compat_informix-rnull.stderr +++ b/src/interfaces/ecpg/test/expected/compat_informix-rnull.stderr @@ -14,19 +14,19 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 36: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 36: parameter 1 = abc +[NO_PID]: ecpg_free_params on line 36: parameter 1 = abc [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 36: parameter 2 = 17 +[NO_PID]: ecpg_free_params on line 36: parameter 2 = 17 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 36: parameter 3 = -74874 +[NO_PID]: ecpg_free_params on line 36: parameter 3 = -74874 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 36: parameter 4 = t +[NO_PID]: ecpg_free_params on line 36: parameter 4 = t [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 36: parameter 5 = 3.71000003814697 +[NO_PID]: ecpg_free_params on line 36: parameter 5 = 3.71000003814697 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 36: parameter 6 = 487444 +[NO_PID]: ecpg_free_params on line 36: parameter 6 = 487444 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 36: parameter 7 = 404.404 +[NO_PID]: ecpg_free_params on line 36: parameter 7 = 404.404 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 36: OK: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 @@ -36,25 +36,25 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 52: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 52: parameter 1 = null +[NO_PID]: ecpg_free_params on line 52: parameter 1 = null [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 52: parameter 2 = null +[NO_PID]: ecpg_free_params on line 52: parameter 2 = null [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 52: parameter 3 = null +[NO_PID]: ecpg_free_params on line 52: parameter 3 = null [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 52: parameter 4 = t +[NO_PID]: ecpg_free_params on line 52: parameter 4 = t [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 52: parameter 5 = null +[NO_PID]: ecpg_free_params on line 52: parameter 5 = null [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 52: parameter 6 = null +[NO_PID]: ecpg_free_params on line 52: parameter 6 = null [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 52: parameter 7 = null +[NO_PID]: ecpg_free_params on line 52: parameter 7 = null [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 52: parameter 8 = null +[NO_PID]: ecpg_free_params on line 52: parameter 8 = null [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 52: parameter 9 = null +[NO_PID]: ecpg_free_params on line 52: parameter 9 = null [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 52: parameter 10 = null +[NO_PID]: ecpg_free_params on line 52: parameter 10 = null [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 52: OK: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 diff --git a/src/interfaces/ecpg/test/expected/compat_informix-sqlda.stderr b/src/interfaces/ecpg/test/expected/compat_informix-sqlda.stderr index f463d034fc..44241bb9d1 100644 --- a/src/interfaces/ecpg/test/expected/compat_informix-sqlda.stderr +++ b/src/interfaces/ecpg/test/expected/compat_informix-sqlda.stderr @@ -252,7 +252,7 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 184: using PQexecPrepared for "SELECT * FROM t1 WHERE id = $1" [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 184: parameter 1 = 4 +[NO_PID]: ecpg_free_params on line 184: parameter 1 = 4 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 184: correctly got 1 tuples with 5 fields [NO_PID]: sqlca: code: 0, state: 00000 @@ -292,7 +292,7 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 221: using PQexecPrepared for "SELECT * FROM t1 WHERE id = $1" [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 221: parameter 1 = 4 +[NO_PID]: ecpg_free_params on line 221: parameter 1 = 4 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 221: correctly got 1 tuples with 5 fields [NO_PID]: sqlca: code: 0, state: 00000 diff --git a/src/interfaces/ecpg/test/expected/compat_informix-test_informix.stderr b/src/interfaces/ecpg/test/expected/compat_informix-test_informix.stderr index fc909e54f0..784252bd16 100644 --- a/src/interfaces/ecpg/test/expected/compat_informix-test_informix.stderr +++ b/src/interfaces/ecpg/test/expected/compat_informix-test_informix.stderr @@ -12,7 +12,7 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 28: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 28: parameter 1 = 0 +[NO_PID]: ecpg_free_params on line 28: parameter 1 = 0 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 28: OK: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 @@ -33,7 +33,7 @@ DETAIL: Key (i)=(7) already exists. [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 36: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 36: parameter 1 = 14 +[NO_PID]: ecpg_free_params on line 36: parameter 1 = 14 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 36: OK: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 @@ -59,7 +59,7 @@ DETAIL: Key (i)=(7) already exists. [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 95: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 95: parameter 1 = 14 +[NO_PID]: ecpg_free_params on line 95: parameter 1 = 14 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 95: OK: DECLARE CURSOR [NO_PID]: sqlca: code: 0, state: 00000 @@ -99,7 +99,7 @@ DETAIL: Key (i)=(7) already exists. [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 75: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 75: parameter 1 = 21.0 +[NO_PID]: ecpg_free_params on line 75: parameter 1 = 21.0 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 75: OK: DELETE 0 [NO_PID]: sqlca: code: 0, state: 00000 diff --git a/src/interfaces/ecpg/test/expected/compat_informix-test_informix2.stderr b/src/interfaces/ecpg/test/expected/compat_informix-test_informix2.stderr index 0eb90e4425..74d25ac544 100644 --- a/src/interfaces/ecpg/test/expected/compat_informix-test_informix2.stderr +++ b/src/interfaces/ecpg/test/expected/compat_informix-test_informix2.stderr @@ -32,7 +32,7 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 81: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 81: parameter 1 = 2003-05-07 13:28:34 +[NO_PID]: ecpg_free_params on line 81: parameter 1 = 2003-05-07 13:28:34 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 81: correctly got 1 tuples with 2 fields [NO_PID]: sqlca: code: 0, state: 00000 @@ -44,9 +44,9 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 95: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 95: parameter 1 = 2 +[NO_PID]: ecpg_free_params on line 95: parameter 1 = 2 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 95: parameter 2 = 2003-05-08 15:53:39 +[NO_PID]: ecpg_free_params on line 95: parameter 2 = 2003-05-08 15:53:39 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 95: OK: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 diff --git a/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test.stderr b/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test.stderr index c1285f54c3..0ea9b840b2 100644 --- a/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test.stderr +++ b/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test.stderr @@ -24,9 +24,9 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 36: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 36: parameter 1 = 1966-01-17 +[NO_PID]: ecpg_free_params on line 36: parameter 1 = 1966-01-17 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 36: parameter 2 = 2000-07-12 17:34:29 +[NO_PID]: ecpg_free_params on line 36: parameter 2 = 2000-07-12 17:34:29 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 36: OK: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 @@ -34,7 +34,7 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 38: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 38: parameter 1 = 1966-01-17 +[NO_PID]: ecpg_free_params on line 38: parameter 1 = 1966-01-17 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 38: correctly got 1 tuples with 2 fields [NO_PID]: sqlca: code: 0, state: 00000 diff --git a/src/interfaces/ecpg/test/expected/pgtypeslib-nan_test.stderr b/src/interfaces/ecpg/test/expected/pgtypeslib-nan_test.stderr index d04e426aae..3ad087ce87 100644 --- a/src/interfaces/ecpg/test/expected/pgtypeslib-nan_test.stderr +++ b/src/interfaces/ecpg/test/expected/pgtypeslib-nan_test.stderr @@ -36,9 +36,9 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 45: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 45: parameter 1 = 1 +[NO_PID]: ecpg_free_params on line 45: parameter 1 = 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 45: parameter 2 = NaN +[NO_PID]: ecpg_free_params on line 45: parameter 2 = NaN [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 45: OK: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 @@ -46,9 +46,9 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 46: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 46: parameter 1 = 1 +[NO_PID]: ecpg_free_params on line 46: parameter 1 = 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 46: parameter 2 = NaN +[NO_PID]: ecpg_free_params on line 46: parameter 2 = NaN [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 46: OK: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 @@ -68,9 +68,9 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 45: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 45: parameter 1 = 2 +[NO_PID]: ecpg_free_params on line 45: parameter 1 = 2 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 45: parameter 2 = Infinity +[NO_PID]: ecpg_free_params on line 45: parameter 2 = Infinity [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 45: OK: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 @@ -78,9 +78,9 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 46: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 46: parameter 1 = 2 +[NO_PID]: ecpg_free_params on line 46: parameter 1 = 2 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 46: parameter 2 = Infinity +[NO_PID]: ecpg_free_params on line 46: parameter 2 = Infinity [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 46: OK: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 @@ -100,9 +100,9 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 45: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 45: parameter 1 = 3 +[NO_PID]: ecpg_free_params on line 45: parameter 1 = 3 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 45: parameter 2 = -Infinity +[NO_PID]: ecpg_free_params on line 45: parameter 2 = -Infinity [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 45: OK: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 @@ -110,9 +110,9 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 46: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 46: parameter 1 = 3 +[NO_PID]: ecpg_free_params on line 46: parameter 1 = 3 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 46: parameter 2 = -Infinity +[NO_PID]: ecpg_free_params on line 46: parameter 2 = -Infinity [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 46: OK: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 @@ -286,7 +286,7 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 72: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 72: parameter 1 = NaN +[NO_PID]: ecpg_free_params on line 72: parameter 1 = NaN [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 72: OK: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 @@ -294,7 +294,7 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 73: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 73: parameter 1 = NaN +[NO_PID]: ecpg_free_params on line 73: parameter 1 = NaN [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 73: OK: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 diff --git a/src/interfaces/ecpg/test/expected/pgtypeslib-num_test.stderr b/src/interfaces/ecpg/test/expected/pgtypeslib-num_test.stderr index 9557da5e88..acc819414d 100644 --- a/src/interfaces/ecpg/test/expected/pgtypeslib-num_test.stderr +++ b/src/interfaces/ecpg/test/expected/pgtypeslib-num_test.stderr @@ -14,7 +14,7 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 60: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 60: parameter 1 = 2369.7 +[NO_PID]: ecpg_free_params on line 60: parameter 1 = 2369.7 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 60: OK: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 diff --git a/src/interfaces/ecpg/test/expected/preproc-autoprep.stderr b/src/interfaces/ecpg/test/expected/preproc-autoprep.stderr index 16117bed74..73c9ec13ea 100644 --- a/src/interfaces/ecpg/test/expected/preproc-autoprep.stderr +++ b/src/interfaces/ecpg/test/expected/preproc-autoprep.stderr @@ -26,7 +26,7 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 24: using PQexecPrepared for "insert into T values ( 1 , $1 )" [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 24: parameter 1 = 1 +[NO_PID]: ecpg_free_params on line 24: parameter 1 = 1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 24: OK: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 @@ -36,7 +36,7 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 26: using PQexecPrepared for "insert into T values ( 1 , $1 )" [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 26: parameter 1 = 2 +[NO_PID]: ecpg_free_params on line 26: parameter 1 = 2 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 26: OK: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 @@ -186,7 +186,7 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 24: using PQexecPrepared for "insert into T values ( 1 , $1 )" [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 24: parameter 1 = 1 +[NO_PID]: ecpg_free_params on line 24: parameter 1 = 1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 24: OK: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 @@ -196,7 +196,7 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 26: using PQexecPrepared for "insert into T values ( 1 , $1 )" [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 26: parameter 1 = 2 +[NO_PID]: ecpg_free_params on line 26: parameter 1 = 2 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 26: OK: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 diff --git a/src/interfaces/ecpg/test/expected/preproc-type.stderr b/src/interfaces/ecpg/test/expected/preproc-type.stderr index 3072da2e87..314db709b3 100644 --- a/src/interfaces/ecpg/test/expected/preproc-type.stderr +++ b/src/interfaces/ecpg/test/expected/preproc-type.stderr @@ -18,7 +18,7 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 65: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 65: parameter 1 = 1 +[NO_PID]: ecpg_free_params on line 65: parameter 1 = 1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 65: correctly got 1 tuples with 6 fields [NO_PID]: sqlca: code: 0, state: 00000 diff --git a/src/interfaces/ecpg/test/expected/sql-array.stderr b/src/interfaces/ecpg/test/expected/sql-array.stderr index 73685596cd..c5247e3364 100644 --- a/src/interfaces/ecpg/test/expected/sql-array.stderr +++ b/src/interfaces/ecpg/test/expected/sql-array.stderr @@ -22,9 +22,9 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 37: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 37: parameter 1 = {9,8,7,6,5,4,3,2,1,0} +[NO_PID]: ecpg_free_params on line 37: parameter 1 = {9,8,7,6,5,4,3,2,1,0} [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 37: parameter 2 = klmnopqrst +[NO_PID]: ecpg_free_params on line 37: parameter 2 = klmnopqrst [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 37: OK: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 @@ -32,11 +32,11 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 39: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 39: parameter 1 = 1 +[NO_PID]: ecpg_free_params on line 39: parameter 1 = 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 39: parameter 2 = {9,8,7,6,5,4,3,2,1,0} +[NO_PID]: ecpg_free_params on line 39: parameter 2 = {9,8,7,6,5,4,3,2,1,0} [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 39: parameter 3 = 0123456789 +[NO_PID]: ecpg_free_params on line 39: parameter 3 = 0123456789 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 39: OK: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 @@ -58,7 +58,7 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 53: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 53: parameter 1 = 140787 +[NO_PID]: ecpg_free_params on line 53: parameter 1 = 140787 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 53: correctly got 1 tuples with 2 fields [NO_PID]: sqlca: code: 0, state: 00000 @@ -72,7 +72,7 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 63: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 63: parameter 1 = 140787 +[NO_PID]: ecpg_free_params on line 63: parameter 1 = 140787 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 63: correctly got 1 tuples with 1 fields [NO_PID]: sqlca: code: 0, state: 00000 diff --git a/src/interfaces/ecpg/test/expected/sql-binary.stderr b/src/interfaces/ecpg/test/expected/sql-binary.stderr index d6b4777b4a..8dcff54fb9 100644 --- a/src/interfaces/ecpg/test/expected/sql-binary.stderr +++ b/src/interfaces/ecpg/test/expected/sql-binary.stderr @@ -18,7 +18,7 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 51: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 51: parameter 1 = \001\155\000\212 +[NO_PID]: ecpg_free_params on line 51: parameter 1 = \001\155\000\212 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 51: OK: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 @@ -26,7 +26,7 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 59: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 59: parameter 1 = 1 +[NO_PID]: ecpg_free_params on line 59: parameter 1 = 1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 59: OK: DECLARE CURSOR [NO_PID]: sqlca: code: 0, state: 00000 @@ -52,7 +52,7 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 73: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 73: parameter 1 = 1 +[NO_PID]: ecpg_free_params on line 73: parameter 1 = 1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 73: OK: DECLARE CURSOR [NO_PID]: sqlca: code: 0, state: 00000 @@ -78,7 +78,7 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 90: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 90: parameter 1 = 1 +[NO_PID]: ecpg_free_params on line 90: parameter 1 = 1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 90: OK: DECLARE CURSOR [NO_PID]: sqlca: code: 0, state: 00000 diff --git a/src/interfaces/ecpg/test/expected/sql-code100.stderr b/src/interfaces/ecpg/test/expected/sql-code100.stderr index a928a8943c..5a3ab35200 100644 --- a/src/interfaces/ecpg/test/expected/sql-code100.stderr +++ b/src/interfaces/ecpg/test/expected/sql-code100.stderr @@ -14,7 +14,7 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 26: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 26: parameter 1 = 0 +[NO_PID]: ecpg_free_params on line 26: parameter 1 = 0 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 26: OK: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 @@ -22,7 +22,7 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 26: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 26: parameter 1 = 1 +[NO_PID]: ecpg_free_params on line 26: parameter 1 = 1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 26: OK: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 @@ -30,7 +30,7 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 26: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 26: parameter 1 = 2 +[NO_PID]: ecpg_free_params on line 26: parameter 1 = 2 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 26: OK: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 @@ -38,7 +38,7 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 26: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 26: parameter 1 = 3 +[NO_PID]: ecpg_free_params on line 26: parameter 1 = 3 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 26: OK: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 @@ -46,7 +46,7 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 26: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 26: parameter 1 = 4 +[NO_PID]: ecpg_free_params on line 26: parameter 1 = 4 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 26: OK: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 @@ -54,7 +54,7 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 26: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 26: parameter 1 = 5 +[NO_PID]: ecpg_free_params on line 26: parameter 1 = 5 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 26: OK: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 @@ -62,7 +62,7 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 26: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 26: parameter 1 = 6 +[NO_PID]: ecpg_free_params on line 26: parameter 1 = 6 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 26: OK: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 @@ -70,7 +70,7 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 26: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 26: parameter 1 = 7 +[NO_PID]: ecpg_free_params on line 26: parameter 1 = 7 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 26: OK: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 @@ -78,7 +78,7 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 26: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 26: parameter 1 = 8 +[NO_PID]: ecpg_free_params on line 26: parameter 1 = 8 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 26: OK: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 @@ -86,7 +86,7 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 26: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 26: parameter 1 = 9 +[NO_PID]: ecpg_free_params on line 26: parameter 1 = 9 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 26: OK: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 diff --git a/src/interfaces/ecpg/test/expected/sql-desc.stderr b/src/interfaces/ecpg/test/expected/sql-desc.stderr index f4db5e0161..27348b11bb 100644 --- a/src/interfaces/ecpg/test/expected/sql-desc.stderr +++ b/src/interfaces/ecpg/test/expected/sql-desc.stderr @@ -20,9 +20,9 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 36: using PQexecPrepared for "INSERT INTO test1 VALUES ($1, $2)" [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 36: parameter 1 = 1 +[NO_PID]: ecpg_free_params on line 36: parameter 1 = 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 36: parameter 2 = one +[NO_PID]: ecpg_free_params on line 36: parameter 2 = one [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 36: OK: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 @@ -30,9 +30,9 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 41: using PQexecPrepared for "INSERT INTO test1 VALUES ($1, $2)" [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 41: parameter 1 = 2 +[NO_PID]: ecpg_free_params on line 41: parameter 1 = 2 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 41: parameter 2 = null +[NO_PID]: ecpg_free_params on line 41: parameter 2 = null [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 41: OK: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 @@ -40,9 +40,9 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 46: using PQexecPrepared for "INSERT INTO test1 VALUES ($1, $2)" [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 46: parameter 1 = 3 +[NO_PID]: ecpg_free_params on line 46: parameter 1 = 3 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 46: parameter 2 = this is a long test +[NO_PID]: ecpg_free_params on line 46: parameter 2 = this is a long test [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 46: OK: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 @@ -52,9 +52,9 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 53: using PQexecPrepared for "SELECT * from test1 where a = $1 and b = $2" [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 53: parameter 1 = 1 +[NO_PID]: ecpg_free_params on line 53: parameter 1 = 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 53: parameter 2 = one +[NO_PID]: ecpg_free_params on line 53: parameter 2 = one [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 53: correctly got 1 tuples with 2 fields [NO_PID]: sqlca: code: 0, state: 00000 @@ -68,9 +68,9 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 59: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 59: parameter 1 = 1 +[NO_PID]: ecpg_free_params on line 59: parameter 1 = 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 59: parameter 2 = one +[NO_PID]: ecpg_free_params on line 59: parameter 2 = one [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 59: OK: DECLARE CURSOR [NO_PID]: sqlca: code: 0, state: 00000 @@ -94,7 +94,7 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 71: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 71: parameter 1 = 2 +[NO_PID]: ecpg_free_params on line 71: parameter 1 = 2 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 71: OK: DECLARE CURSOR [NO_PID]: sqlca: code: 0, state: 00000 diff --git a/src/interfaces/ecpg/test/expected/sql-execute.stderr b/src/interfaces/ecpg/test/expected/sql-execute.stderr index fa9067299d..cb968e91db 100644 --- a/src/interfaces/ecpg/test/expected/sql-execute.stderr +++ b/src/interfaces/ecpg/test/expected/sql-execute.stderr @@ -34,7 +34,7 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 41: using PQexecPrepared for "insert into test (name, amount, letter) select name, amount+$1, letter from test" [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 41: parameter 1 = 100 +[NO_PID]: ecpg_free_params on line 41: parameter 1 = 100 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 41: OK: INSERT 0 4 [NO_PID]: sqlca: code: 0, state: 00000 @@ -116,7 +116,7 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 74: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 74: parameter 1 = 1 +[NO_PID]: ecpg_free_params on line 74: parameter 1 = 1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 74: OK: DECLARE CURSOR [NO_PID]: sqlca: code: 0, state: 00000 @@ -146,7 +146,7 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 94: using PQexecPrepared for "select * from test where amount = $1" [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 94: parameter 1 = 2 +[NO_PID]: ecpg_free_params on line 94: parameter 1 = 2 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 94: correctly got 1 tuples with 3 fields [NO_PID]: sqlca: code: 0, state: 00000 diff --git a/src/interfaces/ecpg/test/expected/sql-fetch.stderr b/src/interfaces/ecpg/test/expected/sql-fetch.stderr index 246139bceb..ede42f292f 100644 --- a/src/interfaces/ecpg/test/expected/sql-fetch.stderr +++ b/src/interfaces/ecpg/test/expected/sql-fetch.stderr @@ -112,7 +112,7 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 46: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 46: parameter 1 = 1 +[NO_PID]: ecpg_free_params on line 46: parameter 1 = 1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 46: OK: DECLARE CURSOR [NO_PID]: sqlca: code: 0, state: 00000 diff --git a/src/interfaces/ecpg/test/expected/sql-indicators.stderr b/src/interfaces/ecpg/test/expected/sql-indicators.stderr index 810623a644..cff02d2612 100644 --- a/src/interfaces/ecpg/test/expected/sql-indicators.stderr +++ b/src/interfaces/ecpg/test/expected/sql-indicators.stderr @@ -22,7 +22,7 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 27: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 27: parameter 1 = null +[NO_PID]: ecpg_free_params on line 27: parameter 1 = null [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 27: OK: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 @@ -30,7 +30,7 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 29: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 29: parameter 1 = 5 +[NO_PID]: ecpg_free_params on line 29: parameter 1 = 5 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 29: OK: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 @@ -64,7 +64,7 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 41: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 41: parameter 1 = null +[NO_PID]: ecpg_free_params on line 41: parameter 1 = null [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 41: OK: UPDATE 1 [NO_PID]: sqlca: code: 0, state: 00000 diff --git a/src/interfaces/ecpg/test/expected/sql-oldexec.stderr b/src/interfaces/ecpg/test/expected/sql-oldexec.stderr index 451c2f64af..b6c09efd1f 100644 --- a/src/interfaces/ecpg/test/expected/sql-oldexec.stderr +++ b/src/interfaces/ecpg/test/expected/sql-oldexec.stderr @@ -34,7 +34,7 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 41: using PQexecPrepared for "insert into test (name, amount, letter) select name, amount+$1, letter from test" [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 41: parameter 1 = 100 +[NO_PID]: ecpg_free_params on line 41: parameter 1 = 100 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 41: OK: INSERT 0 4 [NO_PID]: sqlca: code: 0, state: 00000 @@ -116,7 +116,7 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 73: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 73: parameter 1 = 1 +[NO_PID]: ecpg_free_params on line 73: parameter 1 = 1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 73: OK: DECLARE CURSOR [NO_PID]: sqlca: code: 0, state: 00000 diff --git a/src/interfaces/ecpg/test/expected/sql-sqlda.stderr b/src/interfaces/ecpg/test/expected/sql-sqlda.stderr index b3d771a09c..1043249f57 100644 --- a/src/interfaces/ecpg/test/expected/sql-sqlda.stderr +++ b/src/interfaces/ecpg/test/expected/sql-sqlda.stderr @@ -224,7 +224,7 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 185: using PQexecPrepared for "SELECT * FROM t1 WHERE id = $1" [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 185: parameter 1 = 4 +[NO_PID]: ecpg_free_params on line 185: parameter 1 = 4 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 185: correctly got 1 tuples with 5 fields [NO_PID]: sqlca: code: 0, state: 00000 @@ -262,7 +262,7 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 222: using PQexecPrepared for "SELECT * FROM t1 WHERE id = $1" [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 222: parameter 1 = 4 +[NO_PID]: ecpg_free_params on line 222: parameter 1 = 4 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 222: correctly got 1 tuples with 5 fields [NO_PID]: sqlca: code: 0, state: 00000 -- 2.40.0