-
Notifications
You must be signed in to change notification settings - Fork 812
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
[mysql] use information_schema
when < 5.6.0
#3196
Conversation
The `performance_schema.threads` table is not available on MySQL < `5.6.0`. As a result, retrieving the slaves' statuses triggers the following error: ``` ProgrammingError: (1146, u"Table 'performance_schema.threads' doesn't exist") ``` This is a regression introduced by #2603
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one comment. Otherwise 👍
@@ -863,12 +863,17 @@ def _get_replica_stats(self, db): | |||
self.warning("Privileges error getting replication status (must grant REPLICATION CLIENT): %s" % str(e)) | |||
return {} | |||
|
|||
def _get_slave_status(self, db, nonblocking=True): | |||
def _get_slave_status(self, db, above_560): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we keep the non-blocking optional parameter?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what's the benefits in doing that. _get_slave_status
is only called here and once.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if that was added on a customer request, not specifically, but asking to make the check more performant. But you are correct, it's only holding the mutex once per check run.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your call.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
The
performance_schema.threads
table is not available on MySQL <5.6.0
. As a result, retrieving the slaves' statuses triggers thefollowing error:
This is a regression introduced by
#2603