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

plans: Fix bug in show full tables #765

Merged
merged 3 commits into from
Dec 21, 2015
Merged

plans: Fix bug in show full tables #765

merged 3 commits into from
Dec 21, 2015

Conversation

shenli
Copy link
Member

@shenli shenli commented Dec 21, 2015

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.

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") {
Copy link
Member

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?

Copy link
Member Author

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.

Copy link
Member Author

Choose a reason for hiding this comment

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

PTAL

@siddontang
Copy link
Member

LGTM

1 similar comment
@qiuyesuifeng
Copy link
Member

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)
Copy link
Member

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.

Copy link
Member Author

Choose a reason for hiding this comment

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

PTAL

@ngaut
Copy link
Member

ngaut commented Dec 21, 2015

LGTM

ngaut added a commit that referenced this pull request Dec 21, 2015
@ngaut ngaut merged commit 7ffe287 into master Dec 21, 2015
@ngaut ngaut deleted the shenli/show-full-tables branch December 21, 2015 13:19
xhebox pushed a commit to xhebox/tidb that referenced this pull request Sep 28, 2021
xhebox pushed a commit to xhebox/tidb that referenced this pull request Oct 8, 2021
rleungx pushed a commit to rleungx/tidb that referenced this pull request Feb 26, 2024
Signed-off-by: AmoebaProtozoa <8039876+AmoebaProtozoa@users.noreply.github.com>
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.

4 participants