List:Commits« Previous MessageNext Message »
From:marko.makela Date:August 21 2012 8:23am
Subject:bzr push into mysql-5.5 branch (marko.makela:3945 to 3946)
View as plain text  
 3946 Marko Mäkelä	2012-08-21 [merge]
      Merge mysql-5.1 to mysql-5.5.

    modified:
      storage/innobase/ibuf/ibuf0ibuf.c
      storage/innobase/row/row0ins.c
 3945 Mattias Jonsson	2012-08-20 [merge]
      merge

    modified:
      sql/ha_partition.cc
=== modified file 'storage/innobase/ibuf/ibuf0ibuf.c'
--- a/storage/innobase/ibuf/ibuf0ibuf.c	revid:mattias.jonsson@stripped4440-2dri7wcxvm3469ys
+++ b/storage/innobase/ibuf/ibuf0ibuf.c	revid:marko.makela@strippedp5zl45122
@@ -3604,11 +3604,18 @@ bitmap_fail:
 
 		root = ibuf_tree_root_get(&mtr);
 
-		err = btr_cur_pessimistic_insert(BTR_NO_LOCKING_FLAG
-						 | BTR_NO_UNDO_LOG_FLAG,
-						 cursor,
-						 ibuf_entry, &ins_rec,
-						 &dummy_big_rec, 0, thr, &mtr);
+		err = btr_cur_optimistic_insert(
+			BTR_NO_LOCKING_FLAG | BTR_NO_UNDO_LOG_FLAG,
+			cursor, ibuf_entry, &ins_rec,
+			&dummy_big_rec, 0, thr, &mtr);
+
+		if (err == DB_FAIL) {
+			err = btr_cur_pessimistic_insert(
+				BTR_NO_LOCKING_FLAG | BTR_NO_UNDO_LOG_FLAG,
+				cursor, ibuf_entry, &ins_rec,
+				&dummy_big_rec, 0, thr, &mtr);
+		}
+
 		mutex_exit(&ibuf_pessimistic_insert_mutex);
 		ibuf_size_update(root, &mtr);
 		mutex_exit(&ibuf_mutex);

=== modified file 'storage/innobase/row/row0ins.c'
--- a/storage/innobase/row/row0ins.c	revid:mattias.jonsson@strippedwcxvm3469ys
+++ b/storage/innobase/row/row0ins.c	revid:marko.makela@stripped
@@ -2168,9 +2168,16 @@ row_ins_index_entry_low(
 
 				goto function_exit;
 			}
-			err = btr_cur_pessimistic_insert(
+
+			err = btr_cur_optimistic_insert(
 				0, &cursor, entry, &insert_rec, &big_rec,
 				n_ext, thr, &mtr);
+
+			if (err == DB_FAIL) {
+				err = btr_cur_pessimistic_insert(
+					0, &cursor, entry, &insert_rec,
+					&big_rec, n_ext, thr, &mtr);
+			}
 		}
 	}
 

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.5 branch (marko.makela:3945 to 3946) marko.makela21 Aug