diff options
Diffstat (limited to 'storage/innobase/include/btr0btr.h')
-rw-r--r-- | storage/innobase/include/btr0btr.h | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/storage/innobase/include/btr0btr.h b/storage/innobase/include/btr0btr.h index 419c5db657d..4a80b5e4913 100644 --- a/storage/innobase/include/btr0btr.h +++ b/storage/innobase/include/btr0btr.h @@ -2,7 +2,7 @@ Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2012, Facebook Inc. -Copyright (c) 2014, 2016, MariaDB Corporation. All Rights Reserved. +Copyright (c) 2014, 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -79,66 +79,66 @@ enum btr_latch_mode { /** If this is ORed to btr_latch_mode, it means that the search tuple will be inserted to the index, at the searched position. When the record is not in the buffer pool, try to use the insert buffer. */ -#define BTR_INSERT 512 +#define BTR_INSERT 512U /** This flag ORed to btr_latch_mode says that we do the search in query optimization */ -#define BTR_ESTIMATE 1024 +#define BTR_ESTIMATE 1024U /** This flag ORed to BTR_INSERT says that we can ignore possible UNIQUE definition on secondary indexes when we decide if we can use the insert buffer to speed up inserts */ -#define BTR_IGNORE_SEC_UNIQUE 2048 +#define BTR_IGNORE_SEC_UNIQUE 2048U /** Try to delete mark the record at the searched position using the insert/delete buffer when the record is not in the buffer pool. */ -#define BTR_DELETE_MARK 4096 +#define BTR_DELETE_MARK 4096U /** Try to purge the record at the searched position using the insert/delete buffer when the record is not in the buffer pool. */ -#define BTR_DELETE 8192 +#define BTR_DELETE 8192U /** In the case of BTR_SEARCH_LEAF or BTR_MODIFY_LEAF, the caller is already holding an S latch on the index tree */ -#define BTR_ALREADY_S_LATCHED 16384 +#define BTR_ALREADY_S_LATCHED 16384U /** In the case of BTR_MODIFY_TREE, the caller specifies the intention to insert record only. It is used to optimize block->lock range.*/ -#define BTR_LATCH_FOR_INSERT 32768 +#define BTR_LATCH_FOR_INSERT 32768U /** In the case of BTR_MODIFY_TREE, the caller specifies the intention to delete record only. It is used to optimize block->lock range.*/ -#define BTR_LATCH_FOR_DELETE 65536 +#define BTR_LATCH_FOR_DELETE 65536U /** This flag is for undo insert of rtree. For rtree, we need this flag to find proper rec to undo insert.*/ -#define BTR_RTREE_UNDO_INS 131072 +#define BTR_RTREE_UNDO_INS 131072U /** In the case of BTR_MODIFY_LEAF, the caller intends to allocate or free the pages of externally stored fields. */ -#define BTR_MODIFY_EXTERNAL 262144 +#define BTR_MODIFY_EXTERNAL 262144U /** Try to delete mark the record at the searched position when the record is in spatial index */ -#define BTR_RTREE_DELETE_MARK 524288 - -#define BTR_LATCH_MODE_WITHOUT_FLAGS(latch_mode) \ - ((latch_mode) & ~(BTR_INSERT \ - | BTR_DELETE_MARK \ - | BTR_RTREE_UNDO_INS \ - | BTR_RTREE_DELETE_MARK \ - | BTR_DELETE \ - | BTR_ESTIMATE \ - | BTR_IGNORE_SEC_UNIQUE \ - | BTR_ALREADY_S_LATCHED \ - | BTR_LATCH_FOR_INSERT \ - | BTR_LATCH_FOR_DELETE \ - | BTR_MODIFY_EXTERNAL)) - -#define BTR_LATCH_MODE_WITHOUT_INTENTION(latch_mode) \ - ((latch_mode) & ~(BTR_LATCH_FOR_INSERT \ - | BTR_LATCH_FOR_DELETE \ - | BTR_MODIFY_EXTERNAL)) +#define BTR_RTREE_DELETE_MARK 524288U + +#define BTR_LATCH_MODE_WITHOUT_FLAGS(latch_mode) \ + ((latch_mode) & btr_latch_mode(~(BTR_INSERT \ + | BTR_DELETE_MARK \ + | BTR_RTREE_UNDO_INS \ + | BTR_RTREE_DELETE_MARK \ + | BTR_DELETE \ + | BTR_ESTIMATE \ + | BTR_IGNORE_SEC_UNIQUE \ + | BTR_ALREADY_S_LATCHED \ + | BTR_LATCH_FOR_INSERT \ + | BTR_LATCH_FOR_DELETE \ + | BTR_MODIFY_EXTERNAL))) + +#define BTR_LATCH_MODE_WITHOUT_INTENTION(latch_mode) \ + ((latch_mode) & btr_latch_mode(~(BTR_LATCH_FOR_INSERT \ + | BTR_LATCH_FOR_DELETE \ + | BTR_MODIFY_EXTERNAL))) /**************************************************************//** Report that an index page is corrupted. */ @@ -206,7 +206,7 @@ btr_block_get_func( const page_size_t& page_size, ulint mode, const char* file, - ulint line, + unsigned line, dict_index_t* index, mtr_t* mtr); @@ -507,7 +507,7 @@ btr_insert_on_non_leaf_level_func( ulint level, /*!< in: level, must be > 0 */ dtuple_t* tuple, /*!< in: the record to be inserted */ const char* file, /*!< in: file name */ - ulint line, /*!< in: line where called */ + unsigned line, /*!< in: line where called */ mtr_t* mtr); /*!< in: mtr */ #define btr_insert_on_non_leaf_level(f,i,l,t,m) \ btr_insert_on_non_leaf_level_func(f,i,l,t,__FILE__,__LINE__,m) |