[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: |
|
||||||||
| Issue Links: |
|
||||||||
| 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. 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
version string at connection handshake, and Connector/C returns the correct version
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: | ||
| 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 |