summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSinisa@sinisa.nasamreza.org <>2003-01-17 15:15:27 +0200
committerSinisa@sinisa.nasamreza.org <>2003-01-17 15:15:27 +0200
commit90adbe6f456fd6ba1fde56f87dbbdb4c2d668ac2 (patch)
tree9134d9985401e95abe83a8504d06b1196c46b471
parente01bd0b26bfd72a0fd9ef5668202f3a22f497489 (diff)
parent91ba1345125e6463476ddb9eeedefe7a6220949c (diff)
downloadmariadb-git-90adbe6f456fd6ba1fde56f87dbbdb4c2d668ac2.tar.gz
Merge sinisa@work.mysql.com:/home/bk/mysql
into sinisa.nasamreza.org:/mnt/work/mysql
-rw-r--r--innobase/btr/btr0btr.c2
-rw-r--r--innobase/include/btr0btr.h9
-rw-r--r--innobase/row/row0purge.c4
-rw-r--r--sql/ha_innobase.cc38
4 files changed, 32 insertions, 21 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! */
diff --git a/sql/ha_innobase.cc b/sql/ha_innobase.cc
index c5b529a3881..19ec6a9bb06 100644
--- a/sql/ha_innobase.cc
+++ b/sql/ha_innobase.cc
@@ -977,14 +977,14 @@ ha_innobase::open(
norm_name, NULL);
if (NULL == ib_table) {
- sql_print_error("InnoDB error:\n\
-Cannot find table %s from the internal data dictionary\n\
-of InnoDB though the .frm file for the table exists. Maybe you\n\
-have deleted and recreated InnoDB data files but have forgotten\n\
-to delete the corresponding .frm files of InnoDB tables, or you\n\
-have moved .frm files to another database?\n\
-Look from section 15.1 of http://www.innodb.com/ibman.html\n\
-how you can resolve the problem.\n",
+ sql_print_error("InnoDB error:\n"
+"Cannot find table %s from the internal data dictionary\n"
+"of InnoDB though the .frm file for the table exists. Maybe you\n"
+"have deleted and recreated InnoDB data files but have forgotten\n"
+"to delete the corresponding .frm files of InnoDB tables, or you\n"
+"have moved .frm files to another database?\n"
+"Look from section 15.1 of http://www.innodb.com/ibman.html\n"
+"how you can resolve the problem.\n",
norm_name);
free_share(share);
@@ -3062,9 +3062,9 @@ ha_innobase::records_in_range(
DBUG_ENTER("records_in_range");
- /* Warning: since it is not sure that MySQL calls external_lock
- before calling this function, the trx field in prebuilt can be
- obsolete! */
+ update_thd(current_thd);
+
+ trx_search_latch_release_if_reserved(prebuilt->trx);
active_index = keynr;
@@ -3117,12 +3117,12 @@ ha_innobase::estimate_number_of_rows(void)
dict_index_t* index;
ulonglong estimate;
ulonglong data_file_length;
-
- /* Warning: since it is not sure that MySQL calls external_lock
- before calling this function, the trx field in prebuilt can be
- obsolete! */
- DBUG_ENTER("info");
+ DBUG_ENTER("estimate_number_of_rows");
+
+ update_thd(current_thd);
+
+ trx_search_latch_release_if_reserved(prebuilt->trx);
index = dict_table_get_first_index_noninline(prebuilt->table);
@@ -3178,9 +3178,9 @@ ha_innobase::info(
DBUG_ENTER("info");
- /* Warning: since it is not sure that MySQL calls external_lock
- before calling this function, the trx field in prebuilt can be
- obsolete! */
+ update_thd(current_thd);
+
+ trx_search_latch_release_if_reserved(prebuilt->trx);
ib_table = prebuilt->table;