[MXS-3395] Problems with prepared statements with more than 2^16 columns Created: 2021-02-02  Updated: 2021-02-15  Resolved: 2021-02-15

Status: Closed
Project: MariaDB MaxScale
Component/s: Core
Affects Version/s: None
Fix Version/s: 2.5.8

Type: Bug Priority: Major
Reporter: markus makela Assignee: markus makela
Resolution: Fixed Votes: 0
Labels: None


 Description   

The binary protocol stores the column and parameter counts in a 16-bit unsigned integer. One would assume that prepared statements that have more columns or parameters than that would fail but the server allows them to be prepared. What this means is that the column and parameter counts cannot be trusted and the only way to know when a prepared statement ends is to count the EOF packets.

The current method in MaxScale counts the total number of packets expected after the initial OK packet for the COM_STMT_PREPARE. This won't work due to the aforementioned problems in the protocol. The fix to this is to count how many EOF packets are expected and count those.


Generated at Thu Feb 08 04:21:06 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.