Skip to content

Commit

Permalink
ddl: merge master
Browse files Browse the repository at this point in the history
  • Loading branch information
zimulala committed Feb 19, 2024
1 parent a5e6308 commit 928ab80
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion pkg/ddl/db_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1628,7 +1628,15 @@ func TestDefaultColumnWithReplace(t *testing.T) {

// insert records
tk.MustExec("insert into t(c) values (1),(2),(3)")
tk.MustGetErrCode("insert into t1(c) values (1)", errno.ErrTruncatedWrongValue)
// Different UUID values will result in different error code.
_, err := tk.Exec("insert into t1(c) values (1)")
originErr := errors.Cause(err)
tErr, ok := originErr.(*terror.Error)
require.Truef(t, ok, "expect type 'terror.Error', but obtain '%T': %v", originErr, originErr)
sqlErr := terror.ToSQLError(tErr)
if int(sqlErr.Code) != errno.ErrTruncatedWrongValue {
require.Equal(t, errno.ErrDataOutOfRange, int(sqlErr.Code))
}

rows := tk.MustQuery("SELECT c1 from t").Rows()
for _, row := range rows {
Expand Down

0 comments on commit 928ab80

Please sign in to comment.