Skip to content

Commit

Permalink
add testcase for decimal mul datatrucate
Browse files Browse the repository at this point in the history
  • Loading branch information
lysu committed Jul 11, 2018
1 parent 126d875 commit 0151f10
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion expression/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3352,7 +3352,7 @@ func newStoreWithBootstrap() (kv.Storage, *domain.Domain, error) {
return store, dom, errors.Trace(err)
}

func (s *testIntegrationSuite) TestTwoDecimalAssignTruncate(c *C) {
func (s *testIntegrationSuite) TestTwoDecimalTruncate(c *C) {
tk := testkit.NewTestKit(c, s.store)
defer s.cleanEnv(c)
tk.MustExec("use test")
Expand All @@ -3363,4 +3363,6 @@ func (s *testIntegrationSuite) TestTwoDecimalAssignTruncate(c *C) {
tk.MustExec("update t1 set b = a")
res := tk.MustQuery("select a, b from t1")
res.Check(testkit.Rows("123.12345 123.1"))
res = tk.MustQuery("select 2.00000000000000000000000000000001 * 1.000000000000000000000000000000000000000000002")
res.Check(testkit.Rows("2.000000000000000000000000000000"))
}

0 comments on commit 0151f10

Please sign in to comment.