summaryrefslogtreecommitdiff
path: root/mysql-test/t/merge.test
diff options
context:
space:
mode:
authorSergey Petrunya <psergey@askmonty.org>2013-03-21 11:06:27 +0400
committerSergey Petrunya <psergey@askmonty.org>2013-03-21 11:06:27 +0400
commitfb2501e2d4cf099bfea0cc1ef9d441ad08c3ee68 (patch)
treec3b91a9c787e802b6817fd8d4b5d0b844928a90e /mysql-test/t/merge.test
parent8f607aae127439e132dae00b2750727162f4d564 (diff)
downloadmariadb-git-fb2501e2d4cf099bfea0cc1ef9d441ad08c3ee68.tar.gz
MDEV-4277: Crash inside mi_killed_in_mariadb() with myisammrg
- Set MI_INFO::external_ref for MyISAM tables that are parts of myisamMRG table.
Diffstat (limited to 'mysql-test/t/merge.test')
-rw-r--r--mysql-test/t/merge.test35
1 files changed, 35 insertions, 0 deletions
diff --git a/mysql-test/t/merge.test b/mysql-test/t/merge.test
index eecf892869f..abb7c3c7da2 100644
--- a/mysql-test/t/merge.test
+++ b/mysql-test/t/merge.test
@@ -1865,6 +1865,41 @@ DROP TABLE t1, t2, t3, m1;
--echo End of 5.1 tests
+--echo #
+--echo # MDEV-4277: Crash inside mi_killed_in_mariadb() with myisammrg
+--echo #
+create table t1 (a int);
+insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+
+create table t2 ( i int ) engine=myisam;
+insert into t2 values (1),(2);
+
+create table t3 (a int, b int, filler char(100), key(a), key(b)) engine=myisam;
+create table t4 like t3;
+insert into t3
+ select A.a+10*B.a+100*C.a,
+ A.a+10*B.a+100*C.a,
+ 'filler-data-FILLER-DATA-qqq'
+ from t1 A, t1 B, t1 C where C.a < 5;
+insert into t4
+ select A.a+10*B.a+100*C.a,
+ A.a+10*B.a+100*C.a,
+ 'filler-data-FILLER-DATA-qqq'
+ from t1 A, t1 B, t1 C where C.a >= 5;
+
+create table t5 like t3;
+alter table t5 engine=merge;
+alter table t5 union(t3, t4);
+
+update t5 set b=999, a=999 where b>950;
+
+explain
+select * from t2, t5 where t5.a=999 and t5.b=999;
+select * from t2, t5 where t5.a=999 and t5.b=999;
+
+drop table t5;
+drop table t1,t2,t3,t4;
+
--disable_result_log
--disable_query_log
eval set global storage_engine=$default;