Skip to content
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

expression: fix inaccurate error info for year column out of range #18871

Merged
merged 7 commits into from
Sep 23, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add unit test
  • Loading branch information
xiaodong-ji committed Sep 15, 2020
commit b17cded907a2e53e5dec4f4ba2d08915ad1c529d
4 changes: 4 additions & 0 deletions executor/insert_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,10 @@ func (s *testSuite3) TestInsertWrongValueForField(c *C) {
tk.MustExec(`insert into t1 values('我');`)
tk.MustExec(`alter table t1 add column b char(10) charset ascii as ((a));`)
tk.MustQuery(`select * from t1;`).Check(testkit.Rows(`我 `))

wshwsh12 marked this conversation as resolved.
Show resolved Hide resolved
tk.MustExec(`create table t (a year);`)
_, err = tk.Exec(`insert into t values(2156);`)
c.Assert(err.Error(), Equals, `[types:1264]Out of range value for column 'a' at row 1`)
}

func (s *testSuite3) TestInsertDateTimeWithTimeZone(c *C) {
Expand Down