Skip to content

Commit

Permalink
another test case for ER_DATA_OUT_OF_RANGE on insert
Browse files Browse the repository at this point in the history
tests it with a non-const table too
  • Loading branch information
vuvova committed Apr 20, 2016
1 parent b069d19 commit 8f1f869
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions mysql-test/r/func_math.result
Original file line number Diff line number Diff line change
Expand Up @@ -663,6 +663,11 @@ SELECT -a FROM t1;
ERROR 22003: BIGINT value is out of range in '-(`test`.`t1`.`a`)'
SELECT -b FROM t1;
ERROR 22003: BIGINT value is out of range in '-(`test`.`t1`.`b`)'
INSERT INTO t1 VALUES(0,0);
SELECT -a FROM t1;
ERROR 22003: BIGINT value is out of range in '-(`test`.`t1`.`a`)'
SELECT -b FROM t1;
ERROR 22003: BIGINT value is out of range in '-(`test`.`t1`.`b`)'
DROP TABLE t1;
SET @a:=999999999999999999999999999999999999999999999999999999999999999999999999999999999;
SELECT @a + @a;
Expand Down
8 changes: 8 additions & 0 deletions mysql-test/t/func_math.test
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,14 @@ SELECT -a FROM t1;
--error ER_DATA_OUT_OF_RANGE
SELECT -b FROM t1;

# try with two rows now
INSERT INTO t1 VALUES(0,0);

--error ER_DATA_OUT_OF_RANGE
SELECT -a FROM t1;
--error ER_DATA_OUT_OF_RANGE
SELECT -b FROM t1;

DROP TABLE t1;

# Decimal overflows
Expand Down

0 comments on commit 8f1f869

Please sign in to comment.