Commit 820840a0 authored by unknown's avatar unknown

Applied innodb-5.0-ss660 snapshot.


innobase/btr/btr0cur.c:
  Applied innodb-5.0-ss660 snapshot.
   btr_cur_search_to_nth_level(): Reacquire btr_search_latch after
   inserting to the insert buffer. This was noticed while analyzing
   Bug#19081 but this shold not fix this bug since according to
   Heikki, btr_search_latch is not reserved during an insert.
innobase/ibuf/ibuf0ibuf.c:
  Applied innodb-5.0-ss660 snapshot.
   ibuf_fixed_addr_page(): Add parameter space. As the insert buffer
   B-tree is only located in the system tablespace (space 0),
   IBUF_TREE_ROOT_PAGE_NO is only special in space 0.
innobase/include/sync0rw.ic:
  Applied innodb-5.0-ss660 snapshot.
   rw_lock_s_unlock_func(): Change a debug assertion to a
   production assertion in order to track down Bug#19081.
parent d8bb59fc
...@@ -439,7 +439,7 @@ btr_cur_search_to_nth_level( ...@@ -439,7 +439,7 @@ btr_cur_search_to_nth_level(
if (UNIV_LIKELY_NULL(heap)) { if (UNIV_LIKELY_NULL(heap)) {
mem_heap_free(heap); mem_heap_free(heap);
} }
return; goto func_exit;
} }
/* Insert to the insert buffer did not succeed: /* Insert to the insert buffer did not succeed:
...@@ -555,6 +555,7 @@ btr_cur_search_to_nth_level( ...@@ -555,6 +555,7 @@ btr_cur_search_to_nth_level(
|| mode != PAGE_CUR_LE); || mode != PAGE_CUR_LE);
} }
func_exit:
if (has_search_latch) { if (has_search_latch) {
rw_lock_s_lock(&btr_search_latch); rw_lock_s_lock(&btr_search_latch);
......
...@@ -950,14 +950,11 @@ ibool ...@@ -950,14 +950,11 @@ ibool
ibuf_fixed_addr_page( ibuf_fixed_addr_page(
/*=================*/ /*=================*/
/* out: TRUE if a fixed address ibuf i/o page */ /* out: TRUE if a fixed address ibuf i/o page */
ulint space, /* in: space id */
ulint page_no)/* in: page number */ ulint page_no)/* in: page number */
{ {
if ((ibuf_bitmap_page(page_no)) return((space == 0 && page_no == IBUF_TREE_ROOT_PAGE_NO)
|| (page_no == IBUF_TREE_ROOT_PAGE_NO)) { || ibuf_bitmap_page(page_no));
return(TRUE);
}
return(FALSE);
} }
/*************************************************************************** /***************************************************************************
...@@ -981,7 +978,7 @@ ibuf_page( ...@@ -981,7 +978,7 @@ ibuf_page(
return(FALSE); return(FALSE);
} }
if (ibuf_fixed_addr_page(page_no)) { if (ibuf_fixed_addr_page(space, page_no)) {
return(TRUE); return(TRUE);
} }
...@@ -1029,7 +1026,7 @@ ibuf_page_low( ...@@ -1029,7 +1026,7 @@ ibuf_page_low(
return(FALSE); return(FALSE);
} }
#endif #endif
if (ibuf_fixed_addr_page(page_no)) { if (ibuf_fixed_addr_page(space, page_no)) {
return(TRUE); return(TRUE);
} }
...@@ -3052,7 +3049,7 @@ ibuf_merge_or_delete_for_page( ...@@ -3052,7 +3049,7 @@ ibuf_merge_or_delete_for_page(
return; return;
} }
#endif #endif
if (ibuf_fixed_addr_page(page_no) || fsp_descr_page(page_no) if (ibuf_fixed_addr_page(space, page_no) || fsp_descr_page(page_no)
|| trx_sys_hdr_page(space, page_no)) { || trx_sys_hdr_page(space, page_no)) {
return; return;
} }
......
...@@ -362,7 +362,7 @@ rw_lock_s_unlock_func( ...@@ -362,7 +362,7 @@ rw_lock_s_unlock_func(
/* Reset the shared lock by decrementing the reader count */ /* Reset the shared lock by decrementing the reader count */
ut_ad(lock->reader_count > 0); ut_a(lock->reader_count > 0);
lock->reader_count--; lock->reader_count--;
#ifdef UNIV_SYNC_DEBUG #ifdef UNIV_SYNC_DEBUG
......
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