summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Friloux <guillaume.friloux@asp64.com>2013-07-22 14:22:57 +0200
committerGuillaume Friloux <guillaume.friloux@asp64.com>2013-07-22 14:22:57 +0200
commit435cae95419b525e2be70fa9ea098f43458e0aa6 (patch)
tree4bef46572e9b924e9d54f58bb1a19075dbee6808
parent3f0e2af70a5383705fa888dfcbc67aac6b38745f (diff)
Reset the error pointers after each result set so a query error doesnt
force you to disconnect and reconnect to the MySQL server. A test program to test the patch is available here : http://0bin.net/paste/MB5RLtWHacovKgzL#dSni2rBVtplHP343YJnRk8K1tQmnR1GoAkQlGR3kuh8=
-rw-r--r--src/modules/mysql/esql_mysql_backend.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/modules/mysql/esql_mysql_backend.c b/src/modules/mysql/esql_mysql_backend.c
index db986d4..d2d56df 100644
--- a/src/modules/mysql/esql_mysql_backend.c
+++ b/src/modules/mysql/esql_mysql_backend.c
@@ -187,6 +187,12 @@ esql_mysac_query(Esql *e, const char *query, unsigned int len __UNUSED__)
187static void 187static void
188esql_mysac_res_free(Esql_Res *res) 188esql_mysac_res_free(Esql_Res *res)
189{ 189{
190 MYSAC *mysac;
191 mysac = res->e->backend.db;
192 res->e->error = NULL;
193 mysac->errorcode = 0;
194 mysac->mysql_error = NULL;
195
190 mysac_free_res(res->backend.res); 196 mysac_free_res(res->backend.res);
191} 197}
192 198