[ODBC-362] xpand compatibility: random error on connection Created: 2022-05-25  Updated: 2022-06-30  Resolved: 2022-05-27

Status: Closed
Project: MariaDB Connector/ODBC
Component/s: General
Affects Version/s: 3.1.15
Fix Version/s: 3.1.16

Type: Bug Priority: Critical
Reporter: Diego Dupin Assignee: Lawrin Novitsky
Resolution: Duplicate Votes: 0
Labels: None

Attachments: Text File trace4.txt    
Issue Links:
Duplicate
duplicates ODBC-328 Error connecting to older servers Closed
Problem/Incident

 Description   

When connecting to xpand, even if xpand doesn't send CLIENT_SESSION_TRACK capability flag, ODBC execute command "SET session_track_schema= ON".
This result in error, since xpand doesn't have this 'session_track_schema' variable.

Problem is that normally ODBC must not execute this : https://github.com/mariadb-corporation/mariadb-connector-odbc/blob/master/ma_connection.c#L967 odbc test server capability before issuing different command !?

see wireshark attached file that confirm this.

At the same time, a minor problem is that ODBC connector send capability to server that server has not advertise. It would be better not doing that.



 Comments   
Comment by Lawrin Novitsky [ 2022-05-26 ]

As for the main session - I cannot think atm how cat that happen. And it happens randomly - puzzles even more.

"At the same time, a minor problem is that ODBC connector send capability to server that server has not advertise. It would be better not doing that. " - I don't think that C/ODBC has anything to do with that. Must be C/C

Comment by Lawrin Novitsky [ 2022-05-27 ]

What is even more strange, than random errors, is that as I read the code, and that was the intention, even if query setting session_track_schema value fails, the connector should just fall back to not using session tracking, but "normal" reading of current schema if it's requested by application.
But I got it I am looking at the current repo code, and the change is not released yet, i.e. it is not in the 3.1.15
I guess this report duplicates ODBC-328. At least the fix for that issue should fix this issues as well.

Generated at Thu Feb 08 03:28:08 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.