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

    modified:
      storage/innobase/ibuf/ibuf0ibuf.cc
      storage/innobase/row/row0ins.cc
 4261 Norvald H. Ryeng	2012-08-21 [merge]
      Null merge 5.6->trunk.

=== modified file 'storage/innobase/ibuf/ibuf0ibuf.cc'
--- a/storage/innobase/ibuf/ibuf0ibuf.cc	revid:norvald.ryeng@strippedf4w
+++ b/storage/innobase/ibuf/ibuf0ibuf.cc	revid:marko.makela@stripped
@@ -3701,11 +3701,20 @@ fail_exit:
 
 		root = ibuf_tree_root_get(&mtr);
 
-		err = btr_cur_pessimistic_insert(
+		err = btr_cur_optimistic_insert(
 			BTR_NO_LOCKING_FLAG | BTR_NO_UNDO_LOG_FLAG,
 			cursor, &offsets, &offsets_heap,
 			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, &offsets, &offsets_heap,
+				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.cc'
--- a/storage/innobase/row/row0ins.cc	revid:norvald.ryeng@stripped120821080141-8uyvszy1xn7b9f4w
+++ b/storage/innobase/row/row0ins.cc	revid:marko.makela@strippedd6m33czax19yb92
@@ -2334,17 +2334,13 @@ err_exit:
 				goto err_exit;
 			}
 
-			if (flags & BTR_CREATE_FLAG) {
-				err = btr_cur_optimistic_insert(
-					flags, &cursor,
-					&offsets, &offsets_heap,
-					entry, &insert_rec, &big_rec,
-					n_ext, thr, &mtr);
-				if (err == DB_FAIL) {
-					goto pessimistic_insert;
-				}
-			} else {
-pessimistic_insert:
+			err = btr_cur_optimistic_insert(
+				flags, &cursor,
+				&offsets, &offsets_heap,
+				entry, &insert_rec, &big_rec,
+				n_ext, thr, &mtr);
+
+			if (err == DB_FAIL) {
 				err = btr_cur_pessimistic_insert(
 					flags, &cursor,
 					&offsets, &offsets_heap,
@@ -2533,17 +2529,15 @@ row_ins_sec_index_entry_low(
 			if (buf_LRU_buf_pool_running_out()) {
 
 				err = DB_LOCK_TABLE_FULL;
-			} else if (flags & BTR_CREATE_FLAG) {
-				err = btr_cur_optimistic_insert(
-					flags, &cursor,
-					&offsets, &offsets_heap,
-					entry, &insert_rec,
-					&big_rec, 0, thr, &mtr);
-				if (err == DB_FAIL) {
-					goto pessimistic_insert;
-				}
-			} else {
-pessimistic_insert:
+				goto func_exit;
+			}
+
+			err = btr_cur_optimistic_insert(
+				flags, &cursor,
+				&offsets, &offsets_heap,
+				entry, &insert_rec,
+				&big_rec, 0, thr, &mtr);
+			if (err == DB_FAIL) {
 				err = btr_cur_pessimistic_insert(
 					flags, &cursor,
 					&offsets, &offsets_heap,

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk branch (marko.makela:4261 to 4262) marko.makela21 Aug