mirror of
https://github.com/MariaDB/server.git
synced 2025-08-29 00:08:14 +03:00
Merge hynda.mysql.fi:/home/my/mysql-5.1-main
into hynda.mysql.fi:/home/my/mysql-5.1-marvel
This commit is contained in:
@@ -14,7 +14,6 @@
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
/* This file includes constants used with all databases */
|
||||
/* Author: Michael Widenius */
|
||||
|
||||
#ifndef _my_base_h
|
||||
#define _my_base_h
|
||||
@@ -48,10 +47,11 @@
|
||||
#define HA_OPEN_FOR_REPAIR 32 /* open even if crashed */
|
||||
#define HA_OPEN_FROM_SQL_LAYER 64
|
||||
#define HA_OPEN_MMAP 128 /* open memory mapped */
|
||||
#define HA_OPEN_COPY 256 /* Open copy (for repair) */
|
||||
/* Internal temp table, used for temporary results */
|
||||
#define HA_OPEN_INTERNAL_TABLE 256
|
||||
#define HA_OPEN_INTERNAL_TABLE 512
|
||||
|
||||
/* The following is parameter to ha_rkey() how to use key */
|
||||
/* The following is parameter to ha_rkey() how to use key */
|
||||
|
||||
/*
|
||||
We define a complete-field prefix of a key value as a prefix where
|
||||
@@ -137,7 +137,7 @@ enum ha_extra_function {
|
||||
HA_EXTRA_RESET_STATE, /* Reset positions */
|
||||
HA_EXTRA_IGNORE_DUP_KEY, /* Dup keys don't rollback everything*/
|
||||
HA_EXTRA_NO_IGNORE_DUP_KEY,
|
||||
HA_EXTRA_PREPARE_FOR_DELETE,
|
||||
HA_EXTRA_PREPARE_FOR_DROP,
|
||||
HA_EXTRA_PREPARE_FOR_UPDATE, /* Remove read cache if problems */
|
||||
HA_EXTRA_PRELOAD_BUFFER_SIZE, /* Set buffer size for preloading */
|
||||
/*
|
||||
@@ -188,6 +188,8 @@ enum ha_extra_function {
|
||||
executed. This condition is unset by HA_EXTRA_NO_IGNORE_DUP_KEY.
|
||||
*/
|
||||
HA_EXTRA_INSERT_WITH_UPDATE,
|
||||
/* Inform handler that we will do a rename */
|
||||
HA_EXTRA_PREPARE_FOR_RENAME,
|
||||
/*
|
||||
Orders MERGE handler to attach or detach its child tables. Used at
|
||||
begin and end of a statement.
|
||||
@@ -196,6 +198,9 @@ enum ha_extra_function {
|
||||
HA_EXTRA_DETACH_CHILDREN
|
||||
};
|
||||
|
||||
/* Compatible option, to be deleted in 6.0 */
|
||||
#define HA_EXTRA_PREPARE_FOR_DELETE HA_EXTRA_PREPARE_FOR_DROP
|
||||
|
||||
/* The following is parameter to ha_panic() */
|
||||
|
||||
enum ha_panic_function {
|
||||
@@ -300,6 +305,8 @@ enum ha_base_keytype {
|
||||
#define HA_OPTION_NO_PACK_KEYS 128 /* Reserved for MySQL */
|
||||
#define HA_OPTION_CREATE_FROM_ENGINE 256
|
||||
#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 */
|
||||
|
||||
@@ -310,6 +317,7 @@ enum ha_base_keytype {
|
||||
#define HA_CREATE_TMP_TABLE 4
|
||||
#define HA_CREATE_CHECKSUM 8
|
||||
#define HA_CREATE_KEEP_FILES 16 /* don't overwrite .MYD and MYI */
|
||||
#define HA_CREATE_PAGE_CHECKSUM 32
|
||||
#define HA_CREATE_DELAY_KEY_WRITE 64
|
||||
#define HA_CREATE_RELIES_ON_SQL_LAYER 128
|
||||
|
||||
@@ -356,12 +364,15 @@ enum ha_base_keytype {
|
||||
*/
|
||||
#define HA_STATUS_AUTO 64
|
||||
|
||||
/* Errorcodes given by functions */
|
||||
/*
|
||||
Errorcodes given by handler functions
|
||||
|
||||
opt_sum_query() assumes these codes are > 1
|
||||
Do not add error numbers before HA_ERR_FIRST.
|
||||
If necessary to add lower numbers, change HA_ERR_FIRST accordingly.
|
||||
*/
|
||||
#define HA_ERR_FIRST 120 /* Copy of first error nr.*/
|
||||
|
||||
/* opt_sum_query() assumes these codes are > 1 */
|
||||
/* Do not add error numbers before HA_ERR_FIRST. */
|
||||
/* If necessary to add lower numbers, change HA_ERR_FIRST accordingly. */
|
||||
#define HA_ERR_FIRST 120 /*Copy first error nr.*/
|
||||
#define HA_ERR_KEY_NOT_FOUND 120 /* Didn't find key on read or update */
|
||||
#define HA_ERR_FOUND_DUPP_KEY 121 /* Dupplicate key on write */
|
||||
#define HA_ERR_RECORD_CHANGED 123 /* Uppdate with is recoverable */
|
||||
@@ -382,7 +393,7 @@ enum ha_base_keytype {
|
||||
#define HA_WRONG_CREATE_OPTION 140 /* Wrong create option */
|
||||
#define HA_ERR_FOUND_DUPP_UNIQUE 141 /* Dupplicate unique on write */
|
||||
#define HA_ERR_UNKNOWN_CHARSET 142 /* Can't open charset */
|
||||
#define HA_ERR_WRONG_MRG_TABLE_DEF 143 /* conflicting MyISAM tables in MERGE */
|
||||
#define HA_ERR_WRONG_MRG_TABLE_DEF 143 /* conflicting tables in MERGE */
|
||||
#define HA_ERR_CRASHED_ON_REPAIR 144 /* Last (automatic?) repair failed */
|
||||
#define HA_ERR_CRASHED_ON_USAGE 145 /* Table must be repaired */
|
||||
#define HA_ERR_LOCK_WAIT_TIMEOUT 146
|
||||
@@ -397,32 +408,38 @@ enum ha_base_keytype {
|
||||
#define HA_ERR_NO_SUCH_TABLE 155 /* The table does not exist in engine */
|
||||
#define HA_ERR_TABLE_EXIST 156 /* The table existed in storage engine */
|
||||
#define HA_ERR_NO_CONNECTION 157 /* Could not connect to storage engine */
|
||||
#define HA_ERR_NULL_IN_SPATIAL 158 /* NULLs are not supported in spatial index */
|
||||
/* NULLs are not supported in spatial index */
|
||||
#define HA_ERR_NULL_IN_SPATIAL 158
|
||||
#define HA_ERR_TABLE_DEF_CHANGED 159 /* The table changed in storage engine */
|
||||
#define HA_ERR_NO_PARTITION_FOUND 160 /* There's no partition in table for
|
||||
given value */
|
||||
#define HA_ERR_RBR_LOGGING_FAILED 161 /* Row-based binlogging of row failed */
|
||||
#define HA_ERR_DROP_INDEX_FK 162 /* Index needed in foreign key constr. */
|
||||
#define HA_ERR_FOREIGN_DUPLICATE_KEY 163 /* Upholding foreign key constraints
|
||||
would lead to a duplicate key
|
||||
error in some other table. */
|
||||
#define HA_ERR_TABLE_NEEDS_UPGRADE 164 /* The table changed in storage engine */
|
||||
#define HA_ERR_TABLE_READONLY 165 /* The table is not writable */
|
||||
#define HA_ERR_DROP_INDEX_FK 162 /* Index needed in foreign key constr */
|
||||
/*
|
||||
Upholding foreign key constraints would lead to a duplicate key error
|
||||
in some other table.
|
||||
*/
|
||||
#define HA_ERR_FOREIGN_DUPLICATE_KEY 163
|
||||
/* The table changed in storage engine */
|
||||
#define HA_ERR_TABLE_NEEDS_UPGRADE 164
|
||||
#define HA_ERR_TABLE_READONLY 165 /* The table is not writable */
|
||||
|
||||
#define HA_ERR_AUTOINC_READ_FAILED 166 /* Failed to get next autoinc value */
|
||||
#define HA_ERR_AUTOINC_ERANGE 167 /* Failed to set row autoinc value */
|
||||
#define HA_ERR_GENERIC 168 /* Generic error */
|
||||
#define HA_ERR_RECORD_IS_THE_SAME 169 /* row not actually updated :
|
||||
new values same as the old values */
|
||||
|
||||
/* 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_ROWS_EVENT_APPLY 172 /* The event could not be processed
|
||||
#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 */
|
||||
#define HA_ERR_LAST 172 /*Copy last error nr.*/
|
||||
/* Add error numbers before HA_ERR_LAST and change it accordingly. */
|
||||
#define HA_ERR_LAST 173 /* Copy of last error nr */
|
||||
|
||||
/* Number of different errors */
|
||||
#define HA_ERR_ERRORS (HA_ERR_LAST - HA_ERR_FIRST + 1)
|
||||
|
||||
/* Other constants */
|
||||
@@ -486,7 +503,7 @@ enum en_fieldtype {
|
||||
};
|
||||
|
||||
enum data_file_type {
|
||||
STATIC_RECORD,DYNAMIC_RECORD,COMPRESSED_RECORD
|
||||
STATIC_RECORD, DYNAMIC_RECORD, COMPRESSED_RECORD, BLOCK_RECORD
|
||||
};
|
||||
|
||||
/* For key ranges */
|
||||
@@ -538,4 +555,7 @@ typedef ulong ha_rows;
|
||||
|
||||
#define HA_VARCHAR_PACKLENGTH(field_length) ((field_length) < 256 ? 1 :2)
|
||||
|
||||
/* invalidator function reference for Query Cache */
|
||||
typedef void (* invalidator_by_filename)(const char * filename);
|
||||
|
||||
#endif /* _my_base_h */
|
||||
|
Reference in New Issue
Block a user