List:Commits« Previous MessageNext Message »
From:marko.makela Date:May 4 2010 10:55am
Subject:bzr commit into mysql-5.1-innodb branch (marko.makela:3438)
View as plain text  
#At file:///home/marko/innobase/dev/mysql/5.1-innodb/ based on revid:marko.makela@strippedupe1dsh0ug

 3438 Marko Mäkelä	2010-05-04
      Remove UNIV_BTR_AVOID_COPY. It was broken because btr_attach_half_pages()
      would get the block, new_block in the wrong order.
      Fixing that would have complicated the function even further
      for this marginal case.

    modified:
      storage/innodb_plugin/ChangeLog
      storage/innodb_plugin/btr/btr0btr.c
      storage/innodb_plugin/include/univ.i
=== modified file 'storage/innodb_plugin/ChangeLog'
--- a/storage/innodb_plugin/ChangeLog	2010-05-03 12:28:59 +0000
+++ b/storage/innodb_plugin/ChangeLog	2010-05-04 10:55:46 +0000
@@ -48,12 +48,6 @@
 	Only check the record size at index creation time when
 	innodb_strict_mode is set or when ROW_FORMAT is DYNAMIC or COMPRESSED.
 
-2010-04-20	The InnoDB Team
-
-	* btr/btr0btr.c, include/univ.i:
-	Implement UNIV_BTR_AVOID_COPY, for avoiding writes when a B-tree
-	node is split at the first or last record.
-
 2010-04-15	The InnoDB Team
 
 	* trx/trx0rec.c:

=== modified file 'storage/innodb_plugin/btr/btr0btr.c'
--- a/storage/innodb_plugin/btr/btr0btr.c	2010-05-04 09:31:28 +0000
+++ b/storage/innodb_plugin/btr/btr0btr.c	2010-05-04 10:55:46 +0000
@@ -2046,17 +2046,7 @@ insert_empty:
 	}
 
 	/* 5. Move then the records to the new page */
-	if (direction == FSP_DOWN
-#ifdef UNIV_BTR_AVOID_COPY
-	    && page_rec_is_supremum(move_limit)) {
-		/* Instead of moving all records, make the new page
-		the empty page. */
-
-		left_block = block;
-		right_block = new_block;
-	} else if (direction == FSP_DOWN
-#endif /* UNIV_BTR_AVOID_COPY */
-		   ) {
+	if (direction == FSP_DOWN) {
 		/*		fputs("Split left\n", stderr); */
 
 		if (0
@@ -2099,14 +2089,6 @@ insert_empty:
 		right_block = block;
 
 		lock_update_split_left(right_block, left_block);
-#ifdef UNIV_BTR_AVOID_COPY
-	} else if (!split_rec) {
-		/* Instead of moving all records, make the new page
-		the empty page. */
-
-		left_block = new_block;
-		right_block = block;
-#endif /* UNIV_BTR_AVOID_COPY */
 	} else {
 		/*		fputs("Split right\n", stderr); */
 

=== modified file 'storage/innodb_plugin/include/univ.i'
--- a/storage/innodb_plugin/include/univ.i	2010-04-26 08:35:57 +0000
+++ b/storage/innodb_plugin/include/univ.i	2010-05-04 10:55:46 +0000
@@ -205,10 +205,6 @@ operations (very slow); also UNIV_DEBUG
 						adaptive hash index */
 #define UNIV_SRV_PRINT_LATCH_WAITS		/* enable diagnostic output
 						in sync0sync.c */
-#define UNIV_BTR_AVOID_COPY			/* when splitting B-tree nodes,
-						do not move any records when
-						all the records would
-						be moved */
 #define UNIV_BTR_PRINT				/* enable functions for
 						printing B-trees */
 #define UNIV_ZIP_DEBUG				/* extensive consistency checks

Attachment: [text/bzr-bundle] bzr/marko.makela@oracle.com-20100504105546-4ew7a77e9uhxmhho.bundle
Thread
bzr commit into mysql-5.1-innodb branch (marko.makela:3438) marko.makela4 May