Skip to content
This repository was archived by the owner on Oct 22, 2024. It is now read-only.

Commit 320447a

Browse files
authored
Update table_mysql.c
use mysql_stmt_errno() as reconn condition if mysql_stmt_execute() fails in fetch
1 parent c128519 commit 320447a

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

extras/tables/table-mysql/table_mysql.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -521,9 +521,7 @@ table_mysql_fetch(int service, struct dict *params, char *dst, size_t sz)
521521
goto fetch;
522522

523523
if (mysql_stmt_execute(stmt)) {
524-
if (mysql_stmt_errno(stmt) == CR_SERVER_LOST ||
525-
mysql_stmt_errno(stmt) == CR_SERVER_GONE_ERROR ||
526-
mysql_stmt_errno(stmt) == CR_COMMANDS_OUT_OF_SYNC) {
524+
if (mysql_stmt_errno(stmt)) {
527525
log_warnx("warn: trying to reconnect after error: %s", mysql_stmt_error(stmt));
528526
if (config_connect(config))
529527
goto retry;

0 commit comments

Comments
 (0)