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

Fix mysql version comparison logic. Fix typo. #36

Merged
merged 2 commits into from Apr 4, 2016

Conversation

wings27
Copy link
Contributor

@wings27 wings27 commented Jun 9, 2015

Fix mysql version comparison logic:

In python, string comparison considers "10.0.0" < "9.0.0".

So a mysql instance with version "10.0.0-mysql" will be rejected with error:

... requires MySQL version 5.0+ ...

To fix that, I added compare_version() to replace the old string comparison:
compare_version(x, y) returns a positive integer when version x is newer than version y, where version x and y are in the format: "major.minor.build-name", as in "5.6.0-mysql"

@@ -48,7 +48,7 @@ def create_pnames(db, tag=None, date_format="%Y%m%d"):
Filename format: <db>[_<tag>].<date=DATE_FORMAT>.(patch|revert).sql

Args:
db: srting, databse name
db: string, database name
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix typo here.

@blueness
Copy link

blueness commented Apr 4, 2016

Looks good to me. @mmatuson commit?

@mmatuson mmatuson merged commit fdddacb into mmatuson:master Apr 4, 2016
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.

None yet

3 participants