List:Commits« Previous MessageNext Message »
From:Joerg Bruehe Date:August 15 2011 7:15pm
Subject:bzr push into mysql-5.1 branch (joerg.bruehe:3584 to 3585) Bug#47337
View as plain text  
 3585 Joerg Bruehe	2011-08-15 [merge]
      Merge bug#47337 for pushing into 5.1

    modified:
      configure.in
 3584 Marko Mäkelä	2011-08-15
      Bug #11766591 59733: Possible deadlock when buffered changes are to be
      discarded in buf_page_create()
      
      This bug turned out to be a false alarm, a bug in the UNIV_SYNC_DEBUG
      diagnostic code. Because of this, the patch was not backported to the
      built-in InnoDB in MySQL 5.1. Furthermore, there is no test case for
      InnoDB Plugin in MySQL 5.1, because the delete buffering in MySQL 5.5
      makes triggering the failure much easier.
      
      When a freed page for which there exist orphaned buffered changes is
      allocated and reused for something else, buf_page_create() will discard
      the buffered changes by invoking ibuf_merge_or_delete_for_page().
      This would violate the InnoDB latching order.
      
      Tweak the latching order as follows. Move SYNC_IBUF_MUTEX below
      SYNC_FSP_PAGE, where it logically belongs, and assign new latching
      levels for the ibuf->index->lock and the insert buffer B-tree pages:
      
      #define SYNC_IBUF_MUTEX		370	/* ibuf_mutex */
      #define SYNC_IBUF_INDEX_TREE	360
      #define SYNC_IBUF_TREE_NODE_NEW	359
      #define SYNC_IBUF_TREE_NODE	358
      
      btr_block_get(), btr_page_get(): In UNIV_SYNC_DEBUG, add the parameter
      "index" for determining the appropriate latching order
      (SYNC_IBUF_TREE_NODE or SYNC_TREE_NODE).
      
      btr_page_alloc_for_ibuf(), btr_create(): Use SYNC_IBUF_TREE_NODE_NEW
      instead of SYNC_TREE_NODE_NEW for insert buffer pages.
      
      btr_cur_search_to_nth_level(), btr_pcur_restore_position_func(): Use
      SYNC_IBUF_TREE_NODE instead of SYNC_TREE_NODE for insert buffer pages.
      
      btr_search_guess_on_hash(): Assert that the index is not an insert buffer tree.
      
      dict_index_add_to_cache(): Use SYNC_IBUF_INDEX_TREE for the insert
      buffer tree (ibuf->index->lock).
      
      ibuf0ibuf.c: Use SYNC_IBUF_TREE_NODE or SYNC_IBUF_TREE_NODE_NEW for
      all B-tree pages.
      
      ibuf_merge_or_delete_for_page(): Assert that the user page is
      BUF_IO_READ fixed. Only in this way it is OK to latch it as
      SYNC_IBUF_TREE_NODE instead of the proper SYNC_TREE_NODE (which would
      violate the changed latching order).
      
      sync_thread_add_level(): Remove the special tweak for
      SYNC_IBUF_MUTEX. Add rules for the added latching levels.
      
      rb:591 approved by Jimmy Yang

    modified:
      storage/innodb_plugin/ChangeLog
      storage/innodb_plugin/btr/btr0btr.c
      storage/innodb_plugin/btr/btr0cur.c
      storage/innodb_plugin/btr/btr0pcur.c
      storage/innodb_plugin/btr/btr0sea.c
      storage/innodb_plugin/dict/dict0crea.c
      storage/innodb_plugin/dict/dict0dict.c
      storage/innodb_plugin/ibuf/ibuf0ibuf.c
      storage/innodb_plugin/include/btr0btr.h
      storage/innodb_plugin/include/btr0btr.ic
      storage/innodb_plugin/include/sync0sync.h
      storage/innodb_plugin/sync/sync0sync.c
=== modified file 'configure.in'
--- a/configure.in	2011-08-12 11:20:17 +0000
+++ b/configure.in	2011-08-15 18:41:17 +0000
@@ -2711,7 +2711,7 @@ then
     MAN_DROP="$MAN_DROP embedded"
     grep -v 'embedded' $MANLISTFIL > $TMPLISTFIL ; mv -f $TMPLISTFIL $MANLISTFIL
   fi
-  if test X"$with_plugin_innobase" != Xyes
+  if test X"$with_plugin_innobase" != Xyes -a X"$with_plugin_innodb_plugin" != Xyes
   then
     MAN_DROP="$MAN_DROP innodb"
     grep -v 'inno' $MANLISTFIL > $TMPLISTFIL ; mv -f $TMPLISTFIL $MANLISTFIL
@@ -2790,7 +2790,7 @@ then
 fi
 
 # "innochecksum" is not in the "innobase/" subdirectory, but should be switched
-AM_CONDITIONAL([BUILD_INNODB_TOOLS], [test X"$with_plugin_innobase" = Xyes])
+AM_CONDITIONAL([BUILD_INNODB_TOOLS], [test X"$with_plugin_innobase" = Xyes -o X"$with_plugin_innodb_plugin" = Xyes ])
 
 # IMPORTANT - do not modify LIBS past this line - this hack is the only way
 # I know to add the static NSS magic if we have static NSS libraries with

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.1 branch (joerg.bruehe:3584 to 3585) Bug#47337Joerg Bruehe16 Aug