summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorAlexander Nozdrin <alik@sun.com>2010-05-31 17:38:02 +0400
committerAlexander Nozdrin <alik@sun.com>2010-05-31 17:38:02 +0400
commit893dced429b1d817564dd9601783f724de92ba54 (patch)
tree0494578cd65f7d09dc2188fdf69ffb9237e9ea7a /mysql-test
parent3ca98f76695772bf8e55cac20e1d197a7b6e3615 (diff)
downloadmariadb-git-893dced429b1d817564dd9601783f724de92ba54.tar.gz
Backport of
- revid:sp1r-svoj@mysql.com/june.mysql.com-20080324111246-00461 - revid:sp1r-svoj@mysql.com/june.mysql.com-20080414125521-40866 BUG#35274 - merge table doesn't need any base tables, gives error 124 when key accessed SELECT queries that use index against a merge table with empty underlying tables list may return with error "Got error 124 from storage engine". The problem was that wrong error being returned.
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/merge.result7
-rw-r--r--mysql-test/t/merge.test9
2 files changed, 14 insertions, 2 deletions
diff --git a/mysql-test/r/merge.result b/mysql-test/r/merge.result
index ff9b1a84dbc..e46d8e75ab1 100644
--- a/mysql-test/r/merge.result
+++ b/mysql-test/r/merge.result
@@ -277,7 +277,7 @@ t3 CREATE TABLE `t3` (
drop table t3,t2,t1;
create table t1 (a int not null, key(a)) engine=merge;
select * from t1;
-ERROR HY000: Got error 124 from storage engine
+a
drop table t1;
create table t1 (a int not null, b int not null, key(a,b));
create table t2 (a int not null, b int not null, key(a,b));
@@ -988,6 +988,11 @@ m1 CREATE TABLE `m1` (
`a` int(11) DEFAULT NULL
) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1, m1;
+CREATE TABLE t1(a INT, KEY(a)) ENGINE=merge;
+SELECT MAX(a) FROM t1;
+MAX(a)
+NULL
+DROP TABLE t1;
CREATE TABLE t1(a INT);
CREATE TABLE t2(a VARCHAR(10));
CREATE TABLE m1(a INT) ENGINE=MERGE UNION=(t1, t2);
diff --git a/mysql-test/t/merge.test b/mysql-test/t/merge.test
index ab901185e43..a9d98da0403 100644
--- a/mysql-test/t/merge.test
+++ b/mysql-test/t/merge.test
@@ -126,7 +126,6 @@ drop table t3,t2,t1;
# Test table without unions
#
create table t1 (a int not null, key(a)) engine=merge;
---error 1030
select * from t1;
drop table t1;
@@ -616,6 +615,14 @@ SHOW CREATE TABLE m1;
DROP TABLE t1, m1;
#
+# BUG#35274 - merge table doesn't need any base tables, gives error 124 when
+# key accessed
+#
+CREATE TABLE t1(a INT, KEY(a)) ENGINE=merge;
+SELECT MAX(a) FROM t1;
+DROP TABLE t1;
+
+#
# BUG#32047 - 'Spurious' errors while opening MERGE tables
#
CREATE TABLE t1(a INT);