Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change @@version and @@version_comment #7337

Merged
merged 1 commit into from
Jan 26, 2021

Conversation

systay
Copy link
Collaborator

@systay systay commented Jan 21, 2021

Description

This PR changes the @@version and @@version_comment values to include information about the Vitess version.
It also removed the recently added @@vitess_version.

The change includes a new file, version.go that contains very little. It's kept minimal like this to be easy for our release scripts to update the named version.

mysql> select @@version;
+------------------------------+
| @@version                    |
+------------------------------+
| 5.7.9-vitess-10.0.0-SNAPSHOT |
+------------------------------+

mysql> select @@version_comment;
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| @@version_comment                                                                                                                                                                        |
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Version: 10.0.0-SNAPSHOT (Git revision d54b87c83 branch 'release-name-in-version') built on Wed Jan 20 20:42:46 CET 2021 by systay@Andress-MacBook-Pro.local using go1.15.5 darwin/amd64 |
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

@systay systay added Type: Enhancement Logical improvement (somewhere between a bug and feature) Component: Query Serving labels Jan 21, 2021
@systay systay requested a review from Akilan1999 January 21, 2021 05:45
@systay systay changed the title Cleanup in version system variables Change @@version and @@version_comment Jan 21, 2021
@systay systay removed the request for review from sougou January 21, 2021 06:01
@askdba
Copy link
Contributor

askdba commented Jan 22, 2021

Should we not have a variable as vitess_version versus default mysql_version?
What we would like to identify the build that relates to Vitess Major Version.
So I suggest we keep version for MySQL vitess_version from Vitess.

+------------------------------+
| @@version                    |
+------------------------------+
| 5.7.9-vitess-10.0.0-SNAPSHOT |
+------------------------------+
1 row in set (0.00 sec)

mysql> select @@version_comment;
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| @@version_comment                                                                                                                                                          |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Version: 10.0.0-SNAPSHOT (Git revision bc4186242 branch 'release-name-in-version') built on Fri Jan 22 15:55:35 UTC 2021 by vitess@e355445e6586 using go1.15.6 linux/amd64 |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

Otherwise, this could be confusing for generic MySQL users expecting a different result.

@askdba askdba self-requested a review January 22, 2021 16:03
@systay
Copy link
Collaborator Author

systay commented Jan 25, 2021

@askdba:
The reason I wanted to overwrite the @@version comes from seeing what Ubuntu does with their mysql installation:
5.7.27-0ubuntu0.18.04.1. Surely Vitess should be able to change the version string as much as Ubuntu can.

I don't think it's a good idea to simply pass on the underlying mysql version like we are doing today - they are not interacting with mysql of that version, they are interaction with Vitess which is very different. It already creates problems when users are running mysql 8.0, since some libraries/apps/orms start using features that Vitess does not support.

@systay systay merged commit 9f05c19 into vitessio:master Jan 26, 2021
@systay systay deleted the release-name-in-version branch January 26, 2021 15:28
@deepthi
Copy link
Member

deepthi commented Jan 26, 2021

@systay the docs need to be updated.
@Akilan1999 was a good citizen and added to the docs here: vitessio/website#668

@aquarapid
Copy link
Contributor

Something for the eventual 10.0 release notes: the server version we advertise to connectors in on the protocol level has changed from "5.7.9-Vitess" to "5.7.9-vitess-10.0.0-SNAPSHOT" (or whatever); if anyone introspects this value, they might care.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Query Serving Type: Enhancement Logical improvement (somewhere between a bug and feature)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants