[MDEV-26868] Session tracking flag in OK_PACKET Created: 2021-10-20  Updated: 2021-11-16  Resolved: 2021-10-26

Status: Closed
Project: MariaDB Server
Component/s: Protocol
Affects Version/s: 10.2, 10.3, 10.4, 10.5, 10.6, 10.7
Fix Version/s: 10.2.41, 10.3.32, 10.4.22, 10.5.13, 10.6.5, 10.7.1

Type: Bug Priority: Blocker
Reporter: Diego Dupin Assignee: Oleksandr Byelkin
Resolution: Fixed Votes: 0
Labels: None

Attachments: Text File MDEV-26868.patch    

 Description   

There is a difference between mariadb and mysql concerning session state tracking.
MySQL OK_Packet server_status flag may have value SERVER_SESSION_STATE_CHANGED set *ONLY * when client has set capability CLIENT_SESSION_TRACK.
MariaDB may set value SERVER_SESSION_STATE_CHANGED whatever client CLIENT_SESSION_TRACK capability has been set.

This difference has impacts: Recent version of mysql java connector rely only on server status flag value SERVER_SESSION_STATE_CHANGED to read session state additional bytes. Connector then try to read bytes that doesn't exist in packet when a session state change (only workaround is to enable mysql connector option `trackSessionState`).

proposed patch joined (tested)



 Comments   
Comment by Oleksandr Byelkin [ 2021-10-26 ]

I reviewed the patch it is OK and I will push it

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