Commit b0c21b2e authored by marko's avatar marko

branches/5.1: Merge revision 2866 from 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. (Bug #27276)

Approved by Sunny Bains (rb://34)
parent 18161a98
......@@ -2992,6 +2992,13 @@ ibuf_delete_rec(
success = btr_pcur_restore_position(BTR_MODIFY_TREE, pcur, mtr);
if (!success) {
if (fil_space_get_version(space) == -1) {
/* 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"
......@@ -3018,11 +3025,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);
......@@ -3033,8 +3036,6 @@ ibuf_delete_rec(
#ifdef UNIV_IBUF_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);
......@@ -3042,6 +3043,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