Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
*: add preparedStmt metric and add limit to max prepareStmt #8405
What problem does this PR solve?
prepared statement should be prepare once and reuse in later execution and close them when no need them.
we need find and protect wrong prepare stmt usage, so this PR:
and we support
What is changed and how it works?
@hhxcc yes, most database sdk use binary protocol and comStmtClose way, and some cli will use text protocol comQuery
the tricks in current tidb for this is there two impl to them, comStmtClose way more complex than comQuery deallocate, because it take transaction retry logic, stmtClose during transaction will delay to retry finished(session#cleanRetryInfo)
but, both comStmtClose and comQuery deallocate will need add/remove