Skip to content

Commit

Permalink
add batch drop when meet error
Browse files Browse the repository at this point in the history
  • Loading branch information
zhexuany committed Jun 6, 2018
1 parent 5cbbc29 commit 1f05eef
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions executor/simple_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,16 @@ func (s *testSuite) TestUser(c *C) {
"% test test Y N N N N N N N N N N N N N N N N N N",
"localhost test testDBRevoke N N N N N N N N N N N N N N N N N N N",
))

// Test drop user meet error
_, err = tk.Exec(dropUserSQL)
c.Assert(terror.ErrorEqual(err, terror.ClassExecutor.New(executor.CodeCannotUser, "")), IsTrue)

createUserSQL = `CREATE USER 'test1'@'localhost'`
createUserSQL = `CREATE USER 'test2'@'localhost'`
tk.Exec(createUserSQL)

dropUserSQL = `DROP USER 'test1'@'localhost', 'test2'@'localhost', 'test3'@'localhost';`
_, err = tk.Exec(dropUserSQL)
c.Assert(terror.ErrorEqual(err, terror.ClassExecutor.New(executor.CodeCannotUser, "")), IsTrue)
}
Expand Down

0 comments on commit 1f05eef

Please sign in to comment.