Skip to content

Added handling of SELECT @@version and SELECT VERSION() without backend#4889

Merged
renecannao merged 8 commits intov3.0from
v3.0_get_server_version
Dec 14, 2025
Merged

Added handling of SELECT @@version and SELECT VERSION() without backend#4889
renecannao merged 8 commits intov3.0from
v3.0_get_server_version

Conversation

@yashwantsahu20
Copy link
Contributor

@yashwantsahu20 yashwantsahu20 commented Mar 27, 2025

Added handling of SELECT @@Version and SELECT VERSION() without backend.

Currently returning server version as 8.0.0, but may be we should get it from global variables.
Tested it manually.

This change is related to aaiomysql third-party testing.

mysql> select @@Version;
+------------------+
| select @@Version |
+------------------+
| 8.0.0 |
+------------------+
1 row in set (4.77 sec)

mysql> SELECT VERSION();
+------------------+
| SELECT VERSION() |
+------------------+
| 8.0.0 |
+------------------+
1 row in set (2.77 sec)

For detail:
https://github.com/ProxySQL/proxysql_3p_testing/issues/18

@renecannao
Copy link
Contributor

Initial requirement:

Reply to client’s queries SELECT @@version (and also lowercase) returning the value of mysql-server_version without the need of any backend. For reference, we already have a similar implementation for SELECT LAST_INSERT_ID() . The query should also not disable multiplexing. TAP test for this can be temporarily skipped.

@renecannao
Copy link
Contributor

Can one of the admins verify this patch?

Signed-off-by: Wazir Ahmed <wazir@proxysql.com>
@sonarqubecloud
Copy link

sonarqubecloud bot commented Aug 1, 2025

Quality Gate Failed Quality Gate failed

Failed conditions
9.6% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@wazir-ahmed wazir-ahmed self-assigned this Oct 2, 2025
renecannao and others added 4 commits November 27, 2025 15:47
Signed-off-by: René Cannaò <rene@proxysql.com>
Signed-off-by: René Cannaò <rene@proxysql.com>
Signed-off-by: René Cannaò <rene@proxysql.com>
@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 6, 2025

@renecannao renecannao merged commit 5a314d2 into v3.0 Dec 14, 2025
147 of 154 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants