pingcap / pingcap/tidb

Record COM_STMT_PREPARE, COM_STMT_CLOSE... into the general log

Open
#37,723 1 comment 0 reactions 0 assignees View on GitHub
type/enhancement
Dominant language
Go
Stars
40.5k
Forks
6.2k
PR merge metrics
PR metrics pending

Description

## Enhancement
According to the MySQL doc, the general log should be useful when we "want to know exactly what the client sent". MySQL recorded very detailed information, even for every connection and disconnection.

Currently, in tidb's general log, we only record every statement "executed". For others sent by the clients, like `COM_STMT_PREPARE` and `COM_STMT_CLOSE`, we don't record them.
Recording them is useful when investigating issues related to the prepared statement.
And I think we can also record every command received from the client.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.