summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <heikki@hundin.mysql.fi>2003-01-16 01:21:13 +0200
committerunknown <heikki@hundin.mysql.fi>2003-01-16 01:21:13 +0200
commitcb460d38ccbc97c8c4fde22fdb7c4b5333cad8bb (patch)
treeac0ac9a8720c0c54ccdec96f61d8931f67cc9e0f
parentb96140fe3a430ea4cb330ef915c35357ccc1efe9 (diff)
downloadmariadb-git-cb460d38ccbc97c8c4fde22fdb7c4b5333cad8bb.tar.gz
btr0btr.h, btr0btr.c, row0purge.c:
Backport from 4.0: fix the BLOB hang if the index tree is of height 1 innobase/row/row0purge.c: Backport from 4.0: fix the BLOB hang if the index tree is of height 1 innobase/btr/btr0btr.c: Backport from 4.0: fix the BLOB hang if the index tree is of height 1 innobase/include/btr0btr.h: Backport from 4.0: fix the BLOB hang if the index tree is of height 1
-rw-r--r--innobase/btr/btr0btr.c2
-rw-r--r--innobase/include/btr0btr.h9
-rw-r--r--innobase/row/row0purge.c4
3 files changed, 13 insertions, 2 deletions
diff --git a/innobase/btr/btr0btr.c b/innobase/btr/btr0btr.c
index 15642e6ccbc..32750201c8e 100644
--- a/innobase/btr/btr0btr.c
+++ b/innobase/btr/btr0btr.c
@@ -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(
/*=========*/
diff --git a/innobase/include/btr0btr.h b/innobase/include/btr0btr.h
index f66ad3639d4..7e9d4b73d90 100644
--- a/innobase/include/btr0btr.h
+++ b/innobase/include/btr0btr.h
@@ -56,6 +56,15 @@ 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
page_t*
diff --git a/innobase/row/row0purge.c b/innobase/row/row0purge.c
index 5da98943926..d24b296ec50 100644
--- a/innobase/row/row0purge.c
+++ b/innobase/row/row0purge.c
@@ -428,7 +428,9 @@ skip_secondaries:
index = dict_table_get_first_index(node->table);
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! */