diff options
author | Sergey Petrunya <psergey@askmonty.org> | 2014-03-13 12:20:57 +0100 |
---|---|---|
committer | Sergey Petrunya <psergey@askmonty.org> | 2014-03-13 12:20:57 +0100 |
commit | 8c04dd33dd7ab1c261bd15ace2009832af7a2f98 (patch) | |
tree | e896c2bae6e6cca37b0b7f31c836c71b19b7d187 /mysql-test/t/subselect_sj_mat.test | |
parent | fad4b3337662e8911efa206cf4cde5adc3515397 (diff) | |
download | mariadb-git-8c04dd33dd7ab1c261bd15ace2009832af7a2f98.tar.gz |
MDEV-5811: Server crashes in best_access_path with materialization+semijoin and big_tables=ON
- With big_tables=ON, materialized table will use Aria (or MyISAM) SE, which
allows prefix key reads. However, the temp.table has rec_per_key=NULL which
causes the optimizer to crash when attempting to read index statistics for a
prefix index read.
- Fixed by providing a rec_per_key array with zeros (i.e. "no statistics data")
Diffstat (limited to 'mysql-test/t/subselect_sj_mat.test')
-rw-r--r-- | mysql-test/t/subselect_sj_mat.test | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/mysql-test/t/subselect_sj_mat.test b/mysql-test/t/subselect_sj_mat.test index bf5360dd4a7..5e7103aa6e9 100644 --- a/mysql-test/t/subselect_sj_mat.test +++ b/mysql-test/t/subselect_sj_mat.test @@ -1726,4 +1726,22 @@ EXECUTE stmt; DROP TABLE t1, t2; DROP VIEW v2; +--echo # +--echo # MDEV-5811: Server crashes in best_access_path with materialization+semijoin and big_tables=ON +--echo # +SET @tmp_mdev5811= @@big_tables; +SET big_tables = ON; + +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1),(2); + +CREATE TABLE t2 (b INT); +INSERT INTO t2 VALUES (3),(4); + +SELECT * FROM t1 AS t1_1, t1 AS t1_2 + WHERE ( t1_1.a, t1_2.a ) IN ( SELECT MAX(b), MIN(b) FROM t2 ); + +DROP TABLE t1,t2; +SET big_tables=@tmp_mdev5811; + --echo # End of 5.3 tests |