diff options
Diffstat (limited to 'innobase/trx/trx0undo.c')
-rw-r--r-- | innobase/trx/trx0undo.c | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/innobase/trx/trx0undo.c b/innobase/trx/trx0undo.c index de3da382e83..f2b7227d84a 100644 --- a/innobase/trx/trx0undo.c +++ b/innobase/trx/trx0undo.c @@ -387,6 +387,7 @@ trx_undo_seg_create( page_t* undo_page; trx_upagef_t* page_hdr; trx_usegf_t* seg_hdr; + ulint n_reserved; ibool success; ut_ad(mtr && id && rseg_hdr); @@ -413,8 +414,8 @@ trx_undo_seg_create( space = buf_frame_get_space_id(rseg_hdr); - success = fsp_reserve_free_extents(space, 2, FSP_UNDO, mtr); - + success = fsp_reserve_free_extents(&n_reserved, space, 2, FSP_UNDO, + mtr); if (!success) { return(NULL); @@ -424,7 +425,7 @@ trx_undo_seg_create( undo_page = fseg_create_general(space, 0, TRX_UNDO_SEG_HDR + TRX_UNDO_FSEG_HEADER, TRUE, mtr); - fil_space_release_free_extents(space, 2); + fil_space_release_free_extents(space, n_reserved); if (undo_page == NULL) { /* No space left */ @@ -737,6 +738,7 @@ trx_undo_add_page( page_t* new_page; trx_rseg_t* rseg; ulint page_no; + ulint n_reserved; ibool success; #ifdef UNIV_SYNC_DEBUG @@ -754,8 +756,8 @@ trx_undo_add_page( header_page = trx_undo_page_get(undo->space, undo->hdr_page_no, mtr); - success = fsp_reserve_free_extents(undo->space, 1, FSP_UNDO, mtr); - + success = fsp_reserve_free_extents(&n_reserved, undo->space, 1, + FSP_UNDO, mtr); if (!success) { return(FIL_NULL); @@ -766,7 +768,7 @@ trx_undo_add_page( undo->top_page_no + 1, FSP_UP, TRUE, mtr); - fil_space_release_free_extents(undo->space, 1); + fil_space_release_free_extents(undo->space, n_reserved); if (page_no == FIL_NULL) { @@ -1127,7 +1129,7 @@ trx_undo_mem_create_at_db_start( if (id >= TRX_RSEG_N_SLOTS) { fprintf(stderr, - "InnoDB: Error: undo->id is %lu\n", id); + "InnoDB: Error: undo->id is %lu\n", (ulong) id); ut_error; } @@ -1285,7 +1287,7 @@ trx_undo_mem_create( if (id >= TRX_RSEG_N_SLOTS) { fprintf(stderr, - "InnoDB: Error: undo->id is %lu\n", id); + "InnoDB: Error: undo->id is %lu\n", (ulong) id); ut_error; } @@ -1330,7 +1332,8 @@ trx_undo_mem_init_for_reuse( #endif /* UNIV_SYNC_DEBUG */ if (undo->id >= TRX_RSEG_N_SLOTS) { - fprintf(stderr, "InnoDB: Error: undo->id is %lu\n", undo->id); + fprintf(stderr, "InnoDB: Error: undo->id is %lu\n", + (ulong) undo->id); mem_analyze_corruption((byte*)undo); ut_error; @@ -1356,7 +1359,7 @@ trx_undo_mem_free( { if (undo->id >= TRX_RSEG_N_SLOTS) { fprintf(stderr, - "InnoDB: Error: undo->id is %lu\n", undo->id); + "InnoDB: Error: undo->id is %lu\n", (ulong) undo->id); ut_error; } @@ -1466,7 +1469,8 @@ trx_undo_reuse_cached( ut_ad(undo->size == 1); if (undo->id >= TRX_RSEG_N_SLOTS) { - fprintf(stderr, "InnoDB: Error: undo->id is %lu\n", undo->id); + fprintf(stderr, "InnoDB: Error: undo->id is %lu\n", + (ulong) undo->id); mem_analyze_corruption((byte*)undo); ut_error; } @@ -1602,7 +1606,8 @@ trx_undo_set_state_at_finish( ut_ad(trx && undo && mtr); if (undo->id >= TRX_RSEG_N_SLOTS) { - fprintf(stderr, "InnoDB: Error: undo->id is %lu\n", undo->id); + fprintf(stderr, "InnoDB: Error: undo->id is %lu\n", + (ulong) undo->id); mem_analyze_corruption((byte*)undo); ut_error; } |