Commit 279bbc9d 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 fd5bac67
...@@ -2992,6 +2992,13 @@ ibuf_delete_rec( ...@@ -2992,6 +2992,13 @@ ibuf_delete_rec(
success = btr_pcur_restore_position(BTR_MODIFY_TREE, pcur, mtr); success = btr_pcur_restore_position(BTR_MODIFY_TREE, pcur, mtr);
if (!success) { 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, fprintf(stderr,
"InnoDB: ERROR: Submit the output to" "InnoDB: ERROR: Submit the output to"
" http://bugs.mysql.com\n" " http://bugs.mysql.com\n"
...@@ -3018,11 +3025,7 @@ ibuf_delete_rec( ...@@ -3018,11 +3025,7 @@ ibuf_delete_rec(
fprintf(stderr, "InnoDB: ibuf tree ok\n"); fprintf(stderr, "InnoDB: ibuf tree ok\n");
fflush(stderr); fflush(stderr);
btr_pcur_close(pcur); goto func_exit;
mutex_exit(&ibuf_mutex);
return(TRUE);
} }
root = ibuf_tree_root_get(ibuf_data, 0, mtr); root = ibuf_tree_root_get(ibuf_data, 0, mtr);
...@@ -3033,8 +3036,6 @@ ibuf_delete_rec( ...@@ -3033,8 +3036,6 @@ ibuf_delete_rec(
#ifdef UNIV_IBUF_DEBUG #ifdef UNIV_IBUF_DEBUG
ibuf_count_set(space, page_no, ibuf_count_get(space, page_no) - 1); ibuf_count_set(space, page_no, ibuf_count_get(space, page_no) - 1);
#else
UT_NOT_USED(space);
#endif #endif
ibuf_data_sizes_update(ibuf_data, root, mtr); ibuf_data_sizes_update(ibuf_data, root, mtr);
...@@ -3042,6 +3043,7 @@ ibuf_delete_rec( ...@@ -3042,6 +3043,7 @@ ibuf_delete_rec(
btr_pcur_commit_specify_mtr(pcur, mtr); btr_pcur_commit_specify_mtr(pcur, mtr);
func_exit:
btr_pcur_close(pcur); btr_pcur_close(pcur);
mutex_exit(&ibuf_mutex); 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