Caching Filter (MXS-797)

[MXS-931] Support the caching of prepared statements Created: 2016-10-18  Updated: 2016-11-16  Resolved: 2016-11-02

Status: Closed
Project: MariaDB MaxScale
Component/s: cache
Affects Version/s: None
Fix Version/s: 2.1.0

Type: Sub-Task Priority: Major
Reporter: Johan Wikman Assignee: Johan Wikman
Resolution: Won't Do Votes: 0
Labels: None

Issue Links:
Blocks
is blocked by MXS-934 QC: Provide support for prepared stat... Closed
Sprint: 2016-16, 2016-17, 2016-18, 2016-19, 2016-21, 2016-22, 2016-23, 2016-24, 2017-25, 2017-26

 Comments   
Comment by Johan Wikman [ 2016-11-02 ]

Caching prepared statements will not be done in the 2.1 timeframe.
The steps that need to be done are:

  • Maintain a session specific associative array from statement name to statement.
  • Maintain a session specific associative array from user variable name to value.
  • When an EXECUTE statement comes, look up the statement using the statement name.
  • Replace all ?:s in the statement with the values of the user variables specified in the EXECUTE statement.
  • Use the resulting statement as key.
  • If found in the cache, return the result.
  • Otherwise send the EXECUTE to the server and store the result using the key statement.
Generated at Thu Feb 08 04:02:59 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.