List:Commits« Previous MessageNext Message »
From:marko.makela Date:April 20 2011 10:48am
Subject:bzr push into mysql-trunk-innodb branch (marko.makela:3595 to 3596)
View as plain text  
 3596 Marko Mäkelä	2011-04-20
      Non-functional changes.
      
      btr_cur_ins_lock_and_undo(): Remove one level of indentation from the tail.
      
      btr_cur_update_in_place(): Split a line a little better.
      
      row_undo_ins_remove_clust_rec(): Use common func_exit.
      
      row_upd_clust_step(): Return row_upd_clust_rec() directly.

    modified:
      storage/innobase/btr/btr0cur.c
      storage/innobase/row/row0uins.c
      storage/innobase/row/row0upd.c
 3595 Marko Mäkelä	2011-04-20 [merge]
      Merge mysql-5.5-innodb to mysql-trunk-innodb.

    modified:
      storage/innobase/btr/btr0cur.c
=== modified file 'storage/innobase/btr/btr0cur.c'
--- a/storage/innobase/btr/btr0cur.c	revid:marko.makela@oracle.com-20110420083348-79im2vuncn3qd7u0
+++ b/storage/innobase/btr/btr0cur.c	revid:marko.makela@stripped20104727-utvkhnq24qze1udr
@@ -1105,29 +1105,27 @@ btr_cur_ins_lock_and_undo(
 					     btr_cur_get_block(cursor),
 					     index, thr, mtr, inherit);
 
-	if (err != DB_SUCCESS) {
+	if (err != DB_SUCCESS
+	    || !dict_index_is_clust(index) || dict_index_is_ibuf(index)) {
 
 		return(err);
 	}
 
-	if (dict_index_is_clust(index) && !dict_index_is_ibuf(index)) {
-
-		err = trx_undo_report_row_operation(flags, TRX_UNDO_INSERT_OP,
-						    thr, index, entry,
-						    NULL, 0, NULL,
-						    &roll_ptr);
-		if (err != DB_SUCCESS) {
+	err = trx_undo_report_row_operation(flags, TRX_UNDO_INSERT_OP,
+					    thr, index, entry,
+					    NULL, 0, NULL,
+					    &roll_ptr);
+	if (err != DB_SUCCESS) {
 
-			return(err);
-		}
+		return(err);
+	}
 
-		/* Now we can fill in the roll ptr field in entry */
+	/* Now we can fill in the roll ptr field in entry */
 
-		if (!(flags & BTR_KEEP_SYS_FLAG)) {
+	if (!(flags & BTR_KEEP_SYS_FLAG)) {
 
-			row_upd_index_entry_sys_field(entry, index,
-						      DATA_ROLL_PTR, roll_ptr);
-		}
+		row_upd_index_entry_sys_field(entry, index,
+					      DATA_ROLL_PTR, roll_ptr);
 	}
 
 	return(DB_SUCCESS);
@@ -1920,8 +1918,8 @@ btr_cur_update_in_place(
 				    trx, roll_ptr, mtr);
 
 	if (was_delete_marked
-	    && !rec_get_deleted_flag(rec, page_is_comp(
-					     buf_block_get_frame(block)))) {
+	    && !rec_get_deleted_flag(
+		    rec, page_is_comp(buf_block_get_frame(block)))) {
 		/* The new updated record owns its possible externally
 		stored fields */
 

=== modified file 'storage/innobase/row/row0uins.c'
--- a/storage/innobase/row/row0uins.c	revid:marko.makela@stripped9im2vuncn3qd7u0
+++ b/storage/innobase/row/row0uins.c	revid:marko.makela@strippedr
@@ -97,15 +97,12 @@ row_undo_ins_remove_clust_rec(
 
 	btr_cur = btr_pcur_get_btr_cur(&(node->pcur));
 
-	success = btr_cur_optimistic_delete(btr_cur, &mtr);
-
-	btr_pcur_commit_specify_mtr(&(node->pcur), &mtr);
-
-	if (success) {
-		trx_undo_rec_release(node->trx, node->undo_no);
-
-		return(DB_SUCCESS);
+	if (btr_cur_optimistic_delete(btr_cur, &mtr)) {
+		err = DB_SUCCESS;
+		goto func_exit;
 	}
+
+	btr_pcur_commit_specify_mtr(&node->pcur, &mtr);
 retry:
 	/* If did not succeed, try pessimistic descent to tree */
 	mtr_start(&mtr);
@@ -135,8 +132,8 @@ retry:
 		goto retry;
 	}
 
-	btr_pcur_commit_specify_mtr(&(node->pcur), &mtr);
-
+func_exit:
+	btr_pcur_commit_specify_mtr(&node->pcur, &mtr);
 	trx_undo_rec_release(node->trx, node->undo_no);
 
 	return(err);

=== modified file 'storage/innobase/row/row0upd.c'
--- a/storage/innobase/row/row0upd.c	revid:marko.makela@strippedvuncn3qd7u0
+++ b/storage/innobase/row/row0upd.c	revid:marko.makela@stripped
@@ -2205,8 +2205,7 @@ exit_func:
 
 	if (node->cmpl_info & UPD_NODE_NO_ORD_CHANGE) {
 
-		err = row_upd_clust_rec(node, index, thr, mtr);
-		return(err);
+		return(row_upd_clust_rec(node, index, thr, mtr));
 	}
 
 	row_upd_store_row(node);

Attachment: [text/bzr-bundle] bzr/marko.makela@oracle.com-20110420104727-utvkhnq24qze1udr.bundle
Thread
bzr push into mysql-trunk-innodb branch (marko.makela:3595 to 3596) marko.makela20 Apr