Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: wjhuang2016 <huangwenjun1997@gmail.com>
  • Loading branch information
wjhuang2016 committed Dec 23, 2020
1 parent 836466a commit dd4f56b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions server/tidb_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -937,15 +937,15 @@ func (ts *tidbTestSuite) TestNO_DEFAULT_VALUEFlag(c *C) {
c.Assert(err, IsNil)

ctx := context.Background()
_, err = Execute(ctx, qctx, "use test")
_, err = qctx.Execute(ctx, "use test")
c.Assert(err, IsNil)
_, err = Execute(ctx, qctx, "drop table if exists t")
_, err = qctx.Execute(ctx, "drop table if exists t")
c.Assert(err, IsNil)
_, err = Execute(ctx, qctx, "create table t(c1 int key, c2 int);")
_, err = qctx.Execute(ctx, "create table t(c1 int key, c2 int);")
c.Assert(err, IsNil)
rs, err := Execute(ctx, qctx, "select c1 from t;")
rs, err := qctx.Execute(ctx, "select c1 from t;")
c.Assert(err, IsNil)
cols := rs.Columns()
cols := rs[0].Columns()
c.Assert(len(cols), Equals, 1)
expectFlag := uint16(tmysql.NotNullFlag | tmysql.PriKeyFlag | tmysql.NoDefaultValueFlag)
c.Assert(dumpFlag(cols[0].Type, cols[0].Flag), Equals, expectFlag)
Expand Down

0 comments on commit dd4f56b

Please sign in to comment.