diff options
author | Yasufumi Kinoshita <yasufumi.kinoshita@oracle.com> | 2012-11-12 22:31:30 +0900 |
---|---|---|
committer | Yasufumi Kinoshita <yasufumi.kinoshita@oracle.com> | 2012-11-12 22:31:30 +0900 |
commit | 5a7553f36a3eb18ca191607937ce1c67cbfc772d (patch) | |
tree | 8659be22a35671a25b5abb0967532d75005f2bf5 /storage/innobase/include | |
parent | 2ad007dfd658e250c176e19ae5deabc845bf7ae3 (diff) | |
download | mariadb-git-5a7553f36a3eb18ca191607937ce1c67cbfc772d.tar.gz |
Bug #14676111 WRONG PAGE_LEVEL WRITTEN FOR UPPER THAN FATHER PAGE AT BTR_LIFT_PAGE_UP()
btr_lift_page_up() writes wrong page number (different by -1) for upper than father page.
But in almost all of the cases, the father page should be root page, no upper
pages. It is very rare path.
In addition the leaf page should not be lifted unless the father page is root.
Because the branch pages should not become the leaf pages.
rb://1336 approved by Marko Makela.
Diffstat (limited to 'storage/innobase/include')
-rw-r--r-- | storage/innobase/include/btr0cur.h | 5 | ||||
-rw-r--r-- | storage/innobase/include/btr0cur.ic | 13 | ||||
-rw-r--r-- | storage/innobase/include/srv0srv.h | 3 | ||||
-rw-r--r-- | storage/innobase/include/trx0purge.h | 4 |
4 files changed, 25 insertions, 0 deletions
diff --git a/storage/innobase/include/btr0cur.h b/storage/innobase/include/btr0cur.h index 341d628c6dc..c2b81d0ae91 100644 --- a/storage/innobase/include/btr0cur.h +++ b/storage/innobase/include/btr0cur.h @@ -703,6 +703,11 @@ extern ulint btr_cur_n_sea; extern ulint btr_cur_n_non_sea_old; extern ulint btr_cur_n_sea_old; +#ifdef UNIV_DEBUG +/* Flag to limit optimistic insert records */ +extern uint btr_cur_limit_optimistic_insert_debug; +#endif /* UNIV_DEBUG */ + #ifndef UNIV_NONINL #include "btr0cur.ic" #endif diff --git a/storage/innobase/include/btr0cur.ic b/storage/innobase/include/btr0cur.ic index bd2c46eb734..d894f0546d9 100644 --- a/storage/innobase/include/btr0cur.ic +++ b/storage/innobase/include/btr0cur.ic @@ -8,6 +8,16 @@ Created 10/16/1994 Heikki Tuuri #include "btr0btr.h" +#ifdef UNIV_DEBUG +# define LIMIT_OPTIMISTIC_INSERT_DEBUG(NREC, CODE)\ +if (btr_cur_limit_optimistic_insert_debug\ + && (NREC) >= (ulint)btr_cur_limit_optimistic_insert_debug) {\ + CODE;\ +} +#else +# define LIMIT_OPTIMISTIC_INSERT_DEBUG(NREC, CODE) +#endif /* UNIV_DEBUG */ + /************************************************************* Returns the page cursor component of a tree cursor. */ UNIV_INLINE @@ -100,6 +110,9 @@ btr_cur_compress_recommendation( page = btr_cur_get_page(cursor); + LIMIT_OPTIMISTIC_INSERT_DEBUG(page_get_n_recs(page) * 2, + return(FALSE)); + if ((page_get_data_size(page) < BTR_CUR_PAGE_COMPRESS_LIMIT) || ((btr_page_get_next(page, mtr) == FIL_NULL) && (btr_page_get_prev(page, mtr) == FIL_NULL))) { diff --git a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0srv.h index aa6c88e0538..e79d352d1e6 100644 --- a/storage/innobase/include/srv0srv.h +++ b/storage/innobase/include/srv0srv.h @@ -569,6 +569,9 @@ struct export_var_struct{ ulint innodb_rows_inserted; ulint innodb_rows_updated; ulint innodb_rows_deleted; +#ifdef UNIV_DEBUG + ulint innodb_purge_trx_id_age; +#endif /* UNIV_DEBUG */ }; /* The server system struct */ diff --git a/storage/innobase/include/trx0purge.h b/storage/innobase/include/trx0purge.h index fbae7eb9a6d..fc9ff021920 100644 --- a/storage/innobase/include/trx0purge.h +++ b/storage/innobase/include/trx0purge.h @@ -133,6 +133,10 @@ struct trx_purge_struct{ than this */ dulint purge_undo_no; /* Purge has advanced past all records whose undo number is less than this */ +#ifdef UNIV_DEBUG + dulint done_trx_no; /* Indicate 'purge pointer' which have + purged already accurately. */ +#endif /* UNIV_DEBUG */ /*-----------------------------*/ ibool next_stored; /* TRUE if the info of the next record to purge is stored below: if yes, then |