Commit fbf8532b authored by marko's avatar marko

branches/zip: ibuf_delete_rec(): When the cursor to the insert buffer record

cannot be restored, do not complain if the tablespace does not exist.
This fixes Issue #88.
parent 70f1f9e4
......@@ -3112,6 +3112,13 @@ ibuf_delete_rec(
success = btr_pcur_restore_position(BTR_MODIFY_TREE, pcur, mtr);
if (!success) {
if (fil_space_get_flags(space) == ULINT_UNDEFINED) {
/* The tablespace has been dropped. It is possible
that another thread has deleted the insert buffer
entry. Do not complain. */
goto func_exit;
}
fprintf(stderr,
"InnoDB: ERROR: Submit the output to"
" http://bugs.mysql.com\n"
......@@ -3138,11 +3145,7 @@ ibuf_delete_rec(
fprintf(stderr, "InnoDB: ibuf tree ok\n");
fflush(stderr);
btr_pcur_close(pcur);
mutex_exit(&ibuf_mutex);
return(TRUE);
goto func_exit;
}
root = ibuf_tree_root_get(ibuf_data, 0, mtr);
......@@ -3153,8 +3156,6 @@ ibuf_delete_rec(
#ifdef UNIV_IBUF_COUNT_DEBUG
ibuf_count_set(space, page_no, ibuf_count_get(space, page_no) - 1);
#else
UT_NOT_USED(space);
#endif
ibuf_data_sizes_update(ibuf_data, root, mtr);
......@@ -3162,6 +3163,7 @@ ibuf_delete_rec(
btr_pcur_commit_specify_mtr(pcur, mtr);
func_exit:
btr_pcur_close(pcur);
mutex_exit(&ibuf_mutex);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment