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

Adapt the MySQL input plugin to handle specific MariaDB implementation of user statistics tables #3382

Conversation

etiennecarriere
Copy link

@etiennecarriere etiennecarriere commented Oct 24, 2017

Linked to #2910

Required for all PRs:

  • Signed CLA.
  • Associated README.md updated.
  • Has appropriate unit tests.

@etiennecarriere etiennecarriere force-pushed the task_mariadb_user_statistics branch from 6ab2bfa to f5397a6 Compare October 24, 2017 12:08
@etiennecarriere
Copy link
Author

I have a test failure on something that is not related to mysql (udplistener). Could you relaunch the test ?

@danielnelson
Copy link
Contributor

Now that I see the code changes, I think my original advice was bad and we should adjust the way we address this.

It looks like we have only a couple fields which are not shared, as well as a few types which are different. What if we stick with the old select * query and when we Scan the rows we pull out the columns we know are there, and then try to pull the optional two columns one at a time. If there is an error we ignore it. We can change the target values to be pointers and if they are nil they won't be added as fields when you call AddFields.

The second problem is the types, we can't switch the type to a float because the type change will cause an error for users of Percona databases in InfluxDB. Are we able to detect this when we Scan? Maybe we can try to scan into an int and fallback to a float?

@HristoMohamed
Copy link

Any update on this?

@etiennecarriere
Copy link
Author

etiennecarriere commented Nov 29, 2017

I am not a Go expert and I don't know how to do it as @danielnelson says as i don't see how to get a column by its name and not by its position in the result of a request.

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.

3 participants