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

[mysql] use information_schema when < 5.6.0 #3196

Merged
merged 1 commit into from
Feb 16, 2017
Merged

Conversation

yannmh
Copy link
Member

@yannmh yannmh commented Feb 15, 2017

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

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
@yannmh yannmh self-assigned this Feb 15, 2017
@yannmh yannmh requested a review from truthbk February 15, 2017 14:23
Copy link
Member

@truthbk truthbk left a 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):
Copy link
Member

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?

Copy link
Member Author

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.

Copy link
Member

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.

Copy link
Member

Choose a reason for hiding this comment

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

Your call.

Copy link
Member

Choose a reason for hiding this comment

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

👍

@yannmh yannmh merged commit e9f5003 into master Feb 16, 2017
@yannmh yannmh deleted the yann/mysql-560-threads branch February 16, 2017 15:04
@truthbk truthbk added this to the 5.12.0 milestone Feb 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants