添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
DEFINE_ERROR(OB_SUCCESS, 0, 0, "00000", "Success");
////////////////////////////////////////////////////////////////
//error code for common -4000 ---- -4500
////////////////////////////////////////////////////////////////
DEFINE_ERROR(OB_ERROR, -4000, -1, "HY000", "Common error");
DEFINE_ERROR(OB_OBJ_TYPE_ERROR, -4001, -1, "HY004", "Object type error");
DEFINE_ERROR_EXT(OB_INVALID_ARGUMENT, -4002, ER_WRONG_ARGUMENTS, "HY000", "Invalid argument", "Incorrect arguments to %s");
DEFINE_ERROR(OB_ARRAY_OUT_OF_RANGE, -4003, -1, "42000", "Array index out of range");
DEFINE_ERROR(OB_SERVER_LISTEN_ERROR, -4004, -1, "08S01", "Failed to listen to the port");
DEFINE_ERROR(OB_INIT_TWICE, -4005, -1, "HY000", "The object is initialized twice");
DEFINE_ERROR(OB_NOT_INIT, -4006, -1, "HY000", "The object is not initialized");
DEFINE_ERROR_EXT(OB_NOT_SUPPORTED, -4007, ER_NOT_SUPPORTED_YET, "0A000", "Not supported feature or function", "%s not supported");
DEFINE_ERROR(OB_ITER_END, -4008, -1, "HY000", "End of iteration");
DEFINE_ERROR(OB_IO_ERROR, -4009, -1, "58030", "IO error");
DEFINE_ERROR(OB_ERROR_FUNC_VERSION, -4010, -1, "HY000", "Wrong RPC command version");
DEFINE_ERROR(OB_PACKET_NOT_SENT, -4011, -1, "HY000", "Can not send packet");
DEFINE_ERROR(OB_TIMEOUT, -4012, -1, "HY000", "Timeout");
DEFINE_ERROR(OB_ALLOCATE_MEMORY_FAILED, -4013, -1, "HY001", "No memory or reach tenant memory limit");
DEFINE_ERROR(OB_INNER_STAT_ERROR, -4014, -1, "HY000", "Inner state error");
DEFINE_ERROR(OB_ERR_SYS, -4015, -1, "HY000", "System error");
DEFINE_ERROR_EXT(OB_ERR_UNEXPECTED, -4016, -1, "HY000", "Ooooooooooooops", "%s");
DEFINE_ERROR(OB_ENTRY_EXIST, -4017, -1, "HY000", "Entry already exist");
DEFINE_ERROR(OB_ENTRY_NOT_EXIST, -4018, -1, "HY000", "Entry not exist");
DEFINE_ERROR(OB_SIZE_OVERFLOW, -4019, -1, "HY000", "Size overflow");
DEFINE_ERROR(OB_REF_NUM_NOT_ZERO, -4020, -1, "HY000", "Reference count is not zero");
DEFINE_ERROR(OB_CONFLICT_VALUE, -4021, -1, "HY000", "Conflict value");
DEFINE_ERROR(OB_ITEM_NOT_SETTED, -4022, -1, "HY000", "Item not set");
DEFINE_ERROR(OB_EAGAIN, -4023, -1, "HY000", "Try again");
DEFINE_ERROR(OB_BUF_NOT_ENOUGH, -4024, -1, "HY000", "Buffer not enough");
DEFINE_ERROR(OB_PARTIAL_FAILED, -4025, -1, "HY000", "Partial failed");
DEFINE_ERROR(OB_READ_NOTHING, -4026, -1, "02000", "Nothing to read");
DEFINE_ERROR(OB_FILE_NOT_EXIST, -4027, ER_FILE_NOT_FOUND, "HY000", "File not exist");
DEFINE_ERROR(OB_DISCONTINUOUS_LOG, -4028, -1, "HY000", "Log entry not continuous");
DEFINE_ERROR(OB_SCHEMA_ERROR, -4029, -1, "HY000", "Schema error");
DEFINE_ERROR(OB_TENANT_OUT_OF_MEM, -4030, -1, "HY000", "Over tenant memory limits");
DEFINE_ERROR(OB_UNKNOWN_OBJ, -4031, -1, "HY004", "Unknown object");
DEFINE_ERROR(OB_NO_MONITOR_DATA, -4032, -1, "02000", "No monitor data");
DEFINE_ERROR(OB_SERIALIZE_ERROR, -4033, -1, "HY000", "Serialize error");
DEFINE_ERROR(OB_DESERIALIZE_ERROR, -4034, -1, "HY000", "Deserialize error");
DEFINE_ERROR(OB_AIO_TIMEOUT, -4035, -1, "HY000", "Asynchronous IO error");
DEFINE_ERROR(OB_NEED_RETRY, -4036, -1, "HY000", "Need retry");
DEFINE_ERROR(OB_TOO_MANY_SSTABLE, -4037, -1, "HY000", "Too many sstable");
DEFINE_ERROR(OB_NOT_MASTER, -4038, -1, "HY000", "The observer or zone is not the master");
DEFINE_ERROR(OB_DECRYPT_FAILED, -4041, -1, "HY000", "Decrypt error");
DEFINE_ERROR(OB_USER_NOT_EXIST, -4042, ER_PASSWORD_NO_MATCH, "42000", "Can not find any matching row in the user table");
DEFINE_ERROR_EXT(OB_PASSWORD_WRONG, -4043, ER_ACCESS_DENIED_ERROR, "42000", "Access denied for user", "Access denied for user '%.*s'@'%.*s' (using password: %s)");
DEFINE_ERROR(OB_SKEY_VERSION_WRONG, -4044, -1, "HY000", "Wrong skey version");
DEFINE_ERROR(OB_NOT_REGISTERED, -4048, -1, "HY000", "Not registered");
DEFINE_ERROR(OB_WAITQUEUE_TIMEOUT, -4049, 4012, "HY000", "Task timeout and not executed");
DEFINE_ERROR(OB_NOT_THE_OBJECT, -4050, -1, "HY000", "Not the object");
DEFINE_ERROR(OB_ALREADY_REGISTERED, -4051, -1, "HY000", "Already registered");
DEFINE_ERROR(OB_LAST_LOG_RUINNED, -4052, -1, "HY000", "Corrupted log entry");
DEFINE_ERROR(OB_NO_CS_SELECTED, -4053, -1, "HY000", "No ChunkServer selected");
DEFINE_ERROR(OB_NO_TABLETS_CREATED, -4054, -1, "HY000", "No tablets created");
DEFINE_ERROR(OB_INVALID_ERROR, -4055, -1, "HY000", "Invalid entry");
DEFINE_ERROR(OB_DECIMAL_OVERFLOW_WARN, -4057, -1, "HY000", "Decimal overflow warning");
DEFINE_ERROR(OB_DECIMAL_UNLEGAL_ERROR, -4058, -1, "HY000", "Decimal overflow error");
DEFINE_ERROR(OB_OBJ_DIVIDE_ERROR, -4060, -1, "HY000", "Divide error");
DEFINE_ERROR(OB_NOT_A_DECIMAL, -4061, -1, "HY000", "Not a decimal");
DEFINE_ERROR(OB_DECIMAL_PRECISION_NOT_EQUAL, -4062, -1, "HY104", "Decimal precision error");
DEFINE_ERROR(OB_EMPTY_RANGE, -4063, -1, "HY000", "Empty range");
DEFINE_ERROR(OB_SESSION_KILLED, -4064, -1, "HY000", "Session killed");
DEFINE_ERROR(OB_LOG_NOT_SYNC, -4065, -1, "HY000", "Log not sync");
DEFINE_ERROR(OB_DIR_NOT_EXIST, -4066, ER_CANT_READ_DIR, "HY000", "Directory not exist");
DEFINE_ERROR(OB_SESSION_NOT_FOUND, -4067, 4012, "HY000", "RPC session not found");
DEFINE_ERROR(OB_INVALID_LOG, -4068, -1, "HY000", "Invalid log");
DEFINE_ERROR(OB_INVALID_DATA, -4070, -1, "HY000", "Invalid data");
DEFINE_ERROR(OB_ALREADY_DONE, -4071, -1, "HY000", "Already done");
DEFINE_ERROR(OB_CANCELED, -4072, -1, "HY000", "Operation canceled");
DEFINE_ERROR(OB_LOG_SRC_CHANGED, -4073, -1, "HY000", "Log source changed");
DEFINE_ERROR(OB_LOG_NOT_ALIGN, -4074, -1, "HY000", "Log not aligned");
DEFINE_ERROR(OB_LOG_MISSING, -4075, -1, "HY000", "Log entry missed");
DEFINE_ERROR(OB_NEED_WAIT, -4076, -1, "HY000", "Need wait");
DEFINE_ERROR(OB_NOT_IMPLEMENT, -4077, -1, "0A000", "Not implemented feature");
DEFINE_ERROR(OB_DIVISION_BY_ZERO, -4078, ER_DIVISION_BY_ZERO, "42000", "Divided by zero");
DEFINE_ERROR(OB_EXCEED_MEM_LIMIT, -4080, -1, "HY013", "exceed memory limit");
DEFINE_ERROR(OB_RESULT_UNKNOWN, -4081, -1, "HY000", "Unknown result");
DEFINE_ERROR(OB_NO_RESULT, -4084, -1, "02000", "No result");
DEFINE_ERROR(OB_QUEUE_OVERFLOW, -4085, -1, "HY000", "Queue overflow");
DEFINE_ERROR(OB_TERM_LAGGED, -4097, -1, "HY000", "Term lagged");
DEFINE_ERROR(OB_TERM_NOT_MATCH, -4098, -1, "HY000", "Term not match");
DEFINE_ERROR(OB_START_LOG_CURSOR_INVALID, -4099, -1, "HY000", "Invalid log cursor");
DEFINE_ERROR(OB_LOCK_NOT_MATCH, -4100, -1, "HY000", "Lock not match");
DEFINE_ERROR(OB_DEAD_LOCK, -4101, ER_LOCK_DEADLOCK, "HY000", "Deadlock");
DEFINE_ERROR(OB_PARTIAL_LOG, -4102, -1, "HY000", "Incomplete log entry");
DEFINE_ERROR(OB_CHECKSUM_ERROR, -4103, -1, "42000", "Data checksum error");
DEFINE_ERROR(OB_INIT_FAIL, -4104, -1, "HY000", "Initialize error");
DEFINE_ERROR(OB_NOT_ENOUGH_STORE, -4106, -1, "HY000", "not enough commitlog store");
DEFINE_ERROR(OB_BLOCK_SWITCHED, -4107, -1, "HY000", "block switched when fill commitlog");
DEFINE_ERROR(OB_STATE_NOT_MATCH, -4109, -1, "HY000", "Server state or role not the same as expected");
DEFINE_ERROR(OB_READ_ZERO_LOG, -4110, -1, "HY000", "Read zero log");
DEFINE_ERROR(OB_BLOCK_NEED_FREEZE, -4111, -1, "HY000", "block need freeze");
DEFINE_ERROR(OB_BLOCK_FROZEN, -4112, -1, "HY000", "block frozen");
DEFINE_ERROR(OB_IN_FATAL_STATE, -4113, -1, "HY000", "In FATAL state");
DEFINE_ERROR(OB_IN_STOP_STATE, -4114, -1, "08S01", "In STOP state");
DEFINE_ERROR(OB_UPS_MASTER_EXISTS, -4115, -1, "HY000", "Master UpdateServer already exists");
DEFINE_ERROR(OB_LOG_NOT_CLEAR, -4116, -1, "42000", "Log not clear");
DEFINE_ERROR(OB_FILE_ALREADY_EXIST, -4117, ER_FILE_EXISTS_ERROR, "58000", "File already exist");
DEFINE_ERROR(OB_UNKNOWN_PACKET, -4118, ER_UNKNOWN_COM_ERROR, "HY001", "Unknown packet");
DEFINE_ERROR(OB_RPC_PACKET_TOO_LONG, -4119, -1, "08000", "RPC packet to send too long");
DEFINE_ERROR(OB_LOG_TOO_LARGE, -4120, -1, "HY000", "Log too large");
DEFINE_ERROR(OB_RPC_SEND_ERROR, -4121, -1, "08000", "RPC send error");
DEFINE_ERROR(OB_RPC_POST_ERROR, -4122, -1, "08000", "RPC post error");
DEFINE_ERROR(OB_LIBEASY_ERROR, -4123, -1, "08000", "Libeasy error");
DEFINE_ERROR(OB_CONNECT_ERROR, -4124, -1, "HY000", "Connect error");
DEFINE_ERROR(OB_NOT_FREE, -4125, -1, "HY000", "Not free");
DEFINE_ERROR(OB_INIT_SQL_CONTEXT_ERROR, -4126, -1, "HY000", "Init SQL context error");
DEFINE_ERROR(OB_SKIP_INVALID_ROW, -4127, -1, "42000", "Skip invalid row");
DEFINE_ERROR(OB_RPC_PACKET_INVALID, -4128, -1, "HY000", "RPC packet is invalid");
DEFINE_ERROR(OB_NO_TABLET, -4133, -1, "HY000", "No tablets");
DEFINE_ERROR(OB_SNAPSHOT_DISCARDED, -4138, -1, "HY000", "Request to read too old versioned data");
DEFINE_ERROR(OB_DATA_NOT_UPTODATE, -4139, -1, "HY000", "State is stale");
DEFINE_ERROR(OB_ROW_MODIFIED, -4142, -1, "HY000", "Row modified");
DEFINE_ERROR(OB_VERSION_NOT_MATCH, -4143, -1, "42000", "Version not match");
DEFINE_ERROR(OB_BAD_ADDRESS, -4144, -1, "42000", "Bad address");
DEFINE_ERROR(OB_ENQUEUE_FAILED, -4146, -1, "HY000", "Enqueue error");
DEFINE_ERROR(OB_INVALID_CONFIG, -4147, -1, "HY000", "Invalid config");
DEFINE_ERROR(OB_STMT_EXPIRED, -4149, -1, "HY000", "Expired statement");
DEFINE_ERROR(OB_ERR_MIN_VALUE, -4150, -1, "42000", "Min value");
DEFINE_ERROR(OB_ERR_MAX_VALUE, -4151, -1, "42000", "Max value");
DEFINE_ERROR_EXT(OB_ERR_NULL_VALUE, -4152, -1, "42000", "Null value", "%s");
DEFINE_ERROR(OB_RESOURCE_OUT, -4153, ER_OUT_OF_RESOURCES, "53000", "Out of resource");
DEFINE_ERROR(OB_ERR_SQL_CLIENT, -4154, -1, "HY000", "Internal SQL client error");
DEFINE_ERROR(OB_META_TABLE_WITHOUT_USE_TABLE, -4155, -1, "HY000", "Meta table without use table");
DEFINE_ERROR(OB_DISCARD_PACKET, -4156, -1, "HY000", "Discard packet");
DEFINE_ERROR_EXT(OB_OPERATE_OVERFLOW, -4157, ER_DATA_OUT_OF_RANGE, "22003", "value is out of range", "%s value is out of range in '%s'");
DEFINE_ERROR_EXT(OB_INVALID_DATE_FORMAT, -4158, ER_TRUNCATED_WRONG_VALUE, "22007", "Incorrect value", "%s=%d must between %d and %d");
DEFINE_ERROR(OB_POOL_REGISTERED_FAILED, -4159, -1, "HY000", "register pool failed");
DEFINE_ERROR(OB_POOL_UNREGISTERED_FAILED, -4160, -1, "HY000", "unregister pool failed");
DEFINE_ERROR(OB_INVALID_ARGUMENT_NUM, -4161, -1, "42000", "Invalid argument num");
DEFINE_ERROR(OB_LEASE_NOT_ENOUGH, -4162, -1, "HY000", "reserved lease not enough");
DEFINE_ERROR(OB_LEASE_NOT_MATCH, -4163, -1, "HY000", "ups lease not match with rs");
DEFINE_ERROR(OB_UPS_SWITCH_NOT_HAPPEN, -4164, -1, "HY000", "ups switch not happen");
DEFINE_ERROR(OB_EMPTY_RESULT, -4165, -1, "HY000", "Empty result");
DEFINE_ERROR(OB_CACHE_NOT_HIT, -4166, -1, "HY000", "Cache not hit");
DEFINE_ERROR(OB_NESTED_LOOP_NOT_SUPPORT, -4167, -1, "HY000", "Nested loop not support");
DEFINE_ERROR(OB_LOG_INVALID_MOD_ID, -4168, -1, "HY000", "Invalid log module id");
DEFINE_ERROR_EXT(OB_LOG_MODULE_UNKNOWN, -4169, -1, "HY000", "Unknown module name", "Unknown module name. Invalid Setting:'%.*s'. Syntax:parMod.subMod:level, parMod.subMod:level");
DEFINE_ERROR_EXT(OB_LOG_LEVEL_INVALID, -4170, -1, "HY000", "Invalid level", "Invalid level. Invalid setting:'%.*s'. Syntax:parMod.subMod:level, parMod.subMod:level");
DEFINE_ERROR_EXT(OB_LOG_PARSER_SYNTAX_ERR, -4171, -1, "HY000", "Syntax to set log_level error", "Syntax to set log_level error. Invalid setting:'%.*s'. Syntax:parMod.subMod:level, parMod.subMod:level");
DEFINE_ERROR(OB_INDEX_OUT_OF_RANGE, -4172, -1, "HY000", "Index out of range");
DEFINE_ERROR(OB_INT_UNDERFLOW, -4173, -1, "HY000", "Int underflow");
DEFINE_ERROR_EXT(OB_UNKNOWN_CONNECTION, -4174, ER_NO_SUCH_THREAD, "HY000", "Unknown thread id", "Unknown thread id: %lu");
DEFINE_ERROR(OB_ERROR_OUT_OF_RANGE, -4175, -1, "42000", "Out of range");
DEFINE_ERROR(OB_CACHE_SHRINK_FAILED, -4176, -1, "HY001", "shrink cache failed, no available cache");
DEFINE_ERROR(OB_OLD_SCHEMA_VERSION, -4177, -1, "42000", "Schema version too old");
DEFINE_ERROR(OB_RELEASE_SCHEMA_ERROR, -4178, -1, "HY000", "Release schema error");
DEFINE_ERROR_EXT(OB_OP_NOT_ALLOW, -4179, -1, "HY000", "Operation not allowed now", "%s not allowed");
DEFINE_ERROR(OB_NO_EMPTY_ENTRY, -4180, -1, "HY000", "No empty entry");
DEFINE_ERROR(OB_ERR_ALREADY_EXISTS, -4181, -1, "42S01", "Already exist");
DEFINE_ERROR(OB_SEARCH_NOT_FOUND, -4182, -1, "HY000", "Value not found");
DEFINE_ERROR(OB_BEYOND_THE_RANGE, -4183, -1, "HY000", "Key out of range");
DEFINE_ERROR(OB_CS_OUTOF_DISK_SPACE, -4184, -1, "53100", "ChunkServer out of disk space");
DEFINE_ERROR(OB_COLUMN_GROUP_NOT_FOUND, -4185, -1, "HY000", "Column group not found");
DEFINE_ERROR(OB_CS_COMPRESS_LIB_ERROR, -4186, -1, "HY000", "ChunkServer failed to get compress library");
DEFINE_ERROR(OB_ITEM_NOT_MATCH, -4187, -1, "HY000", "Item not match");
DEFINE_ERROR(OB_SCHEDULER_TASK_CNT_MISMATCH, -4188, -1, "HY000", "Running task cnt and unfinished task cnt not consistent");
DEFINE_ERROR(OB_HASH_EXIST, -4200, -1, "HY000", "hash map/set entry exist");
DEFINE_ERROR(OB_HASH_NOT_EXIST, -4201, -1, "HY000", "hash map/set entry not exist");
DEFINE_ERROR(OB_HASH_GET_TIMEOUT, -4204, -1, "HY000", "hash map/set get timeout");
DEFINE_ERROR(OB_HASH_PLACEMENT_RETRY, -4205, -1, "HY000", "hash map/set retry");
DEFINE_ERROR(OB_HASH_FULL, -4206, -1, "HY000", "hash map/set full");
DEFINE_ERROR(OB_PACKET_PROCESSED, -4207, -1, "HY000", "packet processed");
DEFINE_ERROR(OB_WAIT_NEXT_TIMEOUT, -4208, -1, "HY000", "wait next packet timeout");
DEFINE_ERROR(OB_LEADER_NOT_EXIST, -4209, -1, "HY000", "partition has not leader");
DEFINE_ERROR(OB_PREPARE_MAJOR_FREEZE_FAILED, -4210, -1, "HY000", "prepare major freeze failed");
DEFINE_ERROR(OB_COMMIT_MAJOR_FREEZE_FAILED, -4211, -1, "HY000", "commit major freeze failed");
DEFINE_ERROR(OB_ABORT_MAJOR_FREEZE_FAILED, -4212, -1, "HY000", "abort major freeze failed");
DEFINE_ERROR(OB_MAJOR_FREEZE_NOT_FINISHED, -4213, -1, "HY000", "last major freeze not finish");
DEFINE_ERROR(OB_PARTITION_NOT_LEADER, -4214, -1, "HY000", "partition is not leader partition");
DEFINE_ERROR(OB_WAIT_MAJOR_FREEZE_RESPONSE_TIMEOUT, -4215, -1, "HY000", "wait major freeze response timeout");
DEFINE_ERROR(OB_CURL_ERROR, -4216, -1, "HY000", "curl error");
DEFINE_ERROR_EXT(OB_MAJOR_FREEZE_NOT_ALLOW, -4217, -1, "HY000", "Major freeze not allowed now", "%s");
DEFINE_ERROR(OB_PREPARE_FREEZE_FAILED, -4218, -1, "HY000", "prepare freeze failed");
DEFINE_ERROR_EXT(OB_INVALID_DATE_VALUE, -4219, ER_TRUNCATED_WRONG_VALUE, "22007", "Incorrect value", "Incorrect datetime value: '%s' for column '%s' at row %d");
DEFINE_ERROR(OB_INACTIVE_SQL_CLIENT, -4220, -1, "HY000", "Inactive sql client, only read allowed");
DEFINE_ERROR(OB_INACTIVE_RPC_PROXY, -4221, -1, "HY000", "Inactive rpc proxy, can not send RPC request");
DEFINE_ERROR(OB_INTERVAL_WITH_MONTH, -4222, -1, "42000", "Interval with year or month can not be converted to microseconds");
DEFINE_ERROR(OB_TOO_MANY_DATETIME_PARTS, -4223, -1, "42000", "Interval has too many datetime parts");
DEFINE_ERROR_EXT(OB_DATA_OUT_OF_RANGE, -4224, ER_WARN_DATA_OUT_OF_RANGE, "22003", "Out of range value for column", "Out of range value for column '%.*s' at row %lld");
DEFINE_ERROR(OB_PARTITION_NOT_EXIST, -4225, -1, "HY000", "Partition entry not exists");
DEFINE_ERROR_EXT(OB_ERR_TRUNCATED_WRONG_VALUE_FOR_FIELD, -4226, ER_TRUNCATED_WRONG_VALUE_FOR_FIELD, "HY000", "Incorrect integer value", "Incorrect integer value: '%.*s'");
DEFINE_ERROR_EXT(OB_ERR_NO_DEFAULT_FOR_FIELD, -4227, ER_NO_DEFAULT_FOR_FIELD, "HY000", "Field doesn't have a default value", "Field \'%s\' doesn't have a default value");
DEFINE_ERROR_EXT(OB_ERR_FIELD_SPECIFIED_TWICE, -4228, ER_FIELD_SPECIFIED_TWICE, "42000", "Column specified twice", "Column \'%s\' specified twice");
DEFINE_ERROR_EXT(OB_ERR_TOO_LONG_TABLE_COMMENT, -4229, ER_TOO_LONG_TABLE_COMMENT, "HY000", "Comment for table is too long", "Comment for table is too long (max = %ld)");
DEFINE_ERROR_EXT(OB_ERR_TOO_LONG_FIELD_COMMENT, -4230, ER_TOO_LONG_FIELD_COMMENT, "HY000", "Comment for field is too long", "Comment for field is too long (max = %ld)");
DEFINE_ERROR_EXT(OB_ERR_TOO_LONG_INDEX_COMMENT, -4231, ER_TOO_LONG_INDEX_COMMENT, "HY000", "Comment for index is too long", "Comment for index is too long (max = %ld)");
DEFINE_ERROR(OB_NOT_FOLLOWER, -4232, -1, "HY000", "The observer or zone is not a follower");
DEFINE_ERROR(OB_ERR_OUT_OF_LOWER_BOUND, -4233, -1, "HY000", "smaller than container lower bound");
DEFINE_ERROR(OB_ERR_OUT_OF_UPPER_BOUND, -4234, -1, "HY000", "bigger than container upper bound");
DEFINE_ERROR_EXT(OB_BAD_NULL_ERROR, -4235, ER_BAD_NULL_ERROR, "23000", "Column cannot be null", "Column '%.*s' cannot be null");
DEFINE_ERROR(OB_OBCONFIG_RETURN_ERROR, -4236, -1, "HY000", "ObConfig return error code");
DEFINE_ERROR(OB_OBCONFIG_APPNAME_MISMATCH, -4237, -1, "HY000", "Appname mismatch with obconfig result");
DEFINE_ERROR(OB_ERR_VIEW_SELECT_DERIVED, -4238, ER_VIEW_SELECT_DERIVED, "HY000", "View's SELECT contains a subquery in the FROM clause");
DEFINE_ERROR(OB_CANT_MJ_PATH, -4239, -1, "HY000", "Can not use merge-join to join the tables without join conditions");
DEFINE_ERROR(OB_ERR_NO_JOIN_ORDER_GENERATED, -4240, -1, "HY000", "No join order generated");
DEFINE_ERROR(OB_ERR_NO_PATH_GENERATED, -4241, -1, "HY000", "No join path generated");
DEFINE_ERROR(OB_ERR_WAIT_REMOTE_SCHEMA_REFRESH, -4242, -1, "HY000", "Schema error");
DEFINE_ERROR(OB_FILE_NOT_OPENED, -4243, -1, "HY000", "file not opened");
DEFINE_ERROR(OB_TIMER_TASK_HAS_SCHEDULED, -4244, -1, "HY000", "Timer task has been scheduled");
DEFINE_ERROR(OB_TIMER_TASK_HAS_NOT_SCHEDULED, -4245, -1, "HY000", "Timer task has not been scheduled");
DEFINE_ERROR(OB_PARSE_DEBUG_SYNC_ERROR, -4246, -1, "HY000", "parse debug sync string error");
DEFINE_ERROR(OB_UNKNOWN_DEBUG_SYNC_POINT, -4247, -1, "HY000", "unknown debug sync point");
DEFINE_ERROR(OB_ERR_INTERRUPTED, -4248, -1, "HY000", "task is interrupted while running");
DEFINE_ERROR(OB_ERR_DATA_TRUNCATED, -4249, WARN_DATA_TRUNCATED, "01000", "Data truncated for argument");
// used by modules in partition service only, and not returned to client
DEFINE_ERROR(OB_NOT_RUNNING, -4250, -1, "HY000", "module is not running");
DEFINE_ERROR(OB_INVALID_PARTITION, -4251, -1, "HY000", "partition not valid");
DEFINE_ERROR(OB_ERR_TIMEOUT_TRUNCATED, -4252, WARN_DATA_TRUNCATED, "01000", "Timeout value truncated to 102 years");
DEFINE_ERROR_EXT(OB_ERR_TOO_LONG_TENANT_COMMENT, -4253, -1, "HY000", "Comment for tenant is too long", "Comment for tenant is too long (max = %ld)");
DEFINE_ERROR(OB_ERR_NET_PACKET_TOO_LARGE, -4254, ER_NET_PACKET_TOO_LARGE, "08S01", "Got a packet bigger than \'max_allowed_packet\' bytes");
DEFINE_ERROR(OB_TRACE_DESC_NOT_EXIST, -4255, -1, "HY000", "trace log title or key not exist describle");
DEFINE_ERROR_EXT(OB_ERR_NO_DEFAULT, -4256, ER_NO_DEFAULT, "42000", "Variable doesn't have a default value", "Variable '%.*s' doesn't have a default value");
DEFINE_ERROR(OB_ERR_COMPRESS_DECOMPRESS_DATA, -4257, -1, "HY000", "compress data or decompress data failed");
DEFINE_ERROR_EXT(OB_ERR_INCORRECT_STRING_VALUE, -4258, ER_TRUNCATED_WRONG_VALUE_FOR_FIELD, "HY000", "Incorrect string value", "Incorrect string value for column '%.*s' at row %lld");
DEFINE_ERROR_EXT(OB_ERR_DISTRIBUTED_NOT_SUPPORTED, -4259, ER_NOT_SUPPORTED_YET, "0A000", "Not supported feature or function", "%s not supported");
DEFINE_ERROR(OB_IS_CHANGING_LEADER, -4260, -1, "HY000", "the partition is changing leader");
DEFINE_ERROR(OB_DATETIME_FUNCTION_OVERFLOW, -4261, ER_DATETIME_FUNCTION_OVERFLOW, "22008", "Datetime overflow");
DEFINE_ERROR_EXT(OB_ERR_DOUBLE_TRUNCATED, -4262, ER_TRUNCATED_WRONG_VALUE, "01000", "Truncated incorrect DOUBLE value", "Truncated incorrect DOUBLE value: '%.*s'");
DEFINE_ERROR_EXT(OB_MINOR_FREEZE_NOT_ALLOW, -4263, -1, "HY000", "Minor freeze not allowed now", "%s");
DEFINE_ERROR(OB_LOG_OUTOF_DISK_SPACE, -4264, -1, "HY000", "Log out of disk space");
DEFINE_ERROR(OB_RPC_CONNECT_ERROR, -4265, -1, "HY000", "Rpc connect error");
DEFINE_ERROR(OB_MINOR_MERGE_NOT_ALLOW, -4266, -1, "HY000", "minor merge not allow");
DEFINE_ERROR(OB_CACHE_INVALID, -4267, -1, "HY000", "Cache invalid");
DEFINE_ERROR(OB_REACH_SERVER_DATA_COPY_IN_CONCURRENCY_LIMIT, -4268, -1, "HY000", "reach server data copy in concurrency");
DEFINE_ERROR(OB_WORKING_PARTITION_EXIST, -4269, -1, "HY000", "Working partition entry already exists");
DEFINE_ERROR(OB_WORKING_PARTITION_NOT_EXIST, -4270, -1, "HY000", "Working partition entry does not exists");
DEFINE_ERROR(OB_LIBEASY_REACH_MEM_LIMIT, -4271, -1, "HY000", "LIBEASY reach memory limit");
DEFINE_ERROR_EXT(OB_MISS_ARGUMENT, -4272, ER_WRONG_ARGUMENTS, "HY000", "Miss argument", "Miss argument for %s");
////////////////////////////////////////////////////////////////
//error code for root server & server management -4500 ---- -5000
////////////////////////////////////////////////////////////////
DEFINE_ERROR(OB_IMPORT_NOT_IN_SERVER, -4505, -1, "HY000", "Import not in service");
DEFINE_ERROR(OB_CONVERT_ERROR, -4507, -1, "42000", "Convert error");
DEFINE_ERROR(OB_BYPASS_TIMEOUT, -4510, -1, "HY000", "Bypass timeout");
DEFINE_ERROR(OB_RS_STATE_NOT_ALLOW, -4512, -1, "HY000", "RootServer state error");
DEFINE_ERROR(OB_NO_REPLICA_VALID, -4515, -1, "HY000", "No replica is valid");
DEFINE_ERROR(OB_NO_NEED_UPDATE, -4517, -1, "HY000", "No need to update");
DEFINE_ERROR(OB_CACHE_TIMEOUT, -4518, -1, "HY000", "Cache timeout");
DEFINE_ERROR(OB_ITER_STOP, -4519, -1, "HY000", "Iteration was stopped");
DEFINE_ERROR(OB_ZONE_ALREADY_MASTER, -4523, -1, "HY000", "The zone is the master already");
DEFINE_ERROR(OB_IP_PORT_IS_NOT_SLAVE_ZONE, -4524, -1, "HY000", "Not slave zone");
DEFINE_ERROR(OB_ZONE_IS_NOT_SLAVE, -4525, -1, "HY000", "Not slave zone");
DEFINE_ERROR(OB_ZONE_IS_NOT_MASTER, -4526, -1, "HY000", "Not master zone");
DEFINE_ERROR(OB_CONFIG_NOT_SYNC, -4527, -1, "F0000", "Configuration not sync");
DEFINE_ERROR(OB_IP_PORT_IS_NOT_ZONE, -4528, -1, "42000", "Not a zone address");
DEFINE_ERROR(OB_MASTER_ZONE_NOT_EXIST, -4529, -1, "HY000", "Master zone not exist");
DEFINE_ERROR_EXT(OB_ZONE_INFO_NOT_EXIST, -4530, -1, "HY000", "Zone info not exist", "Zone info \'%s\' not exist");
DEFINE_ERROR(OB_GET_ZONE_MASTER_UPS_FAILED, -4531, -1, "HY000", "Failed to get master UpdateServer");
DEFINE_ERROR(OB_MULTIPLE_MASTER_ZONES_EXIST, -4532, -1, "HY000", "Multiple master zones");
DEFINE_ERROR(OB_INDEXING_ZONE_INVALID, -4533, -1, "HY000", "indexing zone is not exist anymore or not active");
DEFINE_ERROR(OB_ROOT_TABLE_RANGE_NOT_EXIST, -4537, -1, "HY000", "Tablet range not exist");
DEFINE_ERROR(OB_ROOT_MIGRATE_CONCURRENCY_FULL, -4538, -1, "HY000", "Migrate concurrency full");
DEFINE_ERROR(OB_ROOT_MIGRATE_INFO_NOT_FOUND, -4539, -1, "HY000", "Migrate info not found");
DEFINE_ERROR(OB_NOT_DATA_LOAD_TABLE, -4540, -1, "HY000", "No data to load");
DEFINE_ERROR(OB_DATA_LOAD_TABLE_DUPLICATED, -4541, -1, "HY000", "Duplicated table data to load");
DEFINE_ERROR(OB_ROOT_TABLE_ID_EXIST, -4542, -1, "HY000", "Table ID exist");
DEFINE_ERROR(OB_INDEX_TIMEOUT, -4543, -1, "HY000", "Building index timeout");
DEFINE_ERROR(OB_ROOT_NOT_INTEGRATED, -4544, -1, "42000", "Root not integrated");
DEFINE_ERROR(OB_INDEX_INELIGIBLE, -4545, -1, "HY000", "index data not unique");
DEFINE_ERROR(OB_REBALANCE_EXEC_TIMEOUT, -4546, -1, "HY000", "execute replication or migration task timeout");
DEFINE_ERROR(OB_MERGE_NOT_STARTED, -4547, -1, "HY000", "global merge not started");
DEFINE_ERROR(OB_MERGE_ALREADY_STARTED, -4548, -1, "HY000", "merge already started");
DEFINE_ERROR(OB_ROOTSERVICE_EXIST, -4549, -1, "HY000", "rootservice already exist");
DEFINE_ERROR(OB_RS_SHUTDOWN, -4550, -1, "HY000", "rootservice is shutdown");
DEFINE_ERROR(OB_SERVER_MIGRATE_IN_DENIED, -4551, -1, "HY000", "server migrate in denied");
DEFINE_ERROR(OB_REBALANCE_TASK_CANT_EXEC, -4552, -1, "HY000", "rebalance task can not executing now");
DEFINE_ERROR(OB_PARTITION_CNT_REACH_ROOTSERVER_LIMIT, -4553, -1, "HY000", "rootserver can not hold more partition");
DEFINE_ERROR(OB_DATA_SOURCE_NOT_EXIST, -4600, -1, "HY000", "Data source not exist");
DEFINE_ERROR(OB_DATA_SOURCE_TABLE_NOT_EXIST, -4601, -1, "HY000", "Data source table not exist");
DEFINE_ERROR(OB_DATA_SOURCE_RANGE_NOT_EXIST, -4602, -1, "HY000", "Data source range not exist");
DEFINE_ERROR(OB_DATA_SOURCE_DATA_NOT_EXIST, -4603, -1, "HY000", "Data source data not exist");
DEFINE_ERROR(OB_DATA_SOURCE_SYS_ERROR, -4604, -1, "HY000", "Data source sys error");
DEFINE_ERROR(OB_DATA_SOURCE_TIMEOUT, -4605, -1, "HY000", "Data source timeout");
DEFINE_ERROR(OB_DATA_SOURCE_CONCURRENCY_FULL, -4606, -1, "53000", "Data source concurrency full");
DEFINE_ERROR(OB_DATA_SOURCE_WRONG_URI_FORMAT, -4607, -1, "42000", "Data source wrong URI format");
DEFINE_ERROR(OB_SSTABLE_VERSION_UNEQUAL, -4608, -1, "42000", "SSTable version not equal");
DEFINE_ERROR(OB_UPS_RENEW_LEASE_NOT_ALLOWED, -4609, -1, "HY000", "ups should not renew its lease");
DEFINE_ERROR(OB_UPS_COUNT_OVER_LIMIT, -4610, -1, "HY000", "ups count over limit");
DEFINE_ERROR(OB_NO_UPS_MAJORITY, -4611, -1, "HY000", "ups not form a majority");
DEFINE_ERROR(OB_INDEX_COUNT_REACH_THE_LIMIT, -4613, -1, "HY000", "created index tables count has reach the limit:128");
DEFINE_ERROR(OB_TASK_EXPIRED, -4614, -1, "HY000", "task expired");
DEFINE_ERROR(OB_TABLEGROUP_NOT_EMPTY, -4615, -1, "HY000", "tablegroup is not empty");
DEFINE_ERROR(OB_INVALID_SERVER_STATUS, -4620, -1, "HY000", "server status is not valid");
DEFINE_ERROR(OB_WAIT_ELEC_LEADER_TIMEOUT, -4621, -1, "HY000", "wait elect partition leader timeout");
DEFINE_ERROR(OB_WAIT_ALL_RS_ONLINE_TIMEOUT, -4622, -1, "HY000", "wait all rs online timeout");
DEFINE_ERROR(OB_ALL_REPLICAS_ON_MERGE_ZONE, -4623, -1, "HY000", "all replicas of partition group are on zones to merge");
DEFINE_ERROR(OB_MACHINE_RESOURCE_NOT_ENOUGH, -4624, -1, "HY000", "machine resource is not enough to hold a new unit");
DEFINE_ERROR(OB_NOT_SERVER_CAN_HOLD_SOFTLY, -4625, -1, "HY000", "not server can hole the unit and not over soft limit");
DEFINE_ERROR_EXT(OB_RESOURCE_POOL_ALREADY_GRANTED, -4626, -1, "HY000", "resource pool has already been granted to a tenant", "resource pool \'%s\' has already been granted to a tenant");
DEFINE_ERROR(OB_SERVER_ALREADY_DELETED, -4628, -1, "HY000", "server has already been deleted");
DEFINE_ERROR(OB_SERVER_NOT_DELETING, -4629, -1, "HY000", "server is not in deleting status");
DEFINE_ERROR(OB_SERVER_NOT_IN_WHITE_LIST, -4630, -1, "HY000", "server not in server white list");
DEFINE_ERROR(OB_SERVER_ZONE_NOT_MATCH, -4631, -1, "HY000", "server zone not match");
DEFINE_ERROR(OB_OVER_ZONE_NUM_LIMIT, -4632, -1, "HY000", "zone num has reach max zone num");
DEFINE_ERROR(OB_ZONE_STATUS_NOT_MATCH, -4633, -1, "HY000", "zone status not match");
DEFINE_ERROR_EXT(OB_RESOURCE_UNIT_IS_REFERENCED, -4634, -1, "HY000", "resource unit is referenced by resource pool", "resource unit \'%s\' is referenced by some resource pool");
DEFINE_ERROR(OB_DIFFERENT_PRIMARY_ZONE, -4636, -1, "HY000", "table schema primary zone different with other table in sampe tablegroup");
DEFINE_ERROR(OB_SERVER_NOT_ACTIVE, -4637, -1, "HY000", "server is not active");
DEFINE_ERROR(OB_RS_NOT_MASTER, -4638, -1, "HY000", "The RootServer is not the master");
DEFINE_ERROR(OB_CANDIDATE_LIST_ERROR, -4639, -1, "HY000", "The candidate list is invalid");
DEFINE_ERROR(OB_PARTITION_ZONE_DUPLICATED, -4640, -1, "HY000", "The chosen partition servers belong to same zone.");
DEFINE_ERROR_EXT(OB_ZONE_DUPLICATED, -4641, -1, "HY000", "Duplicated zone in zone list", "Duplicated zone \'%s\' in zone list %s");
DEFINE_ERROR(OB_NOT_ALL_ZONE_ACTIVE, -4642, -1, "HY000", "Not all zone in zone list are active");
DEFINE_ERROR_EXT(OB_PRIMARY_ZONE_NOT_IN_ZONE_LIST, -4643, -1, "HY000", "primary zone not in zone list", "primary zone \'%s\' not in zone list %s");
DEFINE_ERROR(OB_REPLICA_NUM_NOT_MATCH, -4644, -1, "HY000", "replica num not same with zone count");
DEFINE_ERROR_EXT(OB_ZONE_LIST_POOL_LIST_NOT_MATCH, -4645, -1, "HY000", "zone list not a subset of  resource pool list", "zone list %s not a subset of resource pool zone list %s");
DEFINE_ERROR_EXT(OB_INVALID_TENANT_NAME, -4646, -1, "HY000", "tenant name is too long", "tenant name \'%s\' over max_tenant_name_length %ld");
DEFINE_ERROR(OB_EMPTY_RESOURCE_POOL_LIST, -4647, -1, "HY000", "resource pool list is empty");
DEFINE_ERROR_EXT(OB_RESOURCE_UNIT_NOT_EXIST, -4648, -1, "HY000", "resource unit not exist", "resource unit \'%s\' not exist");
DEFINE_ERROR_EXT(OB_RESOURCE_UNIT_EXIST, -4649, -1, "HY000", "resource unit already exist", "resource unit \'%s\' already exist");
DEFINE_ERROR_EXT(OB_RESOURCE_POOL_NOT_EXIST, -4650, -1, "HY000", "resource pool not exist", "resource pool \'%s\' not exist");
DEFINE_ERROR_EXT(OB_RESOURCE_POOL_EXIST, -4651, -1, "HY000", "resource pool already exist", "resource pool \'%s\' exist");
DEFINE_ERROR(OB_WAIT_LEADER_SWITCH_TIMEOUT, -4652, -1, "HY000", "wait leader switch timeout");
DEFINE_ERROR(OB_LOCATION_NOT_EXIST, -4653, -1, "HY000", "location not exist");
DEFINE_ERROR(OB_LOCATION_LEADER_NOT_EXIST, -4654, -1, "HY000", "location leader not exist");
DEFINE_ERROR(OB_ZONE_NOT_ACTIVE, -4655, -1, "HY000", "zone not active");
DEFINE_ERROR(OB_UNIT_NUM_OVER_SERVER_COUNT, -4656, -1, "HY000", "resource pool unit num is bigger than zone server count");
DEFINE_ERROR_EXT(OB_POOL_SERVER_INTERSECT, -4657, -1, "HY000", "resource pool list unit server intersect", "resource pool list %s unit servers intersect");
DEFINE_ERROR_EXT(OB_NOT_SINGLE_RESOURCE_POOL, -4658, -1, "HY000", "create tenant only support single resource pool now", "create tenant only support single resource pool now, but pool list is %s");
DEFINE_ERROR_EXT(OB_INVALID_RESOURCE_UNIT, -4659, -1, "HY000", "invalid resource unit", "invalid resource unit, %s\'s min value is %s");
DEFINE_ERROR_EXT(OB_STOP_SERVER_IN_MULTIPLE_ZONES, -4660, -1, "HY000", "Can not stop server in multiple zones", "Can not stop server in multiple zones, there are already servers stopped in zone:%s");
DEFINE_ERROR(OB_SESSION_ENTRY_EXIST, -4661, -1, "HY000", "Session already exist");
DEFINE_ERROR_EXT(OB_GOT_SIGNAL_ABORTING, -4662, ER_GOT_SIGNAL, "01000", "Got signal. Aborting!", "%s: Got signal %d. Aborting!");
DEFINE_ERROR(OB_SERVER_NOT_ALIVE, -4663, -1, "HY000", "server is not alive");
DEFINE_ERROR(OB_GET_LOCATION_TIME_OUT, -4664, 4012, "HY000", "Timeout");
DEFINE_ERROR(OB_UNIT_IS_MIGRATING, -4665, -1, "HY000", "Unit is migrating, can not migrate again");
DEFINE_ERROR_EXT(OB_CLUSTER_NO_MATCH, -4666, -1, "HY000", "cluster name is not match", "cluster name is not match to \'%s\'");
DEFINE_ERROR(OB_CHECK_ZONE_MERGE_ORDER, -4667, -1, "HY000", "Please check new zone in zone_merge_order. You can show parameters like 'zone_merge_order'");
DEFINE_ERROR_EXT(OB_ERR_ZONE_NOT_EMPTY, -4668, -1, "HY000", "zone not empty", "The zone is not empty and can not be deleted. You should delete the servers of the zone. There are %ld servers alive and %ld not alive.");
////////////////////////////////////////////////////////////////
// SQL & Schema specific error code, -5000 ~ -6000
////////////////////////////////////////////////////////////////
DEFINE_ERROR(OB_ERR_PARSER_INIT, -5000, ER_PARSE_ERROR, "0B000", "Failed to init SQL parser");
DEFINE_ERROR_EXT(OB_ERR_PARSE_SQL, -5001, ER_PARSE_ERROR, "42000", "Parse error", "%s near \'%.*s\' at line %d");
DEFINE_ERROR(OB_ERR_RESOLVE_SQL, -5002, -1, "HY000", "Resolve error");
DEFINE_ERROR(OB_ERR_GEN_PLAN, -5003, -1, "HY000", "Generate plan error");
DEFINE_ERROR(OB_ERR_PARSER_SYNTAX, -5006, ER_SYNTAX_ERROR, "42000", "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use");
DEFINE_ERROR(OB_ERR_COLUMN_SIZE, -5007, ER_WRONG_NUMBER_OF_COLUMNS_IN_SELECT, "21000", "The used SELECT statements have a different number of columns");
// xiyu@TODO: will be replaced by OB_NON_UNIQ_ERROR
DEFINE_ERROR_EXT(OB_ERR_COLUMN_DUPLICATE, -5008, ER_DUP_FIELDNAME, "42S21", "Duplicate column name", "Duplicate column name '%.*s'");
DEFINE_ERROR(OB_ERR_OPERATOR_UNKNOWN, -5010, -1, "21000", "Unknown operator");
DEFINE_ERROR(OB_ERR_STAR_DUPLICATE, -5011, -1, "42000", "Duplicated star");
DEFINE_ERROR_EXT(OB_ERR_ILLEGAL_ID, -5012, -1, "HY000", "Illegal ID", "%s");
DEFINE_ERROR(OB_ERR_ILLEGAL_VALUE, -5014, -1, "HY000", "Illegal value");
DEFINE_ERROR(OB_ERR_COLUMN_AMBIGUOUS, -5015, ER_AMBIGUOUS_FIELD_TERM, "42000", "Ambiguous column");
DEFINE_ERROR(OB_ERR_LOGICAL_PLAN_FAILD, -5016, -1, "HY000", "Generate logical plan error");
DEFINE_ERROR(OB_ERR_SCHEMA_UNSET, -5017, -1, "HY000", "Schema not set");
DEFINE_ERROR(OB_ERR_ILLEGAL_NAME, -5018, -1, "42000", "Illegal name");
DEFINE_ERROR_EXT(OB_ERR_TABLE_EXIST, -5020, ER_TABLE_EXISTS_ERROR, "42S01", "Table already exists", "Table '%.*s' already exists");
DEFINE_ERROR_EXT(OB_TABLE_NOT_EXIST, -5019, ER_NO_SUCH_TABLE, "42S02", "Table doesn\'t exist", "Table \'%s.%s\' doesn\'t exist");
DEFINE_ERROR(OB_ERR_EXPR_UNKNOWN, -5022, -1, "42000", "Unknown expression");
DEFINE_ERROR_EXT(OB_ERR_ILLEGAL_TYPE, -5023, -1, "S1004", "Illegal type", "unsupport MySQL type %d. Maybe you should use java.sql.Timestamp instead of java.util.Date.");
DEFINE_ERROR_EXT(OB_ERR_KEY_NAME_DUPLICATE, -5025, ER_DUP_KEYNAME, "42000", "Duplicated key name", "Duplicate key name \'%.*s\'");
DEFINE_ERROR_EXT(OB_ERR_PRIMARY_KEY_DUPLICATE, -5024, ER_DUP_ENTRY, "23000", "Duplicated primary key", "Duplicate entry \'%s\' for key \'%.*s\'");
DEFINE_ERROR(OB_ERR_CREATETIME_DUPLICATE, -5026, -1, "42000", "Duplicated createtime");
DEFINE_ERROR(OB_ERR_MODIFYTIME_DUPLICATE, -5027, -1, "42000", "Duplicated modifytime");
DEFINE_ERROR(OB_ERR_ILLEGAL_INDEX, -5028, ER_NO_SUCH_INDEX, "42S12", "Illegal index");
DEFINE_ERROR(OB_ERR_INVALID_SCHEMA, -5029, -1, "HY000", "Invalid schema");
DEFINE_ERROR(OB_ERR_INSERT_NULL_ROWKEY, -5030, ER_PRIMARY_CANT_HAVE_NULL, "42000", "Insert null rowkey");
DEFINE_ERROR(OB_ERR_COLUMN_NOT_FOUND, -5031, -1, "HY000", "Column not found");
DEFINE_ERROR(OB_ERR_DELETE_NULL_ROWKEY, -5032, -1, "23000", "Delete null rowkey");
DEFINE_ERROR(OB_ERR_USER_EMPTY, -5034, -1, "01007", "No user");
DEFINE_ERROR(OB_ERR_USER_NOT_EXIST, -5035, ER_NO_SUCH_USER, "01007", "User not exist");
DEFINE_ERROR_EXT(OB_ERR_NO_PRIVILEGE, -5036, ER_SPECIFIC_ACCESS_DENIED_ERROR, "42501", "Access denied", "Access denied; you need (at least one of) the %s privilege(s) for this operation");
DEFINE_ERROR(OB_ERR_NO_AVAILABLE_PRIVILEGE_ENTRY, -5037, -1, "HY000", "No privilege entry");
DEFINE_ERROR(OB_ERR_WRONG_PASSWORD, -5038, ER_PASSWORD_NO_MATCH, "42000", "Incorrect password");
DEFINE_ERROR(OB_ERR_USER_IS_LOCKED, -5039, -1, "01007", "User locked");
DEFINE_ERROR(OB_ERR_UPDATE_ROWKEY_COLUMN, -5040, -1, "42000", "Can not update rowkey column");
DEFINE_ERROR(OB_ERR_UPDATE_JOIN_COLUMN, -5041, -1, "42000", "Can not update join column");
DEFINE_ERROR_EXT(OB_ERR_INVALID_COLUMN_NUM, -5042, ER_OPERAND_COLUMNS, "21000", "Invalid column number", "Operand should contain %d column(s)");
DEFINE_ERROR_EXT(OB_ERR_PREPARE_STMT_NOT_FOUND, -5043, ER_UNKNOWN_STMT_HANDLER, "HY007", "Unknown prepared statement", "statement not prepared, stmt_id=%u");
DEFINE_ERROR_EXT(OB_ERR_SYS_VARIABLE_UNKNOWN, -5044, ER_UNKNOWN_SYSTEM_VARIABLE, "HY000", "Unknown system variable", "Unknown system variable '%.*s'");
DEFINE_ERROR(OB_ERR_OLDER_PRIVILEGE_VERSION, -5046, -1, "HY000", "Older privilege version");
DEFINE_ERROR_EXT(OB_ERR_LACK_OF_ROWKEY_COL, -5047, ER_REQUIRES_PRIMARY_KEY, "42000", "No rowkey column specified", "Primary key column(s) not specified in the WHERE clause");
DEFINE_ERROR(OB_ERR_USER_EXIST, -5050, -1, "42710", "User exists");
DEFINE_ERROR(OB_ERR_PASSWORD_EMPTY, -5051, -1, "HY000", "Empty password");
DEFINE_ERROR(OB_ERR_GRANT_PRIVILEGES_TO_CREATE_TABLE, -5052, -1, "42000", "Failed to grant privelege");
DEFINE_ERROR_EXT(OB_ERR_WRONG_DYNAMIC_PARAM, -5053, -1, "HY093", "Wrong dynamic parameters", "Incorrect arguments number to EXECUTE, need %ld arguments but give %ld");
DEFINE_ERROR_EXT(OB_ERR_PARAM_SIZE, -5054, ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT, "42000", "Incorrect parameter count", "Incorrect parameter count in the call to native function '%.*s'");
DEFINE_ERROR_EXT(OB_ERR_FUNCTION_UNKNOWN, -5055, ER_SP_DOES_NOT_EXIST, "42000", "FUNCTION does not exist", "%s %s does not exist");
DEFINE_ERROR(OB_ERR_CREAT_MODIFY_TIME_COLUMN, -5056, -1, "23000", "CreateTime or ModifyTime column cannot be modified");
DEFINE_ERROR(OB_ERR_MODIFY_PRIMARY_KEY, -5057, -1, "23000", "Primary key cannot be modified");
DEFINE_ERROR(OB_ERR_PARAM_DUPLICATE, -5058, -1, "42000", "Duplicated parameters");
DEFINE_ERROR(OB_ERR_TOO_MANY_SESSIONS, -5059, ER_TOO_MANY_USER_CONNECTIONS, "42000", "Too many sessions");
DEFINE_ERROR(OB_ERR_TOO_MANY_PS, -5061, -1, "54023", "Too many prepared statements");
DEFINE_ERROR(OB_ERR_HINT_UNKNOWN, -5063, -1, "42000", "Unknown hint");
DEFINE_ERROR(OB_ERR_WHEN_UNSATISFIED, -5064, -1, "23000", "When condition not satisfied");
DEFINE_ERROR(OB_ERR_QUERY_INTERRUPTED, -5065, ER_QUERY_INTERRUPTED, "70100", "Query execution was interrupted");
DEFINE_ERROR(OB_ERR_SESSION_INTERRUPTED, -5066, -1, "HY000", "Session interrupted");
DEFINE_ERROR(OB_ERR_UNKNOWN_SESSION_ID, -5067, -1, "HY000", "Unknown session ID");
DEFINE_ERROR(OB_ERR_PROTOCOL_NOT_RECOGNIZE, -5068, -1, "HY000", "Incorrect protocol");
DEFINE_ERROR(OB_ERR_WRITE_AUTH_ERROR, -5069, -1, "HY000", "Write auth packet error");
DEFINE_ERROR(OB_ERR_PARSE_JOIN_INFO, -5070, -1, "42000", "Wrong join info")
DEFINE_ERROR(OB_ERR_ALTER_INDEX_COLUMN, -5071, -1, "42000", "Cannot alter index column");
DEFINE_ERROR(OB_ERR_MODIFY_INDEX_TABLE, -5072, -1, "42000", "Cannot modify index table");
DEFINE_ERROR(OB_ERR_INDEX_UNAVAILABLE, -5073, ER_NO_SUCH_INDEX, "42000", "Index unavailable");
DEFINE_ERROR(OB_ERR_NOP_VALUE, -5074, -1, "23000", "NOP cannot be used here");
DEFINE_ERROR(OB_ERR_PS_TOO_MANY_PARAM, -5080, ER_PS_MANY_PARAM, "54000", "Prepared statement contains too many placeholders");
DEFINE_ERROR(OB_ERR_READ_ONLY, -5081, -1, "25000", "The server is read only now");
DEFINE_ERROR_EXT(OB_ERR_INVALID_TYPE_FOR_OP, -5083, -1, "22000", "Invalid data type for the operation", "invalid obj type for type promotion, left_type=%d right_type=%d");
DEFINE_ERROR(OB_ERR_CAST_VARCHAR_TO_BOOL, -5084, -1, "22000", "Can not cast varchar value to bool type");
DEFINE_ERROR(OB_ERR_CAST_VARCHAR_TO_NUMBER, -5085, -1, "22000", "Not a number Can not cast varchar value to number type");
DEFINE_ERROR(OB_ERR_CAST_VARCHAR_TO_TIME, -5086, -1, "22000", "Not timestamp Can not cast varchar value to timestamp type");
DEFINE_ERROR(OB_ERR_CAST_NUMBER_OVERFLOW, -5087, -1, "22000", "Result value was out of range when cast to number");
DEFINE_ERROR_EXT(OB_INTEGER_PRECISION_OVERFLOW, -5088, -1, "22000", "Result value was out of range when cast varchar to number", "value larger than specified precision(%ld,%ld) allowed for this column");
DEFINE_ERROR_EXT(OB_DECIMAL_PRECISION_OVERFLOW, -5089, -1, "22000", "Result value was out of range when cast varchar to number", "value(%s) larger than specified precision(%ld,%ld) allowed for this column");
DEFINE_ERROR(OB_SCHEMA_NUMBER_PRECISION_OVERFLOW, -5090, -1, "22000", "Precision was out of range");
DEFINE_ERROR(OB_SCHEMA_NUMBER_SCALE_OVERFLOW, -5091, -1, "22000", "Scale value was out of range");
DEFINE_ERROR(OB_ERR_INDEX_UNKNOWN, -5092, -1, "42000", "Unknown index");
DEFINE_ERROR(OB_NUMERIC_OVERFLOW, -5093, -1, "22000", "numeric overflow");
DEFINE_ERROR(OB_ERR_TOO_MANY_JOIN_TABLES, -5094, -1, "HY000", "too many joined tables");
DEFINE_ERROR_EXT(OB_ERR_VARCHAR_TOO_LONG, -5098, -1, "22001", "Varchar value is too long for the column", "Data too long(%d>%ld) for column '%s'");
DEFINE_ERROR(OB_ERR_SYS_CONFIG_UNKNOWN, -5099, -1, "42000", "System config unknown");
DEFINE_ERROR_EXT(OB_ERR_LOCAL_VARIABLE, -5100, ER_LOCAL_VARIABLE, "HY000", "Local variable", "Variable \'%.*s\' is a SESSION variable and can't be used with SET GLOBAL");
DEFINE_ERROR_EXT(OB_ERR_GLOBAL_VARIABLE, -5101, ER_GLOBAL_VARIABLE, "HY000", "Global variable", "Variable \'%.*s\' is a GLOBAL variable and should be set with SET GLOBAL");
DEFINE_ERROR_EXT(OB_ERR_VARIABLE_IS_READONLY, -5102, ER_VARIABLE_IS_READONLY, "HY000", "variable is read only", "%.*s variable '%.*s' is read-only. Use SET %.*s to assign the value");
DEFINE_ERROR_EXT(OB_ERR_INCORRECT_GLOBAL_LOCAL_VAR, -5103, ER_INCORRECT_GLOBAL_LOCAL_VAR, "HY000", "incorrect global or local variable", "Variable '%.*s' is a %.*s variable");
DEFINE_ERROR_EXT(OB_ERR_EXPIRE_INFO_TOO_LONG, -5104, -1, "42000", "Expire expression too long", "length(%d) of expire_info is larger than the max allowed(%ld)");
DEFINE_ERROR_EXT(OB_ERR_EXPIRE_COND_TOO_LONG, -5105, -1, "42000", "Expire condition too long", "total length(%ld) of expire_info and its expression is larger than the max allowed(%ld)");
DEFINE_ERROR_EXT(OB_INVALID_ARGUMENT_FOR_EXTRACT, -5106, -1, "42000", "Invalid argument for extract()", "EXTRACT() expected timestamp or a string as date argument");
DEFINE_ERROR_EXT(OB_INVALID_ARGUMENT_FOR_IS, -5107, -1, "42000", "Invalid argument for IS operator", "Invalid operand type for IS operator, lval=%s");
DEFINE_ERROR_EXT(OB_INVALID_ARGUMENT_FOR_LENGTH, -5108, -1, "42000", "Invalid argument for length()", "function LENGTH() expected a varchar argument");
DEFINE_ERROR_EXT(OB_INVALID_ARGUMENT_FOR_SUBSTR, -5109, -1, "42000", "Invalid argument for substr()", "invalid input format. ret=%d text=%s start=%s length=%s");
DEFINE_ERROR_EXT(OB_INVALID_ARGUMENT_FOR_TIME_TO_USEC, -5110, -1, "42000", "Invalid argument for time_to_usec()", "TIME_TO_USEC() expected timestamp or a string as date argument");
DEFINE_ERROR_EXT(OB_INVALID_ARGUMENT_FOR_USEC_TO_TIME, -5111, -1, "42000", "Invalid argument for usec_to_time()", "USEC_TO_TIME expected a interger number as usec argument");
DEFINE_ERROR_EXT(OB_ERR_USER_VARIABLE_UNKNOWN, -5112, -1, "42P01", "Unknown user variable", "Variable %.*s does not exists");
DEFINE_ERROR_EXT(OB_ILLEGAL_USAGE_OF_MERGING_FROZEN_TIME, -5113, -1, "42000", "Illegal usage of merging_frozen_time()", "MERGING_FROZEN_TIME() system function only be used in daily merging.");
DEFINE_ERROR_EXT(OB_INVALID_NUMERIC, -5114, -1, "42000", "Invalid numeric", "Invalid numeric char '%c'");
DEFINE_ERROR(OB_ERR_REGEXP_ERROR, -5115, ER_REGEXP_ERROR, "42000", "Got error 'empty (sub)expression' from regexp");
DEFINE_ERROR(OB_SQL_LOG_OP_SETCHILD_OVERFLOW, -5116, -1, "HY000", "Logical operator child index overflow");
DEFINE_ERROR(OB_SQL_EXPLAIN_FAILED, -5117, -1, "HY000", "fail to explain plan");
DEFINE_ERROR(OB_SQL_OPT_COPY_OP_FAILED, -5118, -1, "HY000", "fail to copy logical operator");
DEFINE_ERROR(OB_SQL_OPT_GEN_PLAN_FALIED, -5119, -1, "HY000", "fail to generate plan");;
DEFINE_ERROR(OB_SQL_OPT_CREATE_RAWEXPR_FAILED, -5120, -1,  "HY000", "fail to create raw expr");
DEFINE_ERROR(OB_SQL_OPT_JOIN_ORDER_FAILED, -5121, -1,  "HY000", "fail to generate join order");
DEFINE_ERROR(OB_SQL_OPT_ERROR, -5122, -1,  "HY000", "optimizer general error");
DEFINE_ERROR(OB_SQL_RESOLVER_NO_MEMORY, -5130, -1, "HY000", "sql resolver no memory");
DEFINE_ERROR(OB_SQL_DML_ONLY, -5131, -1, "HY000", "plan cache support dml only");
DEFINE_ERROR(OB_ERR_NO_GRANT, -5133, -1, "42000", "No such grant defined");
DEFINE_ERROR(OB_ERR_NO_DB_SELECTED, -5134, ER_NO_DB_ERROR, "3D000", "No database selected");
DEFINE_ERROR(OB_SQL_PC_OVERFLOW, -5135, -1, "HY000", "plan cache is overflow");
DEFINE_ERROR(OB_SQL_PC_PLAN_DUPLICATE, -5136, -1, "HY000", "plan exists in plan cache already");
DEFINE_ERROR(OB_SQL_PC_PLAN_EXPIRE, -5137, -1, "HY000", "plan is expired");
DEFINE_ERROR(OB_SQL_PC_NOT_EXIST, -5138, -1, "HY000", "no plan exist");
DEFINE_ERROR(OB_SQL_PARAMS_LIMIT, -5139, -1, "HY000", "too many params, plan cache not support" );
DEFINE_ERROR(OB_SQL_PC_PLAN_SIZE_LIMIT, -5140, -1, "HY000", "plan is too big to add to plan cache");
DEFINE_ERROR_EXT(OB_ERR_UNKNOWN_CHARSET, -5142, ER_UNKNOWN_CHARACTER_SET, "42000", "Unknown character set", "Unknown character set: '%.*s'");
DEFINE_ERROR_EXT(OB_ERR_UNKNOWN_COLLATION, -5143, ER_UNKNOWN_COLLATION, "HY000", "Unknown collation", "Unknown collation: '%.*s'");
DEFINE_ERROR_EXT(OB_ERR_COLLATION_MISMATCH, -5144, ER_COLLATION_CHARSET_MISMATCH, "42000", "The collation is not valid for the character set", "COLLATION '%.*s' is not valid for CHARACTER SET '%.*s'");
DEFINE_ERROR_EXT(OB_ERR_WRONG_VALUE_FOR_VAR, -5145, ER_WRONG_VALUE_FOR_VAR, "42000", "Variable can't be set to the value", "Variable \'%.*s\' can't be set to the value of \'%.*s\'");
DEFINE_ERROR_EXT(OB_UNKNOWN_PARTITION, -5146, ER_UNKNOWN_PARTITION, "HY000", "Unknown partition", "Unkown partition '%.*s' in table '%.*s'");
DEFINE_ERROR(OB_PARTITION_NOT_MATCH, -5147, ER_ROW_DOES_NOT_MATCH_GIVEN_PARTITION_SET, "HY000", "Found a row not matching the given partition set");
DEFINE_ERROR(OB_ER_PASSWD_LENGTH, -5148, -1, "HY000", " Password hash should be a 40-digit hexadecimal number");
DEFINE_ERROR(OB_ERR_INSERT_INNER_JOIN_COLUMN, -5149, -1, "07000", "Insert inner join column error");
DEFINE_ERROR(OB_TENANT_NOT_IN_SERVER, -5150, -1, "HY000", "Tenant not in this server");
DEFINE_ERROR(OB_TABLEGROUP_NOT_EXIST, -5151, -1, "42P01", "tablegroup not exist");
DEFINE_ERROR(OB_SUBQUERY_TOO_MANY_ROW, -5153, ER_SUBQUERY_NO_1_ROW, "21000", "Subquery returns more than 1 row");
DEFINE_ERROR_EXT(OB_ERR_BAD_DATABASE, -5154, ER_BAD_DB_ERROR, "42000", "Unknown database", "Unknown database '%.*s'");
DEFINE_ERROR_EXT(OB_CANNOT_USER, -5155, ER_CANNOT_USER, "HY000", "User operation failed", "Operation %.*s failed for %.*s");
DEFINE_ERROR_EXT(OB_TENANT_EXIST, -5156, -1, "HY000", "tenant already exist", "tenant \'%s\' already exist");
DEFINE_ERROR_EXT(OB_TENANT_NOT_EXIST, -5157, -1, "HY000", "Unknown tenant", "Unknown tenant '%.*s'");
DEFINE_ERROR_EXT(OB_DATABASE_EXIST, -5158, ER_DB_CREATE_EXISTS, "HY000", "Can't create database;database exists", "Can't create database '%.*s'; database exists");
DEFINE_ERROR(OB_TABLEGROUP_EXIST, -5159, -1, "HY000", "tablegroup already exist");
DEFINE_ERROR(OB_ERR_INVALID_TENANT_NAME, -5160, -1, "HY000", "invalid tenant name specified in connection string");
DEFINE_ERROR(OB_EMPTY_TENANT, -5161, -1, "HY000", "tenant is empty");
DEFINE_ERROR_EXT(OB_WRONG_DB_NAME, -5162, ER_WRONG_DB_NAME, "42000", "Incorrect database name", "Incorrect database name '%.*s'");
DEFINE_ERROR_EXT(OB_WRONG_TABLE_NAME, -5163, ER_WRONG_TABLE_NAME, "42000", "Incorrect table name", "Incorrect table name '%.*s'");
DEFINE_ERROR_EXT(OB_WRONG_COLUMN_NAME, -5164, ER_WRONG_COLUMN_NAME, "42000", "Incorrect column name", "Incorrect column name '%.*s'");
DEFINE_ERROR_EXT(OB_ERR_COLUMN_SPEC, -5165, ER_WRONG_FIELD_SPEC, "42000", "Incorrect column specifier", "Incorrect column specifier for column '%.*s'");
DEFINE_ERROR_EXT(OB_ERR_DB_DROP_EXISTS, -5166, ER_DB_DROP_EXISTS, "HY000", "Can't drop database;database doesn't exist", "Can't drop database '%.*s'; database doesn't exist");
DEFINE_ERROR_EXT(OB_ERR_DATA_TOO_LONG, -5167, ER_DATA_TOO_LONG, "22001", "Data too long for column", "Data too long for column '%.*s' at row %lld");
DEFINE_ERROR_EXT(OB_ERR_WRONG_VALUE_COUNT_ON_ROW, -5168, ER_WRONG_VALUE_COUNT_ON_ROW, "21S01", "column count does not match value count", "column count does not match value count at row '%d'");
DEFINE_ERROR(OB_ERR_CREATE_USER_WITH_GRANT, -5169, ER_CANT_CREATE_USER_WITH_GRANT, "42000", "You are not allowed to create a user with GRANT");
DEFINE_ERROR_EXT(OB_ERR_NO_DB_PRIVILEGE, -5170, ER_DBACCESS_DENIED_ERROR, "42000", "Access denied for user to database", "Access denied for user '%.*s'@'%.*s' to database '%.*s'");
DEFINE_ERROR_EXT(OB_ERR_NO_TABLE_PRIVILEGE, -5171, ER_TABLEACCESS_DENIED_ERROR, "42000", "Command denied to user for table", "%.*s command denied to user '%.*s'@'%.*s' for table '%.*s'");
DEFINE_ERROR_EXT(OB_INVALID_ON_UPDATE, -5172, ER_INVALID_ON_UPDATE, "HY000", "Invalid ON UPDATE clause", "Invalid ON UPDATE clause for \'%s\' column");
DEFINE_ERROR_EXT(OB_INVALID_DEFAULT, -5173, ER_INVALID_DEFAULT, "42000", "Invalid default value", "Invalid default value for \'%.*s\'");
DEFINE_ERROR_EXT(OB_ERR_UPDATE_TABLE_USED, -5174, ER_UPDATE_TABLE_USED, "HY000", "Update table used", "You can\'t specify target table \'%s\' for update in FROM clause");
DEFINE_ERROR_EXT(OB_ERR_COULUMN_VALUE_NOT_MATCH, -5175, ER_WRONG_VALUE_COUNT_ON_ROW, "21S01", "Column count doesn\'t match value count", "Column count doesn\'t match value count at row %ld");
DEFINE_ERROR(OB_ERR_INVALID_GROUP_FUNC_USE, -5176, ER_INVALID_GROUP_FUNC_USE, "HY000", "Invalid use of group function");
DEFINE_ERROR_EXT(OB_CANT_AGGREGATE_2COLLATIONS, -5177, ER_CANT_AGGREGATE_2COLLATIONS, "HY000", "Illegal mix of collations", "Illegal mix of collations");
DEFINE_ERROR_EXT(OB_ERR_FIELD_TYPE_NOT_ALLOWED_AS_PARTITION_FIELD, -5178, ER_FIELD_TYPE_NOT_ALLOWED_AS_PARTITION_FIELD, "HY000", "Field is of a not allowed type for this type of partitioning", "Field \'%.*s\' is of a not allowed type for this type of partitioning");
DEFINE_ERROR_EXT(OB_ERR_TOO_LONG_IDENT, -5179, ER_TOO_LONG_IDENT, "42000", "Identifier name is too long", "Identifier name \'%.*s\' is too long");
DEFINE_ERROR_EXT(OB_ERR_WRONG_TYPE_FOR_VAR, -5180, ER_WRONG_TYPE_FOR_VAR, "42000", "Incorrect argument type to variable", "Incorrect argument type to variable '%.*s'");
DEFINE_ERROR_EXT(OB_WRONG_USER_NAME_LENGTH, -5181, ER_WRONG_STRING_LENGTH, "HY000", "String is too long for user_name (should be no longer than 16)", "String '%.*s' is too long for user name (should be no longer than 16)");
DEFINE_ERROR(OB_ERR_PRIV_USAGE, -5182, ER_WRONG_USAGE, "HY000", "Incorrect usage of DB GRANT and GLOBAL PRIVILEGES");
DEFINE_ERROR(OB_ILLEGAL_GRANT_FOR_TABLE, -5183, ER_ILLEGAL_GRANT_FOR_TABLE, "42000", "Illegal GRANT/REVOKE command; please consult the manual to see which privileges can be used");
DEFINE_ERROR(OB_ERR_REACH_AUTOINC_MAX, -5184, ER_AUTOINC_READ_FAILED, "HY000", "Failed to read auto-increment value from storage engine");
DEFINE_ERROR(OB_ERR_NO_TABLES_USED, -5185, ER_NO_TABLES_USED, "HY000", "No tables used");
DEFINE_ERROR(OB_CANT_REMOVE_ALL_FIELDS, -5187, ER_CANT_REMOVE_ALL_FIELDS, "42000", "You can't delete all columns with ALTER TABLE; use DROP TABLE instead");
DEFINE_ERROR(OB_TOO_MANY_PARTITIONS_ERROR, -5188, ER_TOO_MANY_PARTITIONS_ERROR, "HY000", "Too many partitions (including subpartitions) were defined", "Too many partitions (including subpartitions) were defined")
DEFINE_ERROR(OB_NO_PARTS_ERROR, -5189, ER_NO_PARTS_ERROR, "HY000", "Number of partitions = 0 is not an allowed value", "Number of partitions = 0 is not an allowed value");
DEFINE_ERROR(OB_WRONG_SUB_KEY, -5190, ER_WRONG_SUB_KEY, "HY000", "Incorrect prefix key; the used key part isn't a string, the used length is longer than the key part, or the storage engine doesn't support unique prefix keys");
DEFINE_ERROR_EXT(OB_KEY_PART_0, -5191, ER_KEY_PART_0, "HY000", "Key part length cannot be 0", "Key part \'%.*s\' length cannot be 0");
DEFINE_ERROR_EXT(OB_ERR_UNKNOWN_TIME_ZONE, -5192, ER_UNKNOWN_TIME_ZONE, "HY000", "Unknown or incorrect time zone", "Unknown or incorrect time zone: \'%.*s\'");
DEFINE_ERROR(OB_ERR_WRONG_AUTO_KEY, -5193, ER_WRONG_AUTO_KEY, "42000", "Incorrect table definition; there can be only one auto column");
DEFINE_ERROR_EXT(OB_ERR_TOO_MANY_KEYS, -5194, ER_TOO_MANY_KEYS, "42000","Too many keys specified", "Too many keys specified; max %d keys allowed");
DEFINE_ERROR_EXT(OB_ERR_TOO_MANY_ROWKEY_COLUMNS, -5195, ER_TOO_MANY_KEY_PARTS, "42000","Too many key parts specified", "Too many key parts specified; max %d parts allowed");
DEFINE_ERROR_EXT(OB_ERR_TOO_LONG_KEY_LENGTH, -5196, ER_TOO_LONG_KEY, "42000", "Specified key was too long", "Specified key was too long; max key length is %d bytes");
DEFINE_ERROR(OB_ERR_TOO_MANY_COLUMNS, -5197, ER_TOO_MANY_FIELDS, "42000", "Too many columns");
DEFINE_ERROR_EXT(OB_ERR_TOO_LONG_COLUMN_LENGTH, -5198, ER_TOO_BIG_FIELDLENGTH, "42000", "Column length too big", "Column length too big for column '%s' (max = %d)");
DEFINE_ERROR(OB_ERR_TOO_BIG_ROWSIZE, -5199, ER_TOO_BIG_ROWSIZE, "42000", "Row size too large");
DEFINE_ERROR_EXT(OB_ERR_UNKNOWN_TABLE, -5200, ER_UNKNOWN_TABLE, "42S02", "Unknown table", "Unknown table '%.*s' in %.*s");
DEFINE_ERROR_EXT(OB_ERR_BAD_TABLE, -5201, ER_BAD_TABLE_ERROR, "42S02", "Unknown table", "Unknown table '%.*s'");
DEFINE_ERROR(OB_ERR_TOO_BIG_SCALE, -5202, ER_TOO_BIG_SCALE, "42000", "Too big scale %d specified for column '%s'. Maximum is %ld.");
DEFINE_ERROR(OB_ERR_TOO_BIG_PRECISION, -5203, ER_TOO_BIG_PRECISION, "42000", "Too big precision %d specified for column '%s'. Maximum is %ld.");
DEFINE_ERROR(OB_ERR_M_BIGGER_THAN_D, -5204, ER_M_BIGGER_THAN_D, "42000", "For float(M,D), double(M,D) or decimal(M,D), M must be >= D (column '%s').");
DEFINE_ERROR(OB_ERR_TOO_BIG_DISPLAYWIDTH, -5205, ER_TOO_BIG_DISPLAYWIDTH, "42000", "Display width out of range for column '%s' (max = %ld)");
DEFINE_ERROR(OB_WRONG_GROUP_FIELD, -5206, ER_WRONG_GROUP_FIELD, "42000", "Can't group on '%.*s'");
DEFINE_ERROR_EXT(OB_NON_UNIQ_ERROR, -5207, ER_NON_UNIQ_ERROR, "23000", "Column is ambiguous", "Column '%.*s' in %.*s is ambiguous");
DEFINE_ERROR_EXT(OB_ERR_NONUNIQ_TABLE, -5208, ER_NONUNIQ_TABLE, "42000", "Not unique table/alias", "Not unique table/alias: \'%.*s\'");
DEFINE_ERROR_EXT(OB_ERR_CANT_DROP_FIELD_OR_KEY, -5209, ER_CANT_DROP_FIELD_OR_KEY, "42000", "Can't DROP Column; check that column/key exists", "Can't DROP '%.*s'; check that column/key exists");
DEFINE_ERROR(OB_ERR_MULTIPLE_PRI_KEY, -5210, ER_MULTIPLE_PRI_KEY, "42000", "Multiple primary key defined");
DEFINE_ERROR_EXT(OB_ERR_KEY_COLUMN_DOES_NOT_EXITS, -5211, ER_KEY_COLUMN_DOES_NOT_EXITS, "42000", "Key column doesn't exist in table", "Key column '%.*s' doesn't exist in table");
DEFINE_ERROR_EXT(OB_ERR_AUTO_PARTITION_KEY, -5212, -1, "42000", "auto-increment column should not be part of partition key", "auto-increment column '%.*s' should not be part of partition key");
DEFINE_ERROR_EXT(OB_ERR_CANT_USE_OPTION_HERE, -5213, ER_CANT_USE_OPTION_HERE, "42000", "Incorrect usage/placement", "Incorrect usage/placement of '%s'");
DEFINE_ERROR_EXT(OB_ERR_WRONG_OBJECT, -5214, ER_WRONG_OBJECT, "HY000", "Wrong object", "\'%s.%s\' is not %s");
DEFINE_ERROR_EXT(OB_ERR_ON_RENAME, -5215, ER_ERROR_ON_RENAME, "HY000", "Error on rename table", "Error on rename of \'%s.%s\' to \'%s.%s\'");
DEFINE_ERROR_EXT(OB_ERR_WRONG_KEY_COLUMN, -5216, ER_WRONG_KEY_COLUMN, "42000", "The used storage engine can't index column", "The used storage engine can't index column '%.*s'");
DEFINE_ERROR_EXT(OB_ERR_BAD_FIELD_ERROR, -5217, ER_BAD_FIELD_ERROR, "42S22", "Unknown column", "Unknown column '%.*s' in '%.*s'");
DEFINE_ERROR_EXT(OB_ERR_WRONG_FIELD_WITH_GROUP, -5218, ER_WRONG_FIELD_WITH_GROUP, "42000", "column is not in GROUP BY", "\'%.*s\' is not in GROUP BY");
DEFINE_ERROR(OB_ERR_CANT_CHANGE_TX_CHARACTERISTICS, -5219, ER_CANT_CHANGE_TX_CHARACTERISTICS, "25001", "Transaction characteristics can't be changed while a transaction is in progress");
DEFINE_ERROR(OB_ERR_CANT_EXECUTE_IN_READ_ONLY_TRANSACTION, -5220, ER_CANT_EXECUTE_IN_READ_ONLY_TRANSACTION, "25006", "Cannot execute statement in a READ ONLY transaction.");
DEFINE_ERROR(OB_ERR_MIX_OF_GROUP_FUNC_AND_FIELDS, -5221, ER_MIX_OF_GROUP_FUNC_AND_FIELDS, "42000", "Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause");
DEFINE_ERROR_EXT(OB_ERR_TRUNCATED_WRONG_VALUE, -5222, ER_TRUNCATED_WRONG_VALUE, "22007", "Incorrect value", "Truncated incorrect %.*s value: '%.*s'");
DEFINE_ERROR(OB_ERR_WRONG_IDENT_NAME, -5223, -1, "42000", "wrong ident name");
DEFINE_ERROR_EXT(OB_WRONG_NAME_FOR_INDEX, -5224, ER_WRONG_NAME_FOR_INDEX, "42000", "Incorrect index name", "Incorrect index name '%.*s'");
DEFINE_ERROR_EXT(OB_ILLEGAL_REFERENCE, -5225, ER_ILLEGAL_REFERENCE, "42S22", "Reference not supported (reference to group function)", "Reference '%.*s' not supported (reference to group function)")
DEFINE_ERROR(OB_REACH_MEMORY_LIMIT, -5226, -1, "42000", "plan cache memory used reach the high water mark.");
DEFINE_ERROR(OB_ERR_PASSWORD_FORMAT, -5227, ER_PASSWORD_FORMAT, "42000", "The password hash doesn't have the expected format. Check if the correct password algorithm is being used with the PASSWORD() function.");
DEFINE_ERROR(OB_ERR_NON_UPDATABLE_TABLE, -5228, ER_NON_UPDATABLE_TABLE, "HY000", "The target table tt of the UPDATE is not updatable");
DEFINE_ERROR_EXT(OB_ERR_WARN_DATA_OUT_OF_RANGE, -5229, ER_WARN_DATA_OUT_OF_RANGE, "22003", "Out of range value for column", "Out of range value for column '%.*s' at row %ld")
DEFINE_ERROR(OB_ERR_WRONG_EXPR_IN_PARTITION_FUNC_ERROR, -5230, ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR, "HY000", "Constant or random or timezone-dependent expressions in (sub)partitioning function are not allowed");
DEFINE_ERROR_EXT(OB_ERR_VIEW_INVALID, -5231, ER_VIEW_INVALID, "42S22", "view invalid", "View \'%.*s.%.*s\' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them");
DEFINE_ERROR(OB_ERR_OPTION_PREVENTS_STATEMENT, -5233, ER_OPTION_PREVENTS_STATEMENT, "HY000", "The MySQL server is running with the --read-only option so it cannot execute this statement");
DEFINE_ERROR(OB_ERR_DB_READ_ONLY, -5234, -1, "HY000", "The database is read only so it cannot execute this statement", "The database \'%.*s\' is read only so it cannot execute this statement");
DEFINE_ERROR(OB_ERR_TABLE_READ_ONLY, -5235, -1, "HY000", "The table is read only so it cannot execute this statement", "The table \'%.*s.%.*s\' is read only so it cannot execute this statement");
DEFINE_ERROR(OB_ERR_LOCK_OR_ACTIVE_TRANSACTION, -5236, ER_LOCK_OR_ACTIVE_TRANSACTION, "HY000", "Can't execute the given command because you have active locked tables or an active transaction");
DEFINE_ERROR_EXT(OB_ERR_SAME_NAME_PARTITION_FIELD, -5237, ER_SAME_NAME_PARTITION_FIELD, "HY000", "Duplicate partition field name", "Duplicate partition field name '%.*s'")
DEFINE_ERROR_EXT(OB_ERR_TABLENAME_NOT_ALLOWED_HERE, -5238, ER_TABLENAME_NOT_ALLOWED_HERE, "42000", "Table from one of the SELECTs cannot be used in global ORDER clause", "Table \'%.*s\' from one of the SELECTs cannot be used in global ORDER clause");
DEFINE_ERROR_EXT(OB_ERR_VIEW_RECURSIVE, -5239, ER_VIEW_RECURSIVE, "42S22", "view contains recursion", "\'%.*s'.'%.*s\' contains view recursion");
DEFINE_ERROR(OB_ERR_QUALIFIER, -5240, -1, "HY000", "Column part of USING clause cannot have qualifier");
DEFINE_ERROR(OB_ERR_WRONG_VALUE, -5241, ER_WRONG_VALUE, "HY000", "Incorrect %s value: '%s'");
DEFINE_ERROR(OB_ERR_VIEW_WRONG_LIST, -5242, ER_VIEW_WRONG_LIST,  "HY000", "View's SELECT and view's field list have different column counts");
DEFINE_ERROR(OB_SYS_VARS_MAYBE_DIFF_VERSION, -5243, -1,  "HY000", "system variables' version maybe different");
DEFINE_ERROR(OB_ERR_AUTO_INCREMENT_CONFLICT, -5244, ER_AUTO_INCREMENT_CONFLICT, "HY000", "Auto-increment value in UPDATE conflicts with internally generated values");
DEFINE_ERROR_EXT(OB_ERR_TASK_SKIPPED, -5245, -1, "HY000", "some tasks are skipped", "some tasks are skipped, skipped server addr is '%s', the orginal error code is %d");
DEFINE_ERROR_EXT(OB_ERR_NAME_BECOMES_EMPTY, -5246, ER_NAME_BECOMES_EMPTY, "HY000", "Name has become ''", "Name \'%.*s\' has become ''");
DEFINE_ERROR_EXT(OB_ERR_REMOVED_SPACES, -5247, ER_REMOVED_SPACES, "HY000", "Leading spaces are removed from name ", "Leading spaces are removed from name \'%.*s\'");
DEFINE_ERROR_EXT(OB_WARN_ADD_AUTOINCREMENT_COLUMN, -5248, -1, "HY000", "Alter table add auto_increment column is dangerous", "Alter table add auto_increment column is dangerous, table_name=\'%.*s\', column_name=\'%s\'");
DEFINE_ERROR_EXT(OB_WARN_CHAMGE_NULL_ATTRIBUTE, -5249, -1, "HY000", "Alter table change nullable column to not nullable is dangerous", "Alter table change nullable column to not nullable is dangerous, table_name=\'%.*s\', column_name=\'%.*s\'");
DEFINE_ERROR_EXT(OB_ERR_INVALID_CHARACTER_STRING, -5250, ER_INVALID_CHARACTER_STRING, "HY000", "Invalid character string", "Invalid %.*s character string: \'%.*s\'");
DEFINE_ERROR_EXT(OB_ERR_KILL_DENIED, -5251, ER_KILL_DENIED_ERROR, "HY000", "You are not owner of thread", "You are not owner of thread %lu");
DEFINE_ERROR_EXT(OB_ERR_COLUMN_DEFINITION_AMBIGUOUS, -5252, -1, "HY000", "Column definition is ambiguous. Column has both NULL and NOT NULL attributes", "Column definition is ambiguous. Column has both NULL and NOT NULL attributes");
DEFINE_ERROR(OB_ERR_EMPTY_QUERY, -5253, ER_EMPTY_QUERY, "42000", "Query was empty");
DEFINE_ERROR_EXT(OB_ERR_CUT_VALUE_GROUP_CONCAT, -5254, ER_CUT_VALUE_GROUP_CONCAT, "42000", "Row was cut by GROUP_CONCAT()", "Row %ld was cut by GROUP_CONCAT()");
DEFINE_ERROR(OB_ERR_FILED_NOT_FOUND_PART, -5255, ER_FIELD_NOT_FOUND_PART_ERROR, "HY000", "Field in list of fields for partition function not found in table");
DEFINE_ERROR(OB_ERR_PRIMARY_CANT_HAVE_NULL, -5256, ER_PRIMARY_CANT_HAVE_NULL, "42000", "All parts of a PRIMARY KEY must be NOT NULL; if you need NULL in a key, use UNIQUE instead");
DEFINE_ERROR(OB_ERR_PARTITION_FUNC_NOT_ALLOWED_ERROR, -5257, ER_PARTITION_FUNC_NOT_ALLOWED_ERROR, "HY000", "The PARTITION function returns the wrong type");
DEFINE_ERROR(OB_ERR_INVALID_BLOCK_SIZE, -5258, -1, "HY000", "Invalid block size, block size should between 16384 and 1048576");
DEFINE_ERROR_EXT(OB_ERR_UNKNOWN_STORAGE_ENGINE, -5259, ER_UNKNOWN_STORAGE_ENGINE, "42000", "Unknown storage engine", "Unknown storage engine \'%.*s\'");
DEFINE_ERROR_EXT(OB_ERR_TENANT_IS_LOCKED, -5260, -1, "HY000", "Tenant is locked", "Tenant \'%.*s\' is locked");
DEFINE_ERROR_EXT(OB_EER_UNIQUE_KEY_NEED_ALL_FIELDS_IN_PF, -5261, ER_UNIQUE_KEY_NEED_ALL_FIELDS_IN_PF, "HY000", "A UNIQUE INDEX/PRIMARY KEY must include all columns in the table's partitioning function", "A %s must include all columns in the table's partitioning function";
DEFINE_ERROR(OB_ERR_PARTITION_FUNCTION_IS_NOT_ALLOWED, -5262, ER_PARTITION_FUNCTION_IS_NOT_ALLOWED, "HY000", "This partition function is not allowed");
DEFINE_ERROR_EXT(OB_ERR_AGGREGATE_ORDER_FOR_UNION, -5263, ER_AGGREGATE_ORDER_FOR_UNION, "HY000", "aggregate order for union", "Expression #%d of ORDER BY contains aggregate function and applies to a UNION");
DEFINE_ERROR_EXT(OB_ERR_OUTLINE_EXIST, -5264, -1, "HY000", "Outline exists", "Outline '%.*s' already exists");
DEFINE_ERROR_EXT(OB_OUTLINE_NOT_EXIST, -5265, -1, "HY000", "Outline not exists", "Outline \'%.*s.%.*s\' doesn\'t exist");
DEFINE_ERROR_EXT(OB_WARN_OPTION_BELOW_LIMIT, -5266, WARN_OPTION_BELOW_LIMIT, "HY000", "The value should be no less than the limit", "The value of \'%s\' should be no less than the value of \'%s\'");
DEFINE_ERROR_EXT(OB_INVALID_OUTLINE, -5267, -1, "HY000", "invalid outline", "invalid outline ,error info:%s");
DEFINE_ERROR_EXT(OB_REACH_MAX_CONCURRENT_NUM, -5268, -1, "HY000", "SQL reach max concurrent num", "SQL reach max concurrent num %ld");
DEFINE_ERROR(OB_ERR_OPERATION_ON_RECYCLE_OBJECT, -5269, -1, "HY000", "can not perform DDL/DML over objects in Recycle Bin");
DEFINE_ERROR(OB_ERR_OBJECT_NOT_IN_RECYCLEBIN, -5270, -1, "HY000", "object not in RECYCLE BIN");
DEFINE_ERROR(OB_ERR_CON_COUNT_ERROR, -5271, ER_CON_COUNT_ERROR, "08004", "Too many connections");
DEFINE_ERROR_EXT(OB_ERR_OUTLINE_CONTENT_EXIST, -5272, -1, "HY000", "Outline content already exists when added", "Outline content '%.*s' of outline '%.*s' already exists when added");
DEFINE_ERROR_EXT(OB_ERR_OUTLINE_MAX_CONCURRENT_EXIST, -5273, -1, "HY000", "Max concurrent already exists when added", "Max concurrent in outline '%.*s' already exists when added");
DEFINE_ERROR_EXT(OB_ERR_VALUES_IS_NOT_INT_TYPE_ERROR, -5274, ER_VALUES_IS_NOT_INT_TYPE_ERROR, "HY000", "VALUES value for partition must have type INT", "VALUES value for partition \'%.*s\' must have type INT");
DEFINE_ERROR(OB_ERR_WRONG_TYPE_COLUMN_VALUE_ERROR, -5275, ER_WRONG_TYPE_COLUMN_VALUE_ERROR, "HY000", "Partition column values of incorrect type");
DEFINE_ERROR(OB_ERR_PARTITION_COLUMN_LIST_ERROR, -5276, ER_PARTITION_COLUMN_LIST_ERROR, "HY000", "Inconsistency in usage of column lists for partitioning");
DEFINE_ERROR(OB_ERR_TOO_MANY_VALUES_ERROR, -5277, ER_TOO_MANY_VALUES_ERROR, "HY000", "Cannot have more than one value for this type of RANGE partitioning");
DEFINE_ERROR(OB_ERR_PARTITION_FUNCTION_IS_NOT_ALLOWED, -5278, ER_PARTITION_FUNCTION_IS_NOT_ALLOWED, "HY000", "This partition function is not allowed");
DEFINE_ERROR(OB_ERR_PARTITION_INTERVAL_ERROR, -5279, -1, "HY000", "Partition interval must have type INT");
DEFINE_ERROR_EXT(OB_ERR_SAME_NAME_PARTITION, -5280, ER_SAME_NAME_PARTITION, "HY000", "Duplicate partition name", "Duplicate partition name \'%.*s\'");
DEFINE_ERROR(OB_ERR_RANGE_NOT_INCREASING_ERROR, -5281, ER_RANGE_NOT_INCREASING_ERROR, "HY000", "VALUES LESS THAN value must be strictly increasing for each partition");
DEFINE_ERROR(OB_ERR_PARSE_PARTITION_RANGE, -5282, ER_PARSE_ERROR, "42000", "Wrong number of partitions defined, mismatch with previous setting");
DEFINE_ERROR(OB_ERR_UNIQUE_KEY_NEED_ALL_FIELDS_IN_PF, -5283, ER_UNIQUE_KEY_NEED_ALL_FIELDS_IN_PF, "HY000", "A PRIMARY KEY must include all columns in the table\'s partitioning function");
DEFINE_ERROR(OB_NO_PARTITION_FOR_GIVEN_VALUE, -5284, ER_NO_PARTITION_FOR_GIVEN_VALUE, "HY000", "Table has no partition for value");
DEFINE_ERROR(OB_EER_NULL_IN_VALUES_LESS_THAN, -5285, ER_NULL_IN_VALUES_LESS_THAN, "HY000", "Not allowed to use NULL value in VALUES LESS THAN");
DEFINE_ERROR(OB_ERR_PARTITION_CONST_DOMAIN_ERROR, -5286, ER_PARTITION_CONST_DOMAIN_ERROR, "HY000", "Partition constant is out of partition function domain");
DEFINE_ERROR(OB_ERR_TOO_MANY_PARTITION_FUNC_FIELDS, -5287, ER_TOO_MANY_PARTITION_FUNC_FIELDS_ERROR, "HY000", "Too many fields in \'list of partition fields\'");
DEFINE_ERROR_EXT(OB_ERR_BAD_FT_COLUMN, -5288, ER_BAD_FT_COLUMN, "HY000", "Column cannot be part of FULLTEXT index", "Column '%.*s' cannot be part of FULLTEXT index");
DEFINE_ERROR_EXT(OB_ERR_KEY_DOES_NOT_EXISTS, -5289, ER_KEY_DOES_NOT_EXITS, "42000", "key does not exist in table", "Key '%.*s' doesn't exist in table '%.*s'");
DEFINE_ERROR_EXT(OB_NON_DEFAULT_VALUE_FOR_GENERATED_COLUMN, -5290, ER_NON_DEFAULT_VALUE_FOR_GENERATED_COLUMN, "HY000", "non-default value for generated column is not allowed", "The value specified for generated column '%.*s' in table '%.*s' is not allowed");
DEFINE_ERROR(OB_ERR_BAD_CTXCAT_COLUMN, -5291, -1, "HY000", "The CTXCAT column must be contiguous in the index column list");
DEFINE_ERROR_EXT(OB_ERR_UNSUPPORTED_ACTION_ON_GENERATED_COLUMN, -5292, ER_UNSUPPORTED_ACTION_ON_GENERATED_COLUMN, "HY000", "not supported for generated columns", "'%s' is not supported for generated columns.");
DEFINE_ERROR_EXT(OB_ERR_DEPENDENT_BY_GENERATED_COLUMN, -5293, ER_DEPENDENT_BY_GENERATED_COLUMN, "HY000", "Column has a generated column dependency", "Column '%.*s' has a generated column dependency");
DEFINE_ERROR(OB_ERR_TOO_MANY_ROWS, -5294, ER_TOO_MANY_ROWS, "42000", "Result consisted of more than one row");
DEFINE_ERROR(OB_WRONG_FIELD_TERMINATORS, -5295, ER_WRONG_FIELD_TERMINATORS, "42000", "Field separator argument is not what is expected; check the manual");
DEFINE_ERROR(OB_NO_READABLE_REPLICA, -5296, -1, "42000", "there has no readable replica");
DEFINE_ERROR(OB_ERR_PARTITION_MGMT_ON_NONPARTITIONED, -5302, ER_PARTITION_MGMT_ON_NONPARTITIONED, "HY000", "Partition management on a not partitioned table is not possible");
DEFINE_ERROR_EXT(OB_ERR_DROP_PARTITION_NON_EXISTENT, -5303, ER_DROP_PARTITION_NON_EXISTENT, "HY000", "Error in list of partitions", "Error in list of partitions to %s");
DEFINE_ERROR(OB_ERR_PARTITION_MGMT_ON_TWOPART_TABLE, -5304, -1, "HY000", "Partition management on a two-part table is not possible");
DEFINE_ERROR(OB_ERR_ONLY_ON_RANGE_LIST_PARTITION, -5305, ER_ONLY_ON_RANGE_LIST_PARTITION, "HY000", "can only be used on RANGE/LIST partitions", "%s PARTITION can only be used on RANGE/LIST partitions");
DEFINE_ERROR(OB_ERR_DROP_LAST_PARTITION, -5306, ER_DROP_LAST_PARTITION, "HY000", "Cannot remove all partitions, use DROP TABLE instead");
////////////////////////////////////////////////////////////////
//error code for transaction, mvcc and commitlog -6001 ---- -7000
////////////////////////////////////////////////////////////////
DEFINE_ERROR(OB_TRANSACTION_SET_VIOLATION, -6001, -1, "25000", "Transaction set changed during the execution");
DEFINE_ERROR_EXT(OB_TRANS_ROLLBACKED, -6002, -1, "40000", "Transaction rollbacked", "transaction is rolled back");
DEFINE_ERROR(OB_ERR_EXCLUSIVE_LOCK_CONFLICT, -6003, ER_LOCK_WAIT_TIMEOUT, "HY000", "Lock wait timeout exceeded; try restarting transaction");
DEFINE_ERROR(OB_ERR_SHARED_LOCK_CONFLICT, -6004, -1, "HY000", "Shared lock conflict");
DEFINE_ERROR(OB_TRY_LOCK_ROW_CONFLICT, -6005, -1, "HY000", "Try lock row conflict");
DEFINE_ERROR(OB_CLOCK_OUT_OF_ORDER, -6201, -1, "25000", "Clock out of order");
DEFINE_ERROR(OB_MASK_SET_NO_NODE, -6203, -1, "25000", "Mask set has no node");
DEFINE_ERROR(OB_TRANS_HAS_DECIDED, -6204, -1, "HY000", "Transaction has been decided");
DEFINE_ERROR(OB_TRANS_INVALID_STATE, -6205, -1, "HY000", "Transaction state invalid");
DEFINE_ERROR(OB_TRANS_STATE_NOT_CHANGE, -6206, -1, "HY000", "Transaction state not changed");
DEFINE_ERROR(OB_TRANS_PROTOCOL_ERROR, -6207, -1, "HY000", "Transaction protocol error");
DEFINE_ERROR(OB_TRANS_INVALID_MESSAGE, -6208, -1, "HY000", "Transaction message invalid");
DEFINE_ERROR(OB_TRANS_INVALID_MESSAGE_TYPE, -6209, -1, "HY000", "Transaction message type invalid");
DEFINE_ERROR(OB_TRANS_TIMEOUT, -6210, 4012, "25000", "Transaction is timeout");
DEFINE_ERROR(OB_TRANS_KILLED, -6211, 6002, "25000", "Transaction is killed");
DEFINE_ERROR(OB_TRANS_STMT_TIMEOUT, -6212, 4012, "25000", "Statement is timeout");
DEFINE_ERROR(OB_TRANS_CTX_NOT_EXIST, -6213, 6002, "HY000", "Transaction context does not exist");
DEFINE_ERROR(OB_PARTITION_IS_FROZEN, -6214, 6002, "25000", "Partition is frozen");
DEFINE_ERROR(OB_PARTITION_IS_NOT_FROZEN, -6215, -1, "HY000", "Partition is not frozen");
DEFINE_ERROR(OB_TRANS_INVALID_LOG_TYPE, -6219, -1, "HY000", "Transaction invalid log type");
DEFINE_ERROR(OB_TRANS_SQL_SEQUENCE_ILLEGAL, -6220, -1, "HY000", "SQL sequence illegal");
DEFINE_ERROR(OB_TRANS_CANNOT_BE_KILLED, -6221, -1, "HY000", "Transaction context cannot be killed");
DEFINE_ERROR(OB_TRANS_STATE_UNKNOWN, -6222, -1, "HY000", "Transaction state unknown");
DEFINE_ERROR(OB_TRANS_IS_EXITING, -6223, 6002, "25000", "Transaction exiting");
DEFINE_ERROR(OB_TRANS_NEED_ROLLBACK, -6224, 6002, "25000", "transaction need rollback");
DEFINE_ERROR(OB_TRANS_UNKNOWN, -6225, 4012, "25000", "Transaction result is unknown");
DEFINE_ERROR(OB_ERR_READ_ONLY_TRANSACTION, -6226, ER_CANT_EXECUTE_IN_READ_ONLY_TRANSACTION, "25006", "Cannot execute statement in a READ ONLY transaction");
DEFINE_ERROR(OB_PARTITION_IS_NOT_STOPPED, -6227, -1, "HY000", "Partition is not stopped");
DEFINE_ERROR(OB_PARTITION_IS_STOPPED, -6228, -1, "HY000", "Partition has been stopped");
DEFINE_ERROR(OB_PARTITION_IS_BLOCKED, -6229, -1, "HY000", "Partition has been blocked");
DEFINE_ERROR(OB_TRANS_RPC_TIMEOUT, -6230, 4012, "25000", "transaction rpc timeout");
DEFINE_ERROR(OB_REPLICA_NOT_READABLE, -6231, -1, "HY000", "replica is not readable");
// for clog
DEFINE_ERROR(OB_LOG_ID_NOT_FOUND, -6301, -1, "HY000", "log id not found");
DEFINE_ERROR(OB_LSR_THREAD_STOPPED, -6302, -1, "HY000", "log scan runnable thread stop");
DEFINE_ERROR(OB_NO_LOG, -6303, -1, "HY000", "no log ever scanned");
DEFINE_ERROR(OB_LOG_ID_RANGE_ERROR, -6304, -1, "HY000", "log id range error");
DEFINE_ERROR(OB_LOG_ITER_ENOUGH, -6305, -1, "HY000", "iter scans enough files");
DEFINE_ERROR(OB_CLOG_INVALID_ACK, -6306, -1, "HY000", "invalid ack msg");
DEFINE_ERROR(OB_CLOG_CACHE_INVALID, -6307, -1, "HY000", "clog cache invalid");
DEFINE_ERROR(OB_EXT_HANDLE_UNFINISH, -6308, -1, "HY000", "external executor handle do not finish");
DEFINE_ERROR(OB_CURSOR_NOT_EXIST, -6309, -1, "HY000", "cursor not exist");
DEFINE_ERROR(OB_STREAM_NOT_EXIST, -6310, -1, "HY000", "stream not exist");
DEFINE_ERROR(OB_STREAM_BUSY, -6311, -1, "HY000", "stream busy");
DEFINE_ERROR(OB_FILE_RECYCLED, -6312, -1, "HY000", "file recycled");
DEFINE_ERROR(OB_REPLAY_EAGAIN_TOO_MUCH_TIME, -6313, -1, "HY000", "replay eagain cost too much time");
DEFINE_ERROR(OB_MEMBER_CHANGE_FAILED, -6314, -1, "HY000", "member change log sync failed");
////////////////////////////////////////////////////////////////
//error code for election -7000 ---- -7100
////////////////////////////////////////////////////////////////
DEFINE_ERROR(OB_ELECTION_WARN_LOGBUF_FULL, -7000, -1, "HY000", "The log buffer is full");
DEFINE_ERROR(OB_ELECTION_WARN_LOGBUF_EMPTY, -7001, -1, "HY000", "The log buffer is empty");
DEFINE_ERROR(OB_ELECTION_WARN_NOT_RUNNING, -7002, -1, "HY000", "The object is not running");
DEFINE_ERROR(OB_ELECTION_WARN_IS_RUNNING, -7003, -1, "HY000", "The object is running");
DEFINE_ERROR(OB_ELECTION_WARN_NOT_REACH_MAJORITY, -7004, -1, "HY000", "Election does not reach majority");
DEFINE_ERROR(OB_ELECTION_WARN_INVALID_SERVER, -7005, -1, "HY000", "The server is not valid");
DEFINE_ERROR(OB_ELECTION_WARN_INVALID_LEADER, -7006, -1, "HY000", "The leader is not valid");
DEFINE_ERROR(OB_ELECTION_WARN_LEADER_LEASE_EXPIRED, -7007, -1, "HY000", "The leader lease is expired");
DEFINE_ERROR(OB_ELECTION_WARN_INVALID_MESSAGE, -7010, -1, "HY000", "The message is not valid");
DEFINE_ERROR(OB_ELECTION_WARN_MESSAGE_NOT_INTIME, -7011, -1, "HY000", "The message is not intime");
DEFINE_ERROR(OB_ELECTION_WARN_NOT_CANDIDATE, -7012, -1, "HY000", "The server is not candidate");
DEFINE_ERROR(OB_ELECTION_WARN_NOT_CANDIDATE_OR_VOTER, -7013, -1, "HY000", "The server is not candidate or voter");
DEFINE_ERROR(OB_ELECTION_WARN_PROTOCOL_ERROR, -7014, -1, "HY000", "Election protocol error");
DEFINE_ERROR(OB_ELECTION_WARN_RUNTIME_OUT_OF_RANGE, -7015, -1, "HY000", "The task run time out of range");
DEFINE_ERROR(OB_ELECTION_WARN_LAST_OPERATION_NOT_DONE, -7021, -1, "HY000", "Last operation has not done");
DEFINE_ERROR(OB_ELECTION_WARN_CURRENT_SERVER_NOT_LEADER, -7022, -1, "HY000", "Current server is not leader");
DEFINE_ERROR(OB_ELECTION_WARN_NO_PREPARE_MESSAGE, -7024, -1, "HY000", "There is not prepare message");
DEFINE_ERROR(OB_ELECTION_ERROR_MULTI_PREPARE_MESSAGE, -7025, -1, "HY000", "There is more than one prepare message");
DEFINE_ERROR(OB_ELECTION_NOT_EXIST, -7026, -1, "HY000", "Election does not exist");
DEFINE_ERROR(OB_ELECTION_MGR_IS_RUNNING, -7027, -1, "HY000", "Election manager is running");
DEFINE_ERROR(OB_ELECTION_WARN_NO_MAJORITY_PREPARE_MESSAGE, -7029, -1, "HY000", "Election msg pool not have majority prepare message");
DEFINE_ERROR(OB_ELECTION_ASYNC_LOG_WARN_INIT, -7030, -1, "HY000", "Election async log init error");
DEFINE_ERROR(OB_ELECTION_WAIT_LEADER_MESSAGE, -7031, -1, "HY000", "Election waiting leader message");
////////////////////////////////////////////////////////////////
// !!! Fatal errors and the client should close the connection, -8000 ~ -8999
////////////////////////////////////////////////////////////////
DEFINE_ERROR(OB_SERVER_IS_INIT, -8001, -1, "08004", "Server is initializing");
DEFINE_ERROR(OB_SERVER_IS_STOPPING, -8002, -1, "08004", "Server is stopping");
DEFINE_ERROR(OB_PACKET_CHECKSUM_ERROR, -8003, -1, "08004", "Packet checksum error");
DEFINE_ERROR(OB_PACKET_CLUSTER_ID_NOT_MATCH, -8004, -1, "08004", "Packet cluster_id not match");