summaryrefslogtreecommitdiff
path: root/mysql-test/t/index_merge_myisam.test
diff options
context:
space:
mode:
authorSergey Petrunya <psergey@askmonty.org>2011-09-03 17:05:05 +0400
committerSergey Petrunya <psergey@askmonty.org>2011-09-03 17:05:05 +0400
commit5be4148e587ba651e5e1ba807b830216484012f7 (patch)
treee4c074c3b23c401ea0d23a8162237ef738e11149 /mysql-test/t/index_merge_myisam.test
parent28a70509123888f3bce4f754124acc7963dca8b4 (diff)
downloadmariadb-git-5be4148e587ba651e5e1ba807b830216484012f7.tar.gz
BUG#834514: Assertion `!table || (!table->read_set || bitmap_is_set(...' with aggregates
- Make find_all_keys() not to rely on table->tmp_set remaining constant during execution quick_index_merge_select->reset() may change it.
Diffstat (limited to 'mysql-test/t/index_merge_myisam.test')
-rw-r--r--mysql-test/t/index_merge_myisam.test24
1 files changed, 24 insertions, 0 deletions
diff --git a/mysql-test/t/index_merge_myisam.test b/mysql-test/t/index_merge_myisam.test
index 5431c6dba2b..614c6595d61 100644
--- a/mysql-test/t/index_merge_myisam.test
+++ b/mysql-test/t/index_merge_myisam.test
@@ -125,5 +125,29 @@ set optimizer_switch=default;
drop table t0, t1;
+
+--echo #
+--echo # BUG#834514 Assertion `!table || (!table->read_set || bitmap_is_set(...' with aggregates
+--echo #
+CREATE TABLE t1 ( a int , b int, c int, KEY (b), PRIMARY KEY (a)) ;
+INSERT INTO t1 VALUES (1,4,0),(5,0,0),(6,7,0),(7,7,0),(8,1,0),(9,7,0),(10,1,0);
+
+CREATE TABLE t2 ( b int, c int, KEY (c,b)) ;
+INSERT INTO t2 VALUES (7,0),(1,0),(7,0),(1,0);
+
+CREATE TABLE t3 ( a int ) ;
+
+SELECT COUNT(DISTINCT t2.b), CONCAT(t1.c)
+FROM t1, t2
+WHERE (t2.c = t1.c)
+AND (
+ t1.b IN ( 4 )
+ OR t1.a = 137
+ AND EXISTS ( SELECT a FROM t3 )
+)
+GROUP BY 2;
+
+DROP TABLE t1,t2,t3;
+
set optimizer_switch= @optimizer_switch_save;