-
Notifications
You must be signed in to change notification settings - Fork 426
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Re-use "executedAtLeastOnce" across connections per Brett's suggestion
- Loading branch information
Showing
5 changed files
with
111 additions
and
124 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
@TobiasSQL I'm thinking that because the
isExecutedAtLeastOnce
is now based, at least in part, on whether theparsedSQLCache
indicates prior execution, maybe the "weighed capacity" (aka "size") of theparsedSQLCache
should be the max ofPARSED_SQL_CACHE_SIZE
andserverPreparedStatementDiscardThreshold
.The only catch is that the parsedSQLCache is initialized statically, when the class is loaded, while the handle "cache" is per-connection.
One solution would be to call:
wherever
serverPreparedStatementDiscardThreshold
is modified. The added benefit is that provides an indirect mechanism whereby users can adjust theparsedSQLCache
size (upward), similar to MySQL'sprepStmtCacheSize
(which controls their client-side parse cache as well, seecachePrepStmts
).What do you think?