Hi,

At the end of a command, disable_statement_timeout is called as the
timeout applies to a specific command and a CommandComplete message is
sent.

However, it's possible for the stmt timeout to have been fired between
the last message and the call to disable_statement_timeout. The
timeout won't be active anymore, so disable_timeout will be skipped.
However, the timeout is still queued, and the next call to
CHECK_FOR_INTERRUPTS will process and generate a stmt timeout error.

This leads to the confusing situation where we can have a
CompleteCommand message followed by a stmt timeout error for the same
command.

This patch fixes this issue by resetting the timeout indicator if the
timeout is inactive, relying on get_timeout_indicator to reset the
timeout indicator.

Regards,
Anthonin Bonnefoy

Attachment: v1-0001-Reset-stmt-timeout-indicator-on-disable_statement.patch
Description: Binary data

Reply via email to