Commit c6cc947e authored by marko's avatar marko

branches/zip: btr_cur_pessimistic_insert(): For clarity,

use return(DB_...) instead of assigning err = DB_... when possible.
parent 6a8a9ea8
...@@ -1293,9 +1293,7 @@ btr_cur_pessimistic_insert( ...@@ -1293,9 +1293,7 @@ btr_cur_pessimistic_insert(
success = fsp_reserve_free_extents(&n_reserved, index->space, success = fsp_reserve_free_extents(&n_reserved, index->space,
n_extents, FSP_NORMAL, mtr); n_extents, FSP_NORMAL, mtr);
if (!success) { if (!success) {
err = DB_OUT_OF_FILE_SPACE; return(DB_OUT_OF_FILE_SPACE);
return(err);
} }
} }
...@@ -1386,15 +1384,13 @@ btr_cur_pessimistic_insert( ...@@ -1386,15 +1384,13 @@ btr_cur_pessimistic_insert(
lock_update_insert(btr_cur_get_block(cursor), *rec); lock_update_insert(btr_cur_get_block(cursor), *rec);
} }
err = DB_SUCCESS;
if (n_extents > 0) { if (n_extents > 0) {
fil_space_release_free_extents(index->space, n_reserved); fil_space_release_free_extents(index->space, n_reserved);
} }
*big_rec = big_rec_vec; *big_rec = big_rec_vec;
return(err); return(DB_SUCCESS);
} }
/*==================== B-TREE UPDATE =========================*/ /*==================== B-TREE UPDATE =========================*/
......
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