00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #include <config.h>
00021 #include <drizzled/base.h>
00022 #include <drizzled/internal/my_sys.h>
00023 #include <plugin/myisam/my_handler.h>
00024 #include <drizzled/error.h>
00025 #include <drizzled/gettext.h>
00026
00027 using namespace drizzled;
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040 void my_handler_error_register(void)
00041 {
00042 DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_KEY_NOT_FOUND, N_("Didn't find key on read or update"));
00043 DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_FOUND_DUPP_KEY, N_("Duplicate key on write or update"));
00044 DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_INTERNAL_ERROR, N_("Internal (unspecified) error in handler"));
00045 DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_RECORD_CHANGED,
00046 N_("Someone has changed the row since it was read (while the table "
00047 "was locked to prevent it)"));
00048 DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_WRONG_INDEX, N_("Wrong index given to function"));
00049 DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_CRASHED, N_("Index file is crashed"));
00050 DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_WRONG_IN_RECORD, N_("Record file is crashed"));
00051 DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_OUT_OF_MEM, N_("Out of memory in engine"));
00052 DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_NOT_A_TABLE, N_("Incorrect file format"));
00053 DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_WRONG_COMMAND, N_("Command not supported by database"));
00054 DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_OLD_FILE, N_("Old database file"));
00055 DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_NO_ACTIVE_RECORD, N_("No record read before update"));
00056 DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_RECORD_DELETED, N_("Record was already deleted (or record file crashed)"));
00057 DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_RECORD_FILE_FULL, N_("No more room in record file"));
00058 DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_INDEX_FILE_FULL, N_("No more room in index file"));
00059 DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_END_OF_FILE, N_("No more records (read after end of file)"));
00060 DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_UNSUPPORTED, N_("Unsupported extension used for table"));
00061 DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_TO_BIG_ROW, N_("Too big row"));
00062 DRIZZLE_ADD_ERROR_MESSAGE(HA_WRONG_CREATE_OPTION, N_("Wrong create options"));
00063 DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_FOUND_DUPP_UNIQUE, N_("Duplicate unique key or constraint on write or update"));
00064 DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_UNKNOWN_CHARSET, N_("Unknown character set used in table"));
00065 DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_WRONG_MRG_TABLE_DEF, N_("Conflicting table definitions in sub-tables of MERGE table"));
00066 DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_CRASHED_ON_REPAIR, N_("Table is crashed and last repair failed"));
00067 DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_CRASHED_ON_USAGE, N_("Table was marked as crashed and should be repaired"));
00068 DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_LOCK_WAIT_TIMEOUT, N_("Lock timed out; Retry transaction"));
00069 DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_LOCK_TABLE_FULL, N_("Lock table is full; Restart program with a larger locktable"));
00070 DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_READ_ONLY_TRANSACTION, N_("Updates are not allowed under a read only transactions"));
00071 DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_LOCK_DEADLOCK, N_("Lock deadlock; Retry transaction"));
00072 DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_CANNOT_ADD_FOREIGN, N_("Foreign key constraint is incorrectly formed"));
00073 DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_NO_REFERENCED_ROW, N_("Cannot add a child row"));
00074 DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_ROW_IS_REFERENCED, N_("Cannot delete a parent row"));
00075 DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_NO_SAVEPOINT, N_("No savepoint with that name"));
00076 DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_NON_UNIQUE_BLOCK_SIZE, N_("Non unique key block size"));
00077 DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_NO_SUCH_TABLE, N_("The table does not exist in engine"));
00078 DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_TABLE_EXIST, N_("The table already existed in storage engine"));
00079 DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_NO_CONNECTION, N_("Could not connect to storage engine"));
00080 DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_NULL_IN_SPATIAL, N_("Unexpected null pointer found when using spatial index"));
00081 DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_TABLE_DEF_CHANGED, N_("The table changed in storage engine"));
00082 DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_NO_PARTITION_FOUND, N_("There's no partition in table for the given value"));
00083 DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_RBR_LOGGING_FAILED, N_("Row-based binlogging of row failed"));
00084 DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_DROP_INDEX_FK, N_("Index needed in foreign key constraint"));
00085 DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_FOREIGN_DUPLICATE_KEY, N_("Upholding foreign key constraints would lead to a duplicate key error"));
00086 DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_TABLE_NEEDS_UPGRADE, N_("Table needs to be upgraded before it can be used"));
00087 DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_TABLE_READONLY, N_("Table is read only"));
00088 DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_AUTOINC_READ_FAILED, N_("Failed to get next auto increment value"));
00089 DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_AUTOINC_ERANGE, N_("Failed to set row auto increment value"));
00090 DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_GENERIC, N_("Unknown (generic) error from engine"));
00091 DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_RECORD_IS_THE_SAME, N_("Record is the same"));
00092 DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_LOGGING_IMPOSSIBLE, N_("It is not possible to log this statement"));
00093 DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_TABLESPACE_EXIST, N_("Tablespace exists"));
00094 DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_CORRUPT_EVENT, N_("The event was corrupt, leading to illegal data being read"));
00095 DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_NEW_FILE, N_("The table is of a new format not supported by this version"));
00096 DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_ROWS_EVENT_APPLY, N_("The event could not be processed no other handler error happened"));
00097 DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_INITIALIZATION, N_("Got a fatal error during initialzation of handler"));
00098 DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_FILE_TOO_SHORT, N_("File to short; Expected more data in file"));
00099 DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_WRONG_CRC, N_("Read page with wrong checksum"));
00100
00101 DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_LOCK_OR_ACTIVE_TRANSACTION, N_("Lock or active transaction"));
00102 DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_NO_SUCH_TABLESPACE, N_("No such table space"));
00103 DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_TABLESPACE_NOT_EMPTY, N_("Tablespace not empty"));
00104 }