summaryrefslogtreecommitdiff
path: root/myisammrg
diff options
context:
space:
mode:
authorunknown <svoj@mysql.com/april.(none)>2006-09-20 01:40:59 +0500
committerunknown <svoj@mysql.com/april.(none)>2006-09-20 01:40:59 +0500
commit23fefc88010a0f1bbb1ac45bf41224b21fbb19c1 (patch)
treedd33b5bc922fdbbd7b0aba0317f1fa251a8787e2 /myisammrg
parent186573b3d6301532b5d5fa9b470335e19f49769c (diff)
downloadmariadb-git-23fefc88010a0f1bbb1ac45bf41224b21fbb19c1.tar.gz
BUG#10974 - No error message if merge table based on union of innodb, memory
Fixed confusing error message from the storage engine when it fails to open underlying table. The error message is issued when a table is _opened_ (not when it is created). myisammrg/myrg_open.c: Set my_errno to HA_ERR_WRONG_MRG_TABLE_DEF if attempt to open underlying table failed. mysql-test/r/merge.result: A test case for bug#10974. mysql-test/r/repair.result: Fixed a test case according to patch for bug#10974. mysql-test/t/merge.test: A test case for bug#10974. sql/share/english/errmsg.txt: Better error message if we fail to open underlying table. sql/table.cc: Report error from handler with print_error instead of frm_error. This fixes confusing error message from the handler. Actually this is backported from 5.0.
Diffstat (limited to 'myisammrg')
-rw-r--r--myisammrg/myrg_open.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/myisammrg/myrg_open.c b/myisammrg/myrg_open.c
index f9cdc2bb205..124d37904a6 100644
--- a/myisammrg/myrg_open.c
+++ b/myisammrg/myrg_open.c
@@ -89,7 +89,10 @@ MYRG_INFO *myrg_open(const char *name, int mode, int handle_locking)
else
fn_format(buff, buff, "", "", 0);
if (!(isam=mi_open(buff,mode,(handle_locking?HA_OPEN_WAIT_IF_LOCKED:0))))
+ {
+ my_errno= HA_ERR_WRONG_MRG_TABLE_DEF;
goto err;
+ }
if (!m_info) /* First file */
{
key_parts=isam->s->base.key_parts;