[MDEV-26233] share prepared statement cache between connections Created: 2021-07-24  Updated: 2021-07-25

Status: Open
Project: MariaDB Server
Component/s: Prepared Statements
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Axel Schwenke Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-26234 make max_prepared_stmt_count a per co... Open

 Description   

Currently a prepared statement works only for the thread/connection that actually prepared it. If a heavily multithreaded application runs the same queries in many threads, this leads to many duplicates in the prepared statement cache.

Example: sysbench OLTP. This one prepares a total of (2 + 9*number_of_tables) queries. Due to the above limitation it has to do this per thread. With for example 10 tables it cannot spawn more than 178 threads before reaching the default limit of 16K prepared statements.


Generated at Thu Feb 08 09:43:45 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.