1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Bug #44886: SIGSEGV in test_if_skip_sort_order() -

uninitialized variable used as subscript

Grouping select from a "constant" InnoDB table (a table
of a single row) joined with other tables caused a crash.
This commit is contained in:
Gleb Shchepa
2009-06-08 01:40:53 +05:00
parent 69e78274ae
commit eecf06873e
3 changed files with 43 additions and 1 deletions

View File

@ -359,4 +359,25 @@ SELECT * FROM t4;
DROP TABLE t1, t2, t3, t4;
--echo #
--echo # Bug#44886: SIGSEGV in test_if_skip_sort_order() -
--echo # uninitialized variable used as subscript
--echo #
CREATE TABLE t1 (a INT, b INT, c INT, d INT, PRIMARY KEY (b), KEY (a,c))
ENGINE=InnoDB;
INSERT INTO t1 VALUES (1,1,1,0);
CREATE TABLE t2 (a INT, b INT, e INT, KEY (e)) ENGINE=InnoDB;
INSERT INTO t2 VALUES (1,1,2);
CREATE TABLE t3 (a INT, b INT) ENGINE=MyISAM;
INSERT INTO t3 VALUES (1, 1);
SELECT * FROM t1, t2, t3
WHERE t1.a = t3.a AND (t1.b = t3.b OR t1.d) AND t2.b = t1.b AND t2.e = 2
GROUP BY t1.b;
DROP TABLE t1, t2, t3;
--echo End of 5.1 tests