Commit 91ba1345 authored by heikki@hundin.mysql.fi's avatar heikki@hundin.mysql.fi
Browse files

btr0btr.h, btr0btr.c, row0purge.c:

  Backport from 4.0: fix the BLOB hang if the index tree is of height 1
parent 7433ffe8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -116,7 +116,7 @@ btr_page_insert_fits(

/******************************************************************
Gets the root node of a tree and x-latches it. */
static

page_t*
btr_root_get(
/*=========*/
+9 −0
Original line number Diff line number Diff line
@@ -55,6 +55,15 @@ UNIQUE definition on secondary indexes when we decide if we can use the
insert buffer to speed up inserts */
#define BTR_IGNORE_SEC_UNIQUE	2048	

/******************************************************************
Gets the root node of a tree and x-latches it. */

page_t*
btr_root_get(
/*=========*/
				/* out: root page, x-latched */
	dict_tree_t*	tree,	/* in: index tree */
	mtr_t*		mtr);	/* in: mtr */
/******************************************************************
Gets a buffer page and declares its latching order level. */
UNIV_INLINE
+3 −1
Original line number Diff line number Diff line
@@ -429,6 +429,8 @@ row_purge_upd_exist_or_extern(

			mtr_x_lock(dict_tree_get_lock(index->tree), &mtr);

			btr_root_get(index->tree, &mtr);

			/* We assume in purge of externally stored fields
			that the space id of the undo log record is 0! */