Commit 8f1f869f authored by Sergei Golubchik's avatar Sergei Golubchik

another test case for ER_DATA_OUT_OF_RANGE on insert

tests it with a non-const table too
parent b069d192
......@@ -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;
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment