diff options
Diffstat (limited to 'storage/innobase/include/page0types.h')
-rw-r--r-- | storage/innobase/include/page0types.h | 65 |
1 files changed, 48 insertions, 17 deletions
diff --git a/storage/innobase/include/page0types.h b/storage/innobase/include/page0types.h index 2892e860875..5dabcf2e67d 100644 --- a/storage/innobase/include/page0types.h +++ b/storage/innobase/include/page0types.h @@ -26,20 +26,18 @@ Created 2/2/1994 Heikki Tuuri #ifndef page0types_h #define page0types_h -using namespace std; - -#include <map> - #include "univ.i" #include "dict0types.h" #include "mtr0types.h" -#include "sync0types.h" -#include "os0thread.h" +#include "ut0new.h" + +#include <map> /** Eliminates a name collision on HP-UX */ #define page_t ib_page_t /** Type of the index page */ typedef byte page_t; +#ifndef UNIV_INNOCHECKSUM /** Index page cursor */ struct page_cur_t; @@ -63,6 +61,41 @@ ssize, which is the number of shifts from 512. */ # error "PAGE_ZIP_SSIZE_MAX >= (1 << PAGE_ZIP_SSIZE_BITS)" #endif +/* Page cursor search modes; the values must be in this order! */ +enum page_cur_mode_t { + PAGE_CUR_UNSUPP = 0, + PAGE_CUR_G = 1, + PAGE_CUR_GE = 2, + PAGE_CUR_L = 3, + PAGE_CUR_LE = 4, + +/* PAGE_CUR_LE_OR_EXTENDS = 5,*/ /* This is a search mode used in + "column LIKE 'abc%' ORDER BY column DESC"; + we have to find strings which are <= 'abc' or + which extend it */ + +/* These search mode is for search R-tree index. */ + PAGE_CUR_CONTAIN = 7, + PAGE_CUR_INTERSECT = 8, + PAGE_CUR_WITHIN = 9, + PAGE_CUR_DISJOINT = 10, + PAGE_CUR_MBR_EQUAL = 11, + PAGE_CUR_RTREE_INSERT = 12, + PAGE_CUR_RTREE_LOCATE = 13 +}; + + +/** The information used for compressing a page when applying +TRUNCATE log record during recovery */ +struct redo_page_compress_t { + ulint type; /*!< index type */ + index_id_t index_id; /*!< index id */ + ulint n_fields; /*!< number of index fields */ + ulint field_len; /*!< the length of index field */ + const byte* fields; /*!< index field information */ + ulint trx_id_pos; /*!< position of trx-id column. */ +}; + /** Compressed page descriptor */ struct page_zip_des_t { @@ -110,21 +143,21 @@ struct page_zip_stat_t { }; /** Compression statistics types */ -typedef map<index_id_t, page_zip_stat_t> page_zip_stat_per_index_t; +typedef std::map< + index_id_t, + page_zip_stat_t, + std::less<index_id_t>, + ut_allocator<std::pair<const index_id_t, page_zip_stat_t> > > + page_zip_stat_per_index_t; /** Statistics on compression, indexed by page_zip_des_t::ssize - 1 */ -extern page_zip_stat_t page_zip_stat[PAGE_ZIP_SSIZE_MAX]; +extern page_zip_stat_t page_zip_stat[PAGE_ZIP_SSIZE_MAX]; /** Statistics on compression, indexed by dict_index_t::id */ -extern page_zip_stat_per_index_t page_zip_stat_per_index; -extern ib_mutex_t page_zip_stat_per_index_mutex; -#ifdef HAVE_PSI_INTERFACE -extern mysql_pfs_key_t page_zip_stat_per_index_mutex_key; -#endif /* HAVE_PSI_INTERFACE */ +extern page_zip_stat_per_index_t page_zip_stat_per_index; /**********************************************************************//** Write the "deleted" flag of a record on a compressed page. The flag must already have been written on the uncompressed page. */ -UNIV_INTERN void page_zip_rec_set_deleted( /*=====================*/ @@ -136,7 +169,6 @@ page_zip_rec_set_deleted( /**********************************************************************//** Write the "owned" flag of a record on a compressed page. The n_owned field must already have been written on the uncompressed page. */ -UNIV_INTERN void page_zip_rec_set_owned( /*===================*/ @@ -147,7 +179,6 @@ page_zip_rec_set_owned( /**********************************************************************//** Shift the dense page directory when a record is deleted. */ -UNIV_INTERN void page_zip_dir_delete( /*================*/ @@ -160,7 +191,6 @@ page_zip_dir_delete( /**********************************************************************//** Add a slot to the dense page directory. */ -UNIV_INTERN void page_zip_dir_add_slot( /*==================*/ @@ -168,4 +198,5 @@ page_zip_dir_add_slot( ulint is_clustered) /*!< in: nonzero for clustered index, zero for others */ MY_ATTRIBUTE((nonnull)); +#endif /* !UNIV_INNOCHECKSUM */ #endif |