Skip to content
This repository has been archived by the owner on Jan 12, 2021. It is now read-only.

Fix feature detection between MySQL and MariaDB #110

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open

Fix feature detection between MySQL and MariaDB #110

wants to merge 14 commits into from

Conversation

spawnia
Copy link

@spawnia spawnia commented Feb 7, 2020

Fixes #109

I generalized the way that feature detection is performed to ensure it works correctly with MariaDB.

@ghost ghost added the size/XS label Feb 7, 2020
@ghost ghost added size/L and removed size/XS labels Feb 11, 2020
@spawnia spawnia changed the title Correctly detect if MariaDB supports roles Fix feature detection between MySQL and MariaDB Feb 11, 2020
return parseServerVersionString(versionString), nil
}

func (serverVersion ServerVersion) supportsRoles() bool {
Copy link
Author

Choose a reason for hiding this comment

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

Those helpers could receive db *sql.DB as well, that might simplify their usage.

What i like about this version is that it would enable a performance optimization: We could query for the version once and use that single result throughout all functions that need it.

@spawnia spawnia marked this pull request as ready for review February 11, 2020 22:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Detect availibility of roles feature in MariaDB broken
1 participant