summaryrefslogtreecommitdiff
path: root/myisammrg
diff options
context:
space:
mode:
authorserg@serg.mylan <>2004-06-25 15:12:13 +0200
committerserg@serg.mylan <>2004-06-25 15:12:13 +0200
commit3b59dd1bd0e064dc40127e58c46af4c62f4a1b7b (patch)
treeab0efb23a703bc511f61c4ac63c0c4da1e8ce346 /myisammrg
parent02f411124d8bc9306074b8b64912de2e3d3c6b6a (diff)
downloadmariadb-git-3b59dd1bd0e064dc40127e58c46af4c62f4a1b7b.tar.gz
bug#4008 - merge table cannot determine what key caused "dupl. key" error
Diffstat (limited to 'myisammrg')
-rw-r--r--myisammrg/myrg_write.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/myisammrg/myrg_write.c b/myisammrg/myrg_write.c
index 0f191edc23c..532709e361d 100644
--- a/myisammrg/myrg_write.c
+++ b/myisammrg/myrg_write.c
@@ -22,9 +22,9 @@ int myrg_write(register MYRG_INFO *info, byte *rec)
{
/* [phi] MERGE_WRITE_DISABLED is handled by the else case */
if (info->merge_insert_method == MERGE_INSERT_TO_FIRST)
- return mi_write(info->open_tables[0].table,rec);
+ return mi_write((info->current_table=info->open_tables)->table,rec);
else if (info->merge_insert_method == MERGE_INSERT_TO_LAST)
- return mi_write(info->end_table[-1].table,rec);
+ return mi_write((info->current_table=info->end_table-1)->table,rec);
else /* unsupported insertion method */
return (my_errno= HA_ERR_WRONG_COMMAND);
}