Skip to content

Improve version filtering to allow scrapers to better distinguish versions of MySQL vs MariaDB or other forks #966

@sjmudd

Description

@sjmudd

The current code has information which indicates from which version of MySQL it works using the scraper's Version() function.

With MariaDB's 10.X vs MySQL going from 5.6, 5.7, 8.0, 8.4 and now 9.X there's an interesting overlap which does not seem easy to check using a single version value so the current test with the Scraper Version() function does not work very well.

Perhaps consider an alternative similar to what Orchestrator does:

// CheckVersion returns true if the scraper can be used with the given `versionComment` / `version` of the server.
// e.g. SELECT @@version_comment, @@version; provides all the needed information to distinguish all fork / version combinations.
func (scraper ScrapeWhatever) CheckVersion(versionComment, version string) bool {
    // allows for Percona vs MariaDB vs MySQL vs other implementations
    // shares the version provided by the server itself, it has 3 digit parts and some features at least in `8.0` depend on the final digit value so the string representation of the version provides flexibility of the scraper to understand the complete version if needed.
    // return true if version is compatible with the scraper
}

Maybe some golang introspection of the existing scraper structures can allow for the original checks to work if no CheckVersion() struct function is available.

  • After MySQL 9.7 LTS it will be interesting to see if Oracle continues with 9.X values or jumps to 10.X, but overlapping versions with MySQL and MariaDB is going to be problematic especially given the continuing divergence of the 2 forks.
  • MySQL Enterprise also has slightly different features vs MySQL community so that's another factor to take into account.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions