summaryrefslogtreecommitdiff
path: root/innobase/include
diff options
context:
space:
mode:
authorunknown <heikki@hundin.mysql.fi>2002-11-09 18:23:09 +0200
committerunknown <heikki@hundin.mysql.fi>2002-11-09 18:23:09 +0200
commit04ca9bcdec44483007a79bf594d335b4f0cc85ca (patch)
tree224bea8c92fcefb32797d4593a905e657a0ea560 /innobase/include
parent59838a577a88219958ac0e01f9cc7768c32c96d0 (diff)
downloadmariadb-git-04ca9bcdec44483007a79bf594d335b4f0cc85ca.tar.gz
Many files:
Try to skip over corrupt records in SELECT if innodb_force_recovery > 0; print more page hex dumps in CHECK TABLE innobase/include/btr0btr.h: Try to skip over corrupt records in SELECT if innodb_force_recovery > 0; print more page hex dumps in CHECK TABLE innobase/include/btr0pcur.h: Try to skip over corrupt records in SELECT if innodb_force_recovery > 0; print more page hex dumps in CHECK TABLE innobase/include/db0err.h: Try to skip over corrupt records in SELECT if innodb_force_recovery > 0; print more page hex dumps in CHECK TABLE innobase/include/btr0pcur.ic: Try to skip over corrupt records in SELECT if innodb_force_recovery > 0; print more page hex dumps in CHECK TABLE innobase/btr/btr0btr.c: Try to skip over corrupt records in SELECT if innodb_force_recovery > 0; print more page hex dumps in CHECK TABLE innobase/page/page0page.c: Try to skip over corrupt records in SELECT if innodb_force_recovery > 0; print more page hex dumps in CHECK TABLE innobase/row/row0sel.c: Try to skip over corrupt records in SELECT if innodb_force_recovery > 0; print more page hex dumps in CHECK TABLE
Diffstat (limited to 'innobase/include')
-rw-r--r--innobase/include/btr0btr.h13
-rw-r--r--innobase/include/btr0pcur.h8
-rw-r--r--innobase/include/btr0pcur.ic18
-rw-r--r--innobase/include/db0err.h3
4 files changed, 41 insertions, 1 deletions
diff --git a/innobase/include/btr0btr.h b/innobase/include/btr0btr.h
index f66ad3639d4..3cd44ab5175 100644
--- a/innobase/include/btr0btr.h
+++ b/innobase/include/btr0btr.h
@@ -399,6 +399,19 @@ btr_print_tree(
dict_tree_t* tree, /* in: tree */
ulint width); /* in: print this many entries from start
and end */
+/****************************************************************
+Checks the size and number of fields in a record based on the definition of
+the index. */
+
+ibool
+btr_index_rec_validate(
+/*====================*/
+ /* out: TRUE if ok */
+ rec_t* rec, /* in: index record */
+ dict_index_t* index, /* in: index */
+ ibool dump_on_error); /* in: TRUE if the function
+ should print hex dump of record
+ and page on error */
/******************************************************************
Checks the consistency of an index tree. */
diff --git a/innobase/include/btr0pcur.h b/innobase/include/btr0pcur.h
index 05b55e4491d..9d07dd0de18 100644
--- a/innobase/include/btr0pcur.h
+++ b/innobase/include/btr0pcur.h
@@ -298,6 +298,14 @@ btr_pcur_move_to_prev(
function may release the page latch */
mtr_t* mtr); /* in: mtr */
/*************************************************************
+Moves the persistent cursor to the last record on the same page. */
+UNIV_INLINE
+void
+btr_pcur_move_to_last_on_page(
+/*==========================*/
+ btr_pcur_t* cursor, /* in: persistent cursor */
+ mtr_t* mtr); /* in: mtr */
+/*************************************************************
Moves the persistent cursor to the next user record in the tree. If no user
records are left, the cursor ends up 'after last in tree'. */
UNIV_INLINE
diff --git a/innobase/include/btr0pcur.ic b/innobase/include/btr0pcur.ic
index a60140e4aa9..a1db2cc52dd 100644
--- a/innobase/include/btr0pcur.ic
+++ b/innobase/include/btr0pcur.ic
@@ -285,6 +285,24 @@ btr_pcur_move_to_prev_on_page(
}
/*************************************************************
+Moves the persistent cursor to the last record on the same page. */
+UNIV_INLINE
+void
+btr_pcur_move_to_last_on_page(
+/*==========================*/
+ btr_pcur_t* cursor, /* in: persistent cursor */
+ mtr_t* mtr) /* in: mtr */
+{
+ UT_NOT_USED(mtr);
+ ut_ad(cursor->latch_mode != BTR_NO_LATCHES);
+
+ page_cur_set_after_last(buf_frame_align(btr_pcur_get_rec(cursor)),
+ btr_pcur_get_page_cur(cursor));
+
+ cursor->old_stored = BTR_PCUR_OLD_NOT_STORED;
+}
+
+/*************************************************************
Moves the persistent cursor to the next user record in the tree. If no user
records are left, the cursor ends up 'after last in tree'. */
UNIV_INLINE
diff --git a/innobase/include/db0err.h b/innobase/include/db0err.h
index ddfbd5b7862..86b79b65bf2 100644
--- a/innobase/include/db0err.h
+++ b/innobase/include/db0err.h
@@ -41,7 +41,8 @@ Created 5/24/1996 Heikki Tuuri
which is referenced */
#define DB_CANNOT_ADD_CONSTRAINT 38 /* adding a foreign key constraint
to a table failed */
-
+#define DB_CORRUPTION 39 /* data structure corruption noticed */
+
/* The following are partial failure codes */
#define DB_FAIL 1000
#define DB_OVERFLOW 1001