Add missing check_conn when running SQL statements

Intermittent errors from the DB can cause the connection to be reset and
not re-established for the next statement to be executed, leading to
segfaults.

fixes #742

Change-Id: I1ed5b75457ab7167a70df5e04a964d37f98e60f7
changes/94/28494/1
Richard Fuchs 8 years ago
parent c4b6fbc01c
commit 2574611159

@ -159,6 +159,8 @@ INLINE void my_d(MYSQL_BIND *b, const double *d) {
static void execute_wrap(MYSQL_STMT **stmt, MYSQL_BIND *binds, unsigned long long *auto_id) {
int retr = 0;
while (1) {
if (check_conn())
goto err;
if (mysql_stmt_bind_param(*stmt, binds))
goto err;
if (mysql_stmt_execute(*stmt))

Loading…
Cancel
Save