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/32/28432/1
Richard Fuchs 7 years ago
parent 32c0f768f0
commit cfbd4bccf8

@ -203,6 +203,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