Skip to content

Return TabletManager.GetPermissions results in a consistent order#4694

Merged
sougou merged 1 commit intovitessio:masterfrom
dweitzman:perms
Mar 31, 2019
Merged

Return TabletManager.GetPermissions results in a consistent order#4694
sougou merged 1 commit intovitessio:masterfrom
dweitzman:perms

Conversation

@dweitzman
Copy link
Copy Markdown
Collaborator

This avoids false alarms from vtctl ValidatePermissionsKeyspace which
seems to assume the results will be in a consistent order but doesn't
explicitly sort them. MyISAM does not seem to return results in a
consistent order from mysql.user or mysql.db without an explicit ORDER BY.

Another change: "vtctl GetPermissions" will now print a json result to stdout
instead of logging an asciiproto to stderr/INFO so it's easier to examine or
debug output.

Signed-off-by: David Weitzman dweitzman@pinterest.com

This avoids false alarms from vtctl ValidatePermissionsKeyspace which
seems to assume the results will be in a consistent order but doesn't
explicitly sort them. MyISAM does not seem to return results in a
consistent order from mysql.user or mysql.db without an explicit ORDER BY.

Another change: "vtctl GetPermissions" will now print a json result to stdout
instead of logging an asciiproto to stderr/INFO so it's easier to examine or
debug output.

Signed-off-by: David Weitzman <dweitzman@pinterest.com>
@dweitzman dweitzman requested a review from sougou as a code owner March 2, 2019 01:13
@sougou sougou merged commit cb2c60c into vitessio:master Mar 31, 2019
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.

2 participants