[CONC-318] mysql_get_server_version() returns 0 if version_string is set to empty in maxscale.cnf file Created: 2018-03-20  Updated: 2018-03-21  Resolved: 2018-03-21

Status: Closed
Project: MariaDB Connector/C
Component/s: None
Affects Version/s: None
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Sandhya Sriraj Assignee: Georg Richter
Resolution: Not a Bug Votes: 0
Labels: None

Attachments: File maxscale.cnf    
Issue Links:
Problem/Incident
is caused by MXS-1731 Empty version_string is not detected Closed

 Description   

We found an issue while connecting through maxscale using SQLyog. SQLyog/MONyog supports only > 4.0 servers. To check this we are executing mysql_get_server_version() and checking the version is > 4.0 or not. But in maxscale, when version_string is set to empty in maxscale.cnf file, mysql_get_server_version() returns "0" and SQLyog returns an error.

I am not sure whether the issue is related MariaDB C connector or maxscale.

According to the documentation, version_string parameter sets a custom version string that is sent in the MySQL Handshake from MariaDB MaxScale to clients.
Example:
version_string=5.5.37-MariaDB-RWsplit

If not set, the default value is the server version of the embedded MySQL/MariaDB library. Example: 5.5.35-MariaDB

MaxScale version: 2.2.3



 Comments   
Comment by Georg Richter [ 2018-03-20 ]

Hi,

MaxScale 2.2.3 sends

5.5.5-10.2.12 MaxScale 2.2.3

version string at connection handshake, and Connector/C returns the correct version

100212

Which maxscale version do you use?

Comment by Sandhya Sriraj [ 2018-03-21 ]

MaxScale version: 2.2.3.

If you do not specify version_string then MaxScale returns 100212. But if you add "version_string=" in maxscale.cnf file then it returns 0.

Comment by markus makela [ 2018-03-21 ]

By adding version_string=, you tell MaxScale to send an empty string as the version string in the handshake. Remove the parameter or add a sane value to it to fix it.

Comment by markus makela [ 2018-03-21 ]

I opened a bug report for MaxScale for the empty version_string: MXS-1731

Comment by Georg Richter [ 2018-03-21 ]

Not a Connector/C bug (MaxScale doesn't seem to handle empty server_version correctly). For more information/progress please track MXS-1731

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