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

Optimize base.ValidateConnection(...) #1227

Conversation

timvaillancourt
Copy link
Collaborator

Description

This PR simplifies the code in base.ValidateConnection and reduces the number of queries from 3 -> 2 in most cases by gathering the @@global.version and @@global.port` in the same query

Later, the @@global.port variable is checked for NULL as this can happen on some cloud MySQL flavours

In case this PR introduced Go code changes:

  • contributed code is using same conventions as original code
  • script/cibuild returns with no formatting errors, build errors or unit test errors.

@timvaillancourt timvaillancourt changed the title Base validate connection cleanup Optimize base.ValidateConnection(...) Dec 11, 2022
@timvaillancourt
Copy link
Collaborator Author

Close in favour of #1229

@timvaillancourt timvaillancourt deleted the base-ValidateConnection-cleanup branch December 12, 2022 22:07
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.

1 participant