summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: dd836cf)
raw | patch | inline | side by side (parent: dd836cf)
author | Sebastian Harl <sh@tokkee.org> | |
Mon, 16 Feb 2009 21:41:19 +0000 (22:41 +0100) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Mon, 16 Feb 2009 21:41:19 +0000 (22:41 +0100) |
This parameter is used to store the size of a frequently used temporary list
and allows that it may be efficiently stored on the stack. It was accidentally
lost in commit 4d380d9, triggering an assertion in c_psql_exec_query_params().
and allows that it may be efficiently stored on the stack. It was accidentally
lost in commit 4d380d9, triggering an assertion in c_psql_exec_query_params().
src/postgresql.c | patch | blob | history |
diff --git a/src/postgresql.c b/src/postgresql.c
index 4e1c1e0c8127bebb693d71fc0b60116a84f1ad35..adddc00a46f394ca7c561d6b1881eb32471b646a 100644 (file)
--- a/src/postgresql.c
+++ b/src/postgresql.c
int status;
int i;
- /* The user data may hold parameter information */
+ /* The user data may hold parameter information, but may be NULL. */
data = udb_query_get_user_data (q);
/* Versions up to `3' don't know how to handle parameters. */
&db->queries, &db->queries_num);
}
+ for (i = 0; (size_t)i < db->queries_num; ++i) {
+ c_psql_user_data_t *data;
+ data = udb_query_get_user_data (db->queries[i]);
+ if ((data != NULL) && (data->params_num > db->max_params_num))
+ db->max_params_num = data->params_num;
+ }
return 0;
} /* c_psql_config_database */