another test case for ER_DATA_OUT_OF_RANGE on insert

tests it with a non-const table too
This commit is contained in:
Sergei Golubchik 2016-04-20 15:26:37 +02:00
parent b069d19284
commit 8f1f869f68
2 changed files with 13 additions and 0 deletions

View File

@ -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;

View File

@ -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