Skip to content

Commit

Permalink
address comment
Browse files Browse the repository at this point in the history
  • Loading branch information
bb7133 committed Nov 8, 2019
1 parent 964efa3 commit 6432c47
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions server/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -790,21 +790,21 @@ func runTestErrorCode(c *C) {
checkErrorCode(c, err, tmysql.ErrNoSuchTable)
_, err = txn2.Exec("create database test;")
// Make tests stable. Some times the error may be the ErrInfoSchemaChanged.
checkErrorCode(c, err, tmysql.ErrDBCreateExists, tmysql.ErrUnknown)
checkErrorCode(c, err, tmysql.ErrDBCreateExists, tmysql.ErrInfoSchemaChanged)
_, err = txn2.Exec("create database aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;")
checkErrorCode(c, err, tmysql.ErrTooLongIdent, tmysql.ErrUnknown)
checkErrorCode(c, err, tmysql.ErrTooLongIdent, tmysql.ErrInfoSchemaChanged)
_, err = txn2.Exec("create table test (c int);")
checkErrorCode(c, err, tmysql.ErrTableExists, tmysql.ErrUnknown)
checkErrorCode(c, err, tmysql.ErrTableExists, tmysql.ErrInfoSchemaChanged)
_, err = txn2.Exec("drop table unknown_table;")
checkErrorCode(c, err, tmysql.ErrBadTable, tmysql.ErrUnknown)
checkErrorCode(c, err, tmysql.ErrBadTable, tmysql.ErrInfoSchemaChanged)
_, err = txn2.Exec("drop database unknown_db;")
checkErrorCode(c, err, tmysql.ErrDBDropExists, tmysql.ErrUnknown)
checkErrorCode(c, err, tmysql.ErrDBDropExists, tmysql.ErrInfoSchemaChanged)
_, err = txn2.Exec("create table aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa (a int);")
checkErrorCode(c, err, tmysql.ErrTooLongIdent, tmysql.ErrUnknown)
checkErrorCode(c, err, tmysql.ErrTooLongIdent, tmysql.ErrInfoSchemaChanged)
_, err = txn2.Exec("create table long_column_table (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa int);")
checkErrorCode(c, err, tmysql.ErrTooLongIdent, tmysql.ErrUnknown)
checkErrorCode(c, err, tmysql.ErrTooLongIdent, tmysql.ErrInfoSchemaChanged)
_, err = txn2.Exec("alter table test add aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa int;")
checkErrorCode(c, err, tmysql.ErrTooLongIdent, tmysql.ErrUnknown)
checkErrorCode(c, err, tmysql.ErrTooLongIdent, tmysql.ErrInfoSchemaChanged)

// Optimizer errors
_, err = txn2.Exec("select *, * from test;")
Expand Down

0 comments on commit 6432c47

Please sign in to comment.