diff options
author | Georgi Kodinov <joro@sun.com> | 2009-11-09 16:09:46 +0200 |
---|---|---|
committer | Georgi Kodinov <joro@sun.com> | 2009-11-09 16:09:46 +0200 |
commit | 4519d5e4f1ce1c9081f711d88d7508f58453d219 (patch) | |
tree | 247236a10eaca813ddeeeff2b92acddda2c34e5a /mysql-test | |
parent | ddd90017e75cf1241da12cdc3fd55b44da0c4a9d (diff) | |
download | mariadb-git-4519d5e4f1ce1c9081f711d88d7508f58453d219.tar.gz |
Bug #48458: simple query tries to allocate enormous amount of
memory
The server was doing a bad class typecast causing setting of
wrong value for the maximum number of items in an internal
structure used in equality propagation.
Fixed by not doing the wrong typecast and asserting the type
of the Item where it should be done.
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/select.result | 14 | ||||
-rw-r--r-- | mysql-test/t/select.test | 13 |
2 files changed, 27 insertions, 0 deletions
diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result index 5d07c97149f..ff59eadab0c 100644 --- a/mysql-test/r/select.result +++ b/mysql-test/r/select.result @@ -4442,4 +4442,18 @@ ROW(a,a) <=> ROW((SELECT 1 FROM t1 WHERE 1=2),(SELECT 1 FROM t1)) INTO @var0; ERROR 21000: Subquery returns more than 1 row DROP TABLE t1; +# +# Bug #48458: simple query tries to allocate enormous amount of +# memory +# +CREATE TABLE t1(a INT NOT NULL, b YEAR); +INSERT INTO t1 VALUES (); +Warnings: +Warning 1364 Field 'a' doesn't have a default value +CREATE TABLE t2(c INT); +# Should not err out because of out-of-memory +SELECT 1 FROM t2 JOIN t1 ON 1=1 +WHERE a != '1' AND NOT a >= b OR NOT ROW(b,a )<> ROW(a,a); +1 +DROP TABLE t1,t2; End of 5.0 tests diff --git a/mysql-test/t/select.test b/mysql-test/t/select.test index ceb67215614..a4d3056b66e 100644 --- a/mysql-test/t/select.test +++ b/mysql-test/t/select.test @@ -3783,5 +3783,18 @@ INTO @var0; DROP TABLE t1; +--echo # +--echo # Bug #48458: simple query tries to allocate enormous amount of +--echo # memory +--echo # + +CREATE TABLE t1(a INT NOT NULL, b YEAR); +INSERT INTO t1 VALUES (); +CREATE TABLE t2(c INT); +--echo # Should not err out because of out-of-memory +SELECT 1 FROM t2 JOIN t1 ON 1=1 + WHERE a != '1' AND NOT a >= b OR NOT ROW(b,a )<> ROW(a,a); +DROP TABLE t1,t2; + --echo End of 5.0 tests |