summaryrefslogtreecommitdiff
path: root/include/my_base.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/my_base.h')
-rw-r--r--include/my_base.h50
1 files changed, 36 insertions, 14 deletions
diff --git a/include/my_base.h b/include/my_base.h
index 28dc55b1b84..75deb89a08d 100644
--- a/include/my_base.h
+++ b/include/my_base.h
@@ -50,6 +50,7 @@
#define HA_OPEN_COPY 256 /* Open copy (for repair) */
/* Internal temp table, used for temporary results */
#define HA_OPEN_INTERNAL_TABLE 512
+#define HA_OPEN_MERGE_TABLE 1024
/* The following is parameter to ha_rkey() how to use key */
@@ -111,7 +112,7 @@ enum ha_storage_media {
enum ha_extra_function {
HA_EXTRA_NORMAL=0, /* Optimize for space (def) */
HA_EXTRA_QUICK=1, /* Optimize for speed */
- HA_EXTRA_NOT_USED=2,
+ HA_EXTRA_NOT_USED=2, /* Should be ignored by handler */
HA_EXTRA_CACHE=3, /* Cache record in HA_rrnd() */
HA_EXTRA_NO_CACHE=4, /* End caching of records (def) */
HA_EXTRA_NO_READCHECK=5, /* No readcheck on update */
@@ -196,7 +197,10 @@ enum ha_extra_function {
HA_EXTRA_ADD_CHILDREN_LIST,
HA_EXTRA_ATTACH_CHILDREN,
HA_EXTRA_IS_ATTACHED_CHILDREN,
- HA_EXTRA_DETACH_CHILDREN
+ HA_EXTRA_DETACH_CHILDREN,
+ HA_EXTRA_DETACH_CHILD,
+ /* Inform handler we will force a close as part of flush */
+ HA_EXTRA_PREPARE_FOR_FORCED_CLOSE
};
/* Compatible option, to be deleted in 6.0 */
@@ -239,7 +243,10 @@ enum ha_base_keytype {
#define HA_MAX_KEYTYPE 31 /* Must be log2-1 */
- /* These flags kan be OR:ed to key-flag */
+/*
+ These flags kan be OR:ed to key-flag
+ Note that these can only be up to 16 bits!
+*/
#define HA_NOSAME 1 /* Set if not dupplicated records */
#define HA_PACK_KEY 2 /* Pack string key to previous key */
@@ -250,11 +257,13 @@ enum ha_base_keytype {
#define HA_SPATIAL 1024 /* For spatial search */
#define HA_NULL_ARE_EQUAL 2048 /* NULL in key are cmp as equal */
#define HA_GENERATED_KEY 8192 /* Automaticly generated key */
+#define HA_RTREE_INDEX 16384 /* For RTREE search */
/* The combination of the above can be used for key type comparison. */
#define HA_KEYFLAG_MASK (HA_NOSAME | HA_PACK_KEY | HA_AUTO_KEY | \
HA_BINARY_PACK_KEY | HA_FULLTEXT | HA_UNIQUE_CHECK | \
- HA_SPATIAL | HA_NULL_ARE_EQUAL | HA_GENERATED_KEY)
+ HA_SPATIAL | HA_NULL_ARE_EQUAL | HA_GENERATED_KEY | \
+ HA_RTREE_INDEX)
/*
Key contains partial segments.
@@ -294,6 +303,7 @@ enum ha_base_keytype {
*/
#define HA_END_SPACE_ARE_EQUAL 512
#define HA_BIT_PART 1024
+#define HA_CAN_MEMCMP 2048 /* internal, never stored in frm */
/* optionbits for database */
#define HA_OPTION_PACK_RECORD 1
@@ -308,8 +318,12 @@ enum ha_base_keytype {
#define HA_OPTION_RELIES_ON_SQL_LAYER 512
#define HA_OPTION_NULL_FIELDS 1024
#define HA_OPTION_PAGE_CHECKSUM 2048
-#define HA_OPTION_TEMP_COMPRESS_RECORD ((uint) 16384) /* set by isamchk */
-#define HA_OPTION_READ_ONLY_DATA ((uint) 32768) /* Set by isamchk */
+/* .frm has extra create options in linked-list format */
+#define HA_OPTION_TEXT_CREATE_OPTIONS (1L << 14)
+#define HA_OPTION_TEMP_COMPRESS_RECORD (1L << 15) /* set by isamchk */
+#define HA_OPTION_READ_ONLY_DATA (1L << 16) /* Set by isamchk */
+#define HA_OPTION_NO_CHECKSUM (1L << 17)
+#define HA_OPTION_NO_DELAY_KEY_WRITE (1L << 18)
/* Bits in flag to create() */
@@ -432,18 +446,18 @@ enum ha_base_keytype {
/* row not actually updated: new values same as the old values */
#define HA_ERR_RECORD_IS_THE_SAME 169
/* It is not possible to log this statement */
-#define HA_ERR_LOGGING_IMPOSSIBLE 170 /* It is not possible to log this
- statement */
-#define HA_ERR_CORRUPT_EVENT 171 /* The event was corrupt, leading to
- illegal data being read */
+#define HA_ERR_LOGGING_IMPOSSIBLE 170
+/* The event was corrupt, leading to illegal data being read */
+#define HA_ERR_CORRUPT_EVENT 171
#define HA_ERR_NEW_FILE 172 /* New file format */
-#define HA_ERR_ROWS_EVENT_APPLY 173 /* The event could not be processed
- no other hanlder error happened */
+/* The event could not be processed no other handler error happened */
+#define HA_ERR_ROWS_EVENT_APPLY 173
#define HA_ERR_INITIALIZATION 174 /* Error during initialization */
#define HA_ERR_FILE_TOO_SHORT 175 /* File too short */
#define HA_ERR_WRONG_CRC 176 /* Wrong CRC on page */
-#define HA_ERR_TOO_MANY_CONCURRENT_TRXS 177 /*Too many active concurrent transactions */
-#define HA_ERR_LAST 177 /* Copy of last error nr */
+#define HA_ERR_ROW_NOT_VISIBLE 177
+#define HA_ERR_TOO_MANY_CONCURRENT_TRXS 178 /*Too many active concurrent transactions */
+#define HA_ERR_LAST 178 /* Copy of last error nr */
/* Number of different errors */
#define HA_ERR_ERRORS (HA_ERR_LAST - HA_ERR_FIRST + 1)
@@ -476,6 +490,14 @@ typedef ulong key_part_map;
#define MBR_DATA 16384
#define SEARCH_NULL_ARE_EQUAL 32768 /* NULL in keys are equal */
#define SEARCH_NULL_ARE_NOT_EQUAL 65536 /* NULL in keys are not equal */
+/* Use this when inserting a key in position order */
+#define SEARCH_INSERT SEARCH_NULL_ARE_NOT_EQUAL*2
+/* Only part of the key is specified while reading */
+#define SEARCH_PART_KEY SEARCH_INSERT*2
+/* Used when user key (key 2) contains transaction id's */
+#define SEARCH_USER_KEY_HAS_TRANSID SEARCH_PART_KEY*2
+/* Used when page key (key 1) contains transaction id's */
+#define SEARCH_PAGE_KEY_HAS_TRANSID SEARCH_USER_KEY_HAS_TRANSID*2
/* bits in opt_flag */
#define QUICK_USED 1