-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
plans: Fix bug in show full tables #765
Conversation
return data[1], nil | ||
// The first column is Tables_in_{database}. | ||
// If s.Full is true, there is a column named Table_type at the second place. | ||
if strings.EqualFold(name, "Table_type") { |
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 if check seems the same as if s.Full && strings.EqualFold(name, "Table_type")
, why use two if check?
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.
They are the same. I will change it back.
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.
PTAL
LGTM |
1 similar comment
LGTM |
@@ -68,6 +68,13 @@ func mustQuery(c *C, currDB *sql.DB, s string) int { | |||
return cnt | |||
} | |||
|
|||
func mustFailQuery(c *C, currDB *sql.DB, s string) { | |||
rows, _ := currDB.Query(s) |
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.
Please don't ignore error.
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.
PTAL
LGTM |
plans: Fix bug in show full tables
Signed-off-by: AmoebaProtozoa <8039876+AmoebaProtozoa@users.noreply.github.com>
Support SHOW FULL TABLES FROM test WHERE Tables_in_test = 't1' AND Table_type != 'VIEW'
The first column is "Tables_in_{db}", we should support it in where expression.