Details
-
New Feature
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
None
-
None
Description
Server-prepared statements use a regex pattern to identify commands that doesn't begin with SELECT, UPDATE, INSERT, DELETE, REPLACE, DO, or CALL, ensuring these commands are prepared in advance to verify they can be successfully prepared.
However, it's more effective to implement proper failover logic using client-side prepared statements. When server preparation fails, the system should fall back to client-side preparation, which eliminates the need for regex testing and avoids the limitations inherent in server-prepared statements—such as the restriction of no more than 65,000 parameters.
Since MariaDB 10.6, very few commands cannot be prepared, making this fallback approach superior in terms of both performance and reliability.