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

  Backport from 4.0: fix the BLOB hang if the index tree is of height 1
parent 7433ffe8
...@@ -116,7 +116,7 @@ btr_page_insert_fits( ...@@ -116,7 +116,7 @@ btr_page_insert_fits(
/****************************************************************** /******************************************************************
Gets the root node of a tree and x-latches it. */ Gets the root node of a tree and x-latches it. */
static
page_t* page_t*
btr_root_get( btr_root_get(
/*=========*/ /*=========*/
......
...@@ -55,6 +55,15 @@ UNIQUE definition on secondary indexes when we decide if we can use the ...@@ -55,6 +55,15 @@ UNIQUE definition on secondary indexes when we decide if we can use the
insert buffer to speed up inserts */ insert buffer to speed up inserts */
#define BTR_IGNORE_SEC_UNIQUE 2048 #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. */ Gets a buffer page and declares its latching order level. */
UNIV_INLINE UNIV_INLINE
......
...@@ -428,7 +428,9 @@ skip_secondaries: ...@@ -428,7 +428,9 @@ skip_secondaries:
index = dict_table_get_first_index(node->table); index = dict_table_get_first_index(node->table);
mtr_x_lock(dict_tree_get_lock(index->tree), &mtr); mtr_x_lock(dict_tree_get_lock(index->tree), &mtr);
btr_root_get(index->tree, &mtr);
/* We assume in purge of externally stored fields /* We assume in purge of externally stored fields
that the space id of the undo log record is 0! */ that the space id of the undo log record is 0! */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment