From c128519e50bf319acfbf22dae02eac39c7d24745 Mon Sep 17 00:00:00 2001 From: Gilles Chehade Date: Mon, 6 Apr 2020 20:39:55 +0200 Subject: [PATCH] fix mysql disconnect on error --- extras/tables/table-mysql/table_mysql.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/extras/tables/table-mysql/table_mysql.c b/extras/tables/table-mysql/table_mysql.c index 53fb7b7..010f19e 100644 --- a/extras/tables/table-mysql/table_mysql.c +++ b/extras/tables/table-mysql/table_mysql.c @@ -372,9 +372,7 @@ table_mysql_query(const char *key, int service) } if (mysql_stmt_execute(stmt)) { - if (mysql_stmt_errno(stmt) == CR_SERVER_LOST || - mysql_stmt_errno(stmt) == CR_SERVER_GONE_ERROR || - mysql_stmt_errno(stmt) == CR_COMMANDS_OUT_OF_SYNC) { + if (mysql_stmt_errno(stmt)) { log_warnx("warn: trying to reconnect after error: %s", mysql_stmt_error(stmt)); if (config_connect(config)) goto retry;