manual.texi website address change

row0sel.c	CHECK TABLE now also for InnoDB, a join speed optimization
trx0trx.c	CHECK TABLE now also for InnoDB, a join speed optimization
rem0cmp.c	CHECK TABLE now also for InnoDB, a join speed optimization
row0mysql.c	CHECK TABLE now also for InnoDB, a join speed optimization
page0page.c	CHECK TABLE now also for InnoDB, a join speed optimization
row0mysql.h	CHECK TABLE now also for InnoDB, a join speed optimization
trx0trx.h	CHECK TABLE now also for InnoDB, a join speed optimization
btr0btr.h	CHECK TABLE now also for InnoDB, a join speed optimization
btr0cur.h	CHECK TABLE now also for InnoDB, a join speed optimization
btr0pcur.h	CHECK TABLE now also for InnoDB, a join speed optimization
btr0pcur.ic	CHECK TABLE now also for InnoDB, a join speed optimization
btr0btr.c	CHECK TABLE now also for InnoDB, a join speed optimization
btr0cur.c	CHECK TABLE now also for InnoDB, a join speed optimization
btr0sea.c	CHECK TABLE now also for InnoDB, a join speed optimization
innodb.result	CHECK TABLE now also for InnoDB, a join speed optimization
ha_innobase.cc	CHECK TABLE now also for InnoDB, a join speed optimization
ha_innobase.h	CHECK TABLE now also for InnoDB, a join speed optimization


sql/ha_innobase.cc:
  CHECK TABLE now also for InnoDB, a join speed optimization
sql/ha_innobase.h:
  CHECK TABLE now also for InnoDB, a join speed optimization
mysql-test/r/innodb.result:
  CHECK TABLE now also for InnoDB, a join speed optimization
innobase/btr/btr0btr.c:
  CHECK TABLE now also for InnoDB, a join speed optimization
innobase/btr/btr0cur.c:
  CHECK TABLE now also for InnoDB, a join speed optimization
innobase/btr/btr0sea.c:
  CHECK TABLE now also for InnoDB, a join speed optimization
innobase/include/btr0btr.h:
  CHECK TABLE now also for InnoDB, a join speed optimization
innobase/include/btr0cur.h:
  CHECK TABLE now also for InnoDB, a join speed optimization
innobase/include/btr0pcur.h:
  CHECK TABLE now also for InnoDB, a join speed optimization
innobase/include/btr0pcur.ic:
  CHECK TABLE now also for InnoDB, a join speed optimization
innobase/include/row0mysql.h:
  CHECK TABLE now also for InnoDB, a join speed optimization
innobase/include/trx0trx.h:
  CHECK TABLE now also for InnoDB, a join speed optimization
innobase/page/page0page.c:
  CHECK TABLE now also for InnoDB, a join speed optimization
innobase/rem/rem0cmp.c:
  CHECK TABLE now also for InnoDB, a join speed optimization
innobase/row/row0mysql.c:
  CHECK TABLE now also for InnoDB, a join speed optimization
innobase/row/row0sel.c:
  CHECK TABLE now also for InnoDB, a join speed optimization
innobase/trx/trx0trx.c:
  CHECK TABLE now also for InnoDB, a join speed optimization
Docs/manual.texi:
  website address change
This commit is contained in:
unknown 2001-06-03 22:58:03 +03:00
commit 9d4272bbac
18 changed files with 639 additions and 55 deletions

View file

@ -2238,12 +2238,93 @@ btr_check_node_ptr(
return(TRUE);
}
/****************************************************************
Checks the size and number of fields in a record based on the definition of
the index. */
static
ibool
btr_index_rec_validate(
/*====================*/
/* out: TRUE if ok */
rec_t* rec, /* in: index record */
dict_index_t* index) /* in: index */
{
dtype_t* type;
byte* data;
ulint len;
ulint n;
ulint i;
n = dict_index_get_n_fields(index);
if (rec_get_n_fields(rec) != n) {
fprintf(stderr, "Record has %lu fields, should have %lu\n",
rec_get_n_fields(rec), n);
return(FALSE);
}
for (i = 0; i < n; i++) {
data = rec_get_nth_field(rec, i, &len);
type = dict_index_get_nth_type(index, i);
if (len != UNIV_SQL_NULL && dtype_is_fixed_size(type)
&& len != dtype_get_fixed_size(type)) {
fprintf(stderr,
"Record field %lu len is %lu, should be %lu\n",
i, len, dtype_get_fixed_size(type));
return(FALSE);
}
}
return(TRUE);
}
/****************************************************************
Checks the size and number of fields in records based on the definition of
the index. */
static
ibool
btr_index_page_validate(
/*====================*/
/* out: TRUE if ok */
page_t* page, /* in: index page */
dict_index_t* index) /* in: index */
{
rec_t* rec;
page_cur_t cur;
ibool ret = TRUE;
page_cur_set_before_first(page, &cur);
page_cur_move_to_next(&cur);
for (;;) {
rec = (&cur)->rec;
if (page_cur_is_after_last(&cur)) {
break;
}
if (!btr_index_rec_validate(rec, index)) {
ret = FALSE;
}
page_cur_move_to_next(&cur);
}
return(ret);
}
/****************************************************************
Validates index tree level. */
static
void
ibool
btr_validate_level(
/*===============*/
/* out: TRUE if ok */
dict_tree_t* tree, /* in: index tree */
ulint level) /* in: level number */
{
@ -2260,7 +2341,9 @@ btr_validate_level(
page_cur_t cursor;
mem_heap_t* heap;
dtuple_t* node_ptr_tuple;
ibool ret = TRUE;
dict_index_t* index;
mtr_start(&mtr);
page = btr_root_get(tree, &mtr);
@ -2278,13 +2361,31 @@ btr_validate_level(
page = btr_node_ptr_get_child(node_ptr, &mtr);
}
index = UT_LIST_GET_FIRST(tree->tree_indexes);
/* Now we are on the desired level */
loop:
mtr_x_lock(dict_tree_get_lock(tree), &mtr);
/* Check ordering of records */
page_validate(page, UT_LIST_GET_FIRST(tree->tree_indexes));
/* Check ordering etc. of records */
if (!page_validate(page, index)) {
fprintf(stderr, "Error in page %lu in index %s\n",
buf_frame_get_page_no(page), index->name);
ret = FALSE;
}
if (level == 0) {
if (!btr_index_page_validate(page, index)) {
fprintf(stderr,
"Error in page %lu in index %s\n",
buf_frame_get_page_no(page), index->name);
ret = FALSE;
}
}
ut_a(btr_page_get_level(page, &mtr) == level);
right_page_no = btr_page_get_next(page, &mtr);
@ -2374,14 +2475,17 @@ loop:
goto loop;
}
return(ret);
}
/******************************************************************
Checks the consistency of an index tree. */
void
ibool
btr_validate_tree(
/*==============*/
/* out: TRUE if ok */
dict_tree_t* tree) /* in: tree */
{
mtr_t mtr;
@ -2397,8 +2501,15 @@ btr_validate_tree(
for (i = 0; i <= n; i++) {
btr_validate_level(tree, n - i);
if (!btr_validate_level(tree, n - i)) {
mtr_commit(&mtr);
return(FALSE);
}
}
mtr_commit(&mtr);
return(TRUE);
}

View file

@ -163,9 +163,14 @@ btr_cur_search_to_nth_level(
BTR_INSERT and BTR_ESTIMATE;
cursor->left_page is used to store a pointer
to the left neighbor page, in the cases
BTR_SEARCH_PREV and BTR_MODIFY_PREV */
BTR_SEARCH_PREV and BTR_MODIFY_PREV;
NOTE that if has_search_latch
is != 0, we maybe do not have a latch set
on the cursor page, we assume
the caller uses his search latch
to protect the record! */
btr_cur_t* cursor, /* in/out: tree cursor; the cursor page is
s- or x-latched */
s- or x-latched, but see also above! */
ulint has_search_latch,/* in: info on the latch mode the
caller currently has on btr_search_latch:
RW_S_LATCH, or 0 */

View file

@ -601,7 +601,12 @@ btr_search_guess_on_hash(
btr_search_t* info, /* in: index search info */
dtuple_t* tuple, /* in: logical record */
ulint mode, /* in: PAGE_CUR_L, ... */
ulint latch_mode, /* in: BTR_SEARCH_LEAF, ... */
ulint latch_mode, /* in: BTR_SEARCH_LEAF, ...;
NOTE that only if has_search_latch
is 0, we will have a latch set on
the cursor page, otherwise we assume
the caller uses his search latch
to protect the record! */
btr_cur_t* cursor, /* out: tree cursor */
ulint has_search_latch,/* in: latch mode the caller
currently has on btr_search_latch:
@ -722,7 +727,9 @@ btr_search_guess_on_hash(
}
if (!success) {
btr_leaf_page_release(page, latch_mode, mtr);
if (!has_search_latch) {
btr_leaf_page_release(page, latch_mode, mtr);
}
goto failure;
}