-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
infoschema: Support for showing "AUTO_INCREMENT" in "information_schema.tables" #7037
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,6 +65,15 @@ func (s *testSuite) TestDataForTableRowsCountField(c *C) { | |
tk.MustQuery("select table_rows from information_schema.tables where table_name='t'").Check( | ||
testkit.Rows("2")) | ||
|
||
// Test for auto increment ID. | ||
tk.MustExec("drop table t") | ||
tk.MustExec("create table t (c int auto_increment primary key, d int)") | ||
tk.MustQuery("select auto_increment from information_schema.tables where table_name='t'").Check( | ||
testkit.Rows("1")) | ||
tk.MustExec("insert into t(c, d) values(1, 1)") | ||
tk.MustQuery("select auto_increment from information_schema.tables where table_name='t'").Check( | ||
testkit.Rows("30002")) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why this return 30002? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @zimulala Allocate a batch of 30000 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @XuHuaiyu
TiDB 2
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @ciscoxll |
||
|
||
tk.MustExec("create user xxx") | ||
tk.MustExec("flush privileges") | ||
|
||
|
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.
can
break
here?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.
@zimulala Please change here.