2020-10-29 07:07:42 +00:00
|
|
|
#include <Common/ErrorCodes.h>
|
|
|
|
|
|
|
|
/** Previously, these constants were located in one enum.
|
|
|
|
* But in this case there is a problem: when you add a new constant, you need to recompile
|
|
|
|
* all translation units that use at least one constant (almost the whole project).
|
|
|
|
* Therefore it is made so that definitions of constants are located here, in one file,
|
|
|
|
* and their declaration are in different files, at the place of use.
|
|
|
|
*
|
|
|
|
* Later it was converted to the lookup table, to provide:
|
|
|
|
* - errorCodeToName()
|
|
|
|
* - system.errors table
|
|
|
|
*/
|
|
|
|
|
|
|
|
#define APPLY_FOR_ERROR_CODES(M) \
|
|
|
|
M(OK, 0) \
|
|
|
|
M(UNSUPPORTED_METHOD, 1) \
|
|
|
|
M(UNSUPPORTED_PARAMETER, 2) \
|
|
|
|
M(UNEXPECTED_END_OF_FILE, 3) \
|
|
|
|
M(EXPECTED_END_OF_FILE, 4) \
|
|
|
|
M(CANNOT_PARSE_TEXT, 6) \
|
|
|
|
M(INCORRECT_NUMBER_OF_COLUMNS, 7) \
|
|
|
|
M(THERE_IS_NO_COLUMN, 8) \
|
|
|
|
M(SIZES_OF_COLUMNS_DOESNT_MATCH, 9) \
|
|
|
|
M(NOT_FOUND_COLUMN_IN_BLOCK, 10) \
|
|
|
|
M(POSITION_OUT_OF_BOUND, 11) \
|
|
|
|
M(PARAMETER_OUT_OF_BOUND, 12) \
|
|
|
|
M(SIZES_OF_COLUMNS_IN_TUPLE_DOESNT_MATCH, 13) \
|
|
|
|
M(DUPLICATE_COLUMN, 15) \
|
|
|
|
M(NO_SUCH_COLUMN_IN_TABLE, 16) \
|
|
|
|
M(DELIMITER_IN_STRING_LITERAL_DOESNT_MATCH, 17) \
|
|
|
|
M(CANNOT_INSERT_ELEMENT_INTO_CONSTANT_COLUMN, 18) \
|
|
|
|
M(SIZE_OF_FIXED_STRING_DOESNT_MATCH, 19) \
|
|
|
|
M(NUMBER_OF_COLUMNS_DOESNT_MATCH, 20) \
|
|
|
|
M(CANNOT_READ_ALL_DATA_FROM_TAB_SEPARATED_INPUT, 21) \
|
|
|
|
M(CANNOT_PARSE_ALL_VALUE_FROM_TAB_SEPARATED_INPUT, 22) \
|
|
|
|
M(CANNOT_READ_FROM_ISTREAM, 23) \
|
|
|
|
M(CANNOT_WRITE_TO_OSTREAM, 24) \
|
|
|
|
M(CANNOT_PARSE_ESCAPE_SEQUENCE, 25) \
|
|
|
|
M(CANNOT_PARSE_QUOTED_STRING, 26) \
|
|
|
|
M(CANNOT_PARSE_INPUT_ASSERTION_FAILED, 27) \
|
|
|
|
M(CANNOT_PRINT_FLOAT_OR_DOUBLE_NUMBER, 28) \
|
|
|
|
M(CANNOT_PRINT_INTEGER, 29) \
|
|
|
|
M(CANNOT_READ_SIZE_OF_COMPRESSED_CHUNK, 30) \
|
|
|
|
M(CANNOT_READ_COMPRESSED_CHUNK, 31) \
|
|
|
|
M(ATTEMPT_TO_READ_AFTER_EOF, 32) \
|
|
|
|
M(CANNOT_READ_ALL_DATA, 33) \
|
|
|
|
M(TOO_MANY_ARGUMENTS_FOR_FUNCTION, 34) \
|
|
|
|
M(TOO_FEW_ARGUMENTS_FOR_FUNCTION, 35) \
|
|
|
|
M(BAD_ARGUMENTS, 36) \
|
|
|
|
M(UNKNOWN_ELEMENT_IN_AST, 37) \
|
|
|
|
M(CANNOT_PARSE_DATE, 38) \
|
|
|
|
M(TOO_LARGE_SIZE_COMPRESSED, 39) \
|
|
|
|
M(CHECKSUM_DOESNT_MATCH, 40) \
|
|
|
|
M(CANNOT_PARSE_DATETIME, 41) \
|
|
|
|
M(NUMBER_OF_ARGUMENTS_DOESNT_MATCH, 42) \
|
|
|
|
M(ILLEGAL_TYPE_OF_ARGUMENT, 43) \
|
|
|
|
M(ILLEGAL_COLUMN, 44) \
|
|
|
|
M(ILLEGAL_NUMBER_OF_RESULT_COLUMNS, 45) \
|
|
|
|
M(UNKNOWN_FUNCTION, 46) \
|
|
|
|
M(UNKNOWN_IDENTIFIER, 47) \
|
|
|
|
M(NOT_IMPLEMENTED, 48) \
|
|
|
|
M(LOGICAL_ERROR, 49) \
|
|
|
|
M(UNKNOWN_TYPE, 50) \
|
|
|
|
M(EMPTY_LIST_OF_COLUMNS_QUERIED, 51) \
|
|
|
|
M(COLUMN_QUERIED_MORE_THAN_ONCE, 52) \
|
|
|
|
M(TYPE_MISMATCH, 53) \
|
|
|
|
M(STORAGE_DOESNT_ALLOW_PARAMETERS, 54) \
|
|
|
|
M(STORAGE_REQUIRES_PARAMETER, 55) \
|
|
|
|
M(UNKNOWN_STORAGE, 56) \
|
|
|
|
M(TABLE_ALREADY_EXISTS, 57) \
|
|
|
|
M(TABLE_METADATA_ALREADY_EXISTS, 58) \
|
|
|
|
M(ILLEGAL_TYPE_OF_COLUMN_FOR_FILTER, 59) \
|
|
|
|
M(UNKNOWN_TABLE, 60) \
|
|
|
|
M(ONLY_FILTER_COLUMN_IN_BLOCK, 61) \
|
|
|
|
M(SYNTAX_ERROR, 62) \
|
|
|
|
M(UNKNOWN_AGGREGATE_FUNCTION, 63) \
|
|
|
|
M(CANNOT_READ_AGGREGATE_FUNCTION_FROM_TEXT, 64) \
|
|
|
|
M(CANNOT_WRITE_AGGREGATE_FUNCTION_AS_TEXT, 65) \
|
|
|
|
M(NOT_A_COLUMN, 66) \
|
|
|
|
M(ILLEGAL_KEY_OF_AGGREGATION, 67) \
|
|
|
|
M(CANNOT_GET_SIZE_OF_FIELD, 68) \
|
|
|
|
M(ARGUMENT_OUT_OF_BOUND, 69) \
|
|
|
|
M(CANNOT_CONVERT_TYPE, 70) \
|
|
|
|
M(CANNOT_WRITE_AFTER_END_OF_BUFFER, 71) \
|
|
|
|
M(CANNOT_PARSE_NUMBER, 72) \
|
|
|
|
M(UNKNOWN_FORMAT, 73) \
|
|
|
|
M(CANNOT_READ_FROM_FILE_DESCRIPTOR, 74) \
|
|
|
|
M(CANNOT_WRITE_TO_FILE_DESCRIPTOR, 75) \
|
|
|
|
M(CANNOT_OPEN_FILE, 76) \
|
|
|
|
M(CANNOT_CLOSE_FILE, 77) \
|
|
|
|
M(UNKNOWN_TYPE_OF_QUERY, 78) \
|
|
|
|
M(INCORRECT_FILE_NAME, 79) \
|
|
|
|
M(INCORRECT_QUERY, 80) \
|
|
|
|
M(UNKNOWN_DATABASE, 81) \
|
|
|
|
M(DATABASE_ALREADY_EXISTS, 82) \
|
|
|
|
M(DIRECTORY_DOESNT_EXIST, 83) \
|
|
|
|
M(DIRECTORY_ALREADY_EXISTS, 84) \
|
|
|
|
M(FORMAT_IS_NOT_SUITABLE_FOR_INPUT, 85) \
|
|
|
|
M(RECEIVED_ERROR_FROM_REMOTE_IO_SERVER, 86) \
|
|
|
|
M(CANNOT_SEEK_THROUGH_FILE, 87) \
|
|
|
|
M(CANNOT_TRUNCATE_FILE, 88) \
|
|
|
|
M(UNKNOWN_COMPRESSION_METHOD, 89) \
|
|
|
|
M(EMPTY_LIST_OF_COLUMNS_PASSED, 90) \
|
|
|
|
M(SIZES_OF_MARKS_FILES_ARE_INCONSISTENT, 91) \
|
|
|
|
M(EMPTY_DATA_PASSED, 92) \
|
|
|
|
M(UNKNOWN_AGGREGATED_DATA_VARIANT, 93) \
|
|
|
|
M(CANNOT_MERGE_DIFFERENT_AGGREGATED_DATA_VARIANTS, 94) \
|
|
|
|
M(CANNOT_READ_FROM_SOCKET, 95) \
|
|
|
|
M(CANNOT_WRITE_TO_SOCKET, 96) \
|
|
|
|
M(CANNOT_READ_ALL_DATA_FROM_CHUNKED_INPUT, 97) \
|
|
|
|
M(CANNOT_WRITE_TO_EMPTY_BLOCK_OUTPUT_STREAM, 98) \
|
|
|
|
M(UNKNOWN_PACKET_FROM_CLIENT, 99) \
|
|
|
|
M(UNKNOWN_PACKET_FROM_SERVER, 100) \
|
|
|
|
M(UNEXPECTED_PACKET_FROM_CLIENT, 101) \
|
|
|
|
M(UNEXPECTED_PACKET_FROM_SERVER, 102) \
|
|
|
|
M(RECEIVED_DATA_FOR_WRONG_QUERY_ID, 103) \
|
|
|
|
M(TOO_SMALL_BUFFER_SIZE, 104) \
|
|
|
|
M(CANNOT_READ_HISTORY, 105) \
|
|
|
|
M(CANNOT_APPEND_HISTORY, 106) \
|
|
|
|
M(FILE_DOESNT_EXIST, 107) \
|
|
|
|
M(NO_DATA_TO_INSERT, 108) \
|
|
|
|
M(CANNOT_BLOCK_SIGNAL, 109) \
|
|
|
|
M(CANNOT_UNBLOCK_SIGNAL, 110) \
|
|
|
|
M(CANNOT_MANIPULATE_SIGSET, 111) \
|
|
|
|
M(CANNOT_WAIT_FOR_SIGNAL, 112) \
|
|
|
|
M(THERE_IS_NO_SESSION, 113) \
|
|
|
|
M(CANNOT_CLOCK_GETTIME, 114) \
|
|
|
|
M(UNKNOWN_SETTING, 115) \
|
|
|
|
M(THERE_IS_NO_DEFAULT_VALUE, 116) \
|
|
|
|
M(INCORRECT_DATA, 117) \
|
|
|
|
M(ENGINE_REQUIRED, 119) \
|
|
|
|
M(CANNOT_INSERT_VALUE_OF_DIFFERENT_SIZE_INTO_TUPLE, 120) \
|
|
|
|
M(UNSUPPORTED_JOIN_KEYS, 121) \
|
|
|
|
M(INCOMPATIBLE_COLUMNS, 122) \
|
|
|
|
M(UNKNOWN_TYPE_OF_AST_NODE, 123) \
|
|
|
|
M(INCORRECT_ELEMENT_OF_SET, 124) \
|
|
|
|
M(INCORRECT_RESULT_OF_SCALAR_SUBQUERY, 125) \
|
|
|
|
M(CANNOT_GET_RETURN_TYPE, 126) \
|
|
|
|
M(ILLEGAL_INDEX, 127) \
|
|
|
|
M(TOO_LARGE_ARRAY_SIZE, 128) \
|
|
|
|
M(FUNCTION_IS_SPECIAL, 129) \
|
|
|
|
M(CANNOT_READ_ARRAY_FROM_TEXT, 130) \
|
|
|
|
M(TOO_LARGE_STRING_SIZE, 131) \
|
|
|
|
M(AGGREGATE_FUNCTION_DOESNT_ALLOW_PARAMETERS, 133) \
|
|
|
|
M(PARAMETERS_TO_AGGREGATE_FUNCTIONS_MUST_BE_LITERALS, 134) \
|
|
|
|
M(ZERO_ARRAY_OR_TUPLE_INDEX, 135) \
|
|
|
|
M(UNKNOWN_ELEMENT_IN_CONFIG, 137) \
|
|
|
|
M(EXCESSIVE_ELEMENT_IN_CONFIG, 138) \
|
|
|
|
M(NO_ELEMENTS_IN_CONFIG, 139) \
|
|
|
|
M(ALL_REQUESTED_COLUMNS_ARE_MISSING, 140) \
|
|
|
|
M(SAMPLING_NOT_SUPPORTED, 141) \
|
|
|
|
M(NOT_FOUND_NODE, 142) \
|
|
|
|
M(FOUND_MORE_THAN_ONE_NODE, 143) \
|
|
|
|
M(FIRST_DATE_IS_BIGGER_THAN_LAST_DATE, 144) \
|
|
|
|
M(UNKNOWN_OVERFLOW_MODE, 145) \
|
|
|
|
M(QUERY_SECTION_DOESNT_MAKE_SENSE, 146) \
|
|
|
|
M(NOT_FOUND_FUNCTION_ELEMENT_FOR_AGGREGATE, 147) \
|
|
|
|
M(NOT_FOUND_RELATION_ELEMENT_FOR_CONDITION, 148) \
|
|
|
|
M(NOT_FOUND_RHS_ELEMENT_FOR_CONDITION, 149) \
|
|
|
|
M(EMPTY_LIST_OF_ATTRIBUTES_PASSED, 150) \
|
|
|
|
M(INDEX_OF_COLUMN_IN_SORT_CLAUSE_IS_OUT_OF_RANGE, 151) \
|
|
|
|
M(UNKNOWN_DIRECTION_OF_SORTING, 152) \
|
|
|
|
M(ILLEGAL_DIVISION, 153) \
|
|
|
|
M(AGGREGATE_FUNCTION_NOT_APPLICABLE, 154) \
|
|
|
|
M(UNKNOWN_RELATION, 155) \
|
|
|
|
M(DICTIONARIES_WAS_NOT_LOADED, 156) \
|
|
|
|
M(ILLEGAL_OVERFLOW_MODE, 157) \
|
|
|
|
M(TOO_MANY_ROWS, 158) \
|
|
|
|
M(TIMEOUT_EXCEEDED, 159) \
|
|
|
|
M(TOO_SLOW, 160) \
|
|
|
|
M(TOO_MANY_COLUMNS, 161) \
|
|
|
|
M(TOO_DEEP_SUBQUERIES, 162) \
|
|
|
|
M(TOO_DEEP_PIPELINE, 163) \
|
|
|
|
M(READONLY, 164) \
|
|
|
|
M(TOO_MANY_TEMPORARY_COLUMNS, 165) \
|
|
|
|
M(TOO_MANY_TEMPORARY_NON_CONST_COLUMNS, 166) \
|
|
|
|
M(TOO_DEEP_AST, 167) \
|
|
|
|
M(TOO_BIG_AST, 168) \
|
|
|
|
M(BAD_TYPE_OF_FIELD, 169) \
|
|
|
|
M(BAD_GET, 170) \
|
|
|
|
M(CANNOT_CREATE_DIRECTORY, 172) \
|
|
|
|
M(CANNOT_ALLOCATE_MEMORY, 173) \
|
|
|
|
M(CYCLIC_ALIASES, 174) \
|
|
|
|
M(CHUNK_NOT_FOUND, 176) \
|
|
|
|
M(DUPLICATE_CHUNK_NAME, 177) \
|
|
|
|
M(MULTIPLE_ALIASES_FOR_EXPRESSION, 178) \
|
|
|
|
M(MULTIPLE_EXPRESSIONS_FOR_ALIAS, 179) \
|
|
|
|
M(THERE_IS_NO_PROFILE, 180) \
|
|
|
|
M(ILLEGAL_FINAL, 181) \
|
|
|
|
M(ILLEGAL_PREWHERE, 182) \
|
|
|
|
M(UNEXPECTED_EXPRESSION, 183) \
|
|
|
|
M(ILLEGAL_AGGREGATION, 184) \
|
|
|
|
M(UNSUPPORTED_MYISAM_BLOCK_TYPE, 185) \
|
|
|
|
M(UNSUPPORTED_COLLATION_LOCALE, 186) \
|
|
|
|
M(COLLATION_COMPARISON_FAILED, 187) \
|
|
|
|
M(UNKNOWN_ACTION, 188) \
|
|
|
|
M(TABLE_MUST_NOT_BE_CREATED_MANUALLY, 189) \
|
|
|
|
M(SIZES_OF_ARRAYS_DOESNT_MATCH, 190) \
|
|
|
|
M(SET_SIZE_LIMIT_EXCEEDED, 191) \
|
|
|
|
M(UNKNOWN_USER, 192) \
|
|
|
|
M(WRONG_PASSWORD, 193) \
|
|
|
|
M(REQUIRED_PASSWORD, 194) \
|
|
|
|
M(IP_ADDRESS_NOT_ALLOWED, 195) \
|
|
|
|
M(UNKNOWN_ADDRESS_PATTERN_TYPE, 196) \
|
|
|
|
M(SERVER_REVISION_IS_TOO_OLD, 197) \
|
|
|
|
M(DNS_ERROR, 198) \
|
|
|
|
M(UNKNOWN_QUOTA, 199) \
|
|
|
|
M(QUOTA_DOESNT_ALLOW_KEYS, 200) \
|
|
|
|
M(QUOTA_EXPIRED, 201) \
|
|
|
|
M(TOO_MANY_SIMULTANEOUS_QUERIES, 202) \
|
|
|
|
M(NO_FREE_CONNECTION, 203) \
|
|
|
|
M(CANNOT_FSYNC, 204) \
|
|
|
|
M(NESTED_TYPE_TOO_DEEP, 205) \
|
|
|
|
M(ALIAS_REQUIRED, 206) \
|
|
|
|
M(AMBIGUOUS_IDENTIFIER, 207) \
|
|
|
|
M(EMPTY_NESTED_TABLE, 208) \
|
|
|
|
M(SOCKET_TIMEOUT, 209) \
|
|
|
|
M(NETWORK_ERROR, 210) \
|
|
|
|
M(EMPTY_QUERY, 211) \
|
|
|
|
M(UNKNOWN_LOAD_BALANCING, 212) \
|
|
|
|
M(UNKNOWN_TOTALS_MODE, 213) \
|
|
|
|
M(CANNOT_STATVFS, 214) \
|
|
|
|
M(NOT_AN_AGGREGATE, 215) \
|
|
|
|
M(QUERY_WITH_SAME_ID_IS_ALREADY_RUNNING, 216) \
|
|
|
|
M(CLIENT_HAS_CONNECTED_TO_WRONG_PORT, 217) \
|
|
|
|
M(TABLE_IS_DROPPED, 218) \
|
|
|
|
M(DATABASE_NOT_EMPTY, 219) \
|
|
|
|
M(DUPLICATE_INTERSERVER_IO_ENDPOINT, 220) \
|
|
|
|
M(NO_SUCH_INTERSERVER_IO_ENDPOINT, 221) \
|
|
|
|
M(ADDING_REPLICA_TO_NON_EMPTY_TABLE, 222) \
|
|
|
|
M(UNEXPECTED_AST_STRUCTURE, 223) \
|
|
|
|
M(REPLICA_IS_ALREADY_ACTIVE, 224) \
|
|
|
|
M(NO_ZOOKEEPER, 225) \
|
|
|
|
M(NO_FILE_IN_DATA_PART, 226) \
|
|
|
|
M(UNEXPECTED_FILE_IN_DATA_PART, 227) \
|
|
|
|
M(BAD_SIZE_OF_FILE_IN_DATA_PART, 228) \
|
|
|
|
M(QUERY_IS_TOO_LARGE, 229) \
|
|
|
|
M(NOT_FOUND_EXPECTED_DATA_PART, 230) \
|
|
|
|
M(TOO_MANY_UNEXPECTED_DATA_PARTS, 231) \
|
|
|
|
M(NO_SUCH_DATA_PART, 232) \
|
|
|
|
M(BAD_DATA_PART_NAME, 233) \
|
|
|
|
M(NO_REPLICA_HAS_PART, 234) \
|
|
|
|
M(DUPLICATE_DATA_PART, 235) \
|
|
|
|
M(ABORTED, 236) \
|
|
|
|
M(NO_REPLICA_NAME_GIVEN, 237) \
|
|
|
|
M(FORMAT_VERSION_TOO_OLD, 238) \
|
|
|
|
M(CANNOT_MUNMAP, 239) \
|
|
|
|
M(CANNOT_MREMAP, 240) \
|
|
|
|
M(MEMORY_LIMIT_EXCEEDED, 241) \
|
|
|
|
M(TABLE_IS_READ_ONLY, 242) \
|
|
|
|
M(NOT_ENOUGH_SPACE, 243) \
|
|
|
|
M(UNEXPECTED_ZOOKEEPER_ERROR, 244) \
|
|
|
|
M(CORRUPTED_DATA, 246) \
|
|
|
|
M(INCORRECT_MARK, 247) \
|
|
|
|
M(INVALID_PARTITION_VALUE, 248) \
|
|
|
|
M(NOT_ENOUGH_BLOCK_NUMBERS, 250) \
|
|
|
|
M(NO_SUCH_REPLICA, 251) \
|
|
|
|
M(TOO_MANY_PARTS, 252) \
|
|
|
|
M(REPLICA_IS_ALREADY_EXIST, 253) \
|
|
|
|
M(NO_ACTIVE_REPLICAS, 254) \
|
|
|
|
M(TOO_MANY_RETRIES_TO_FETCH_PARTS, 255) \
|
|
|
|
M(PARTITION_ALREADY_EXISTS, 256) \
|
|
|
|
M(PARTITION_DOESNT_EXIST, 257) \
|
|
|
|
M(UNION_ALL_RESULT_STRUCTURES_MISMATCH, 258) \
|
|
|
|
M(CLIENT_OUTPUT_FORMAT_SPECIFIED, 260) \
|
|
|
|
M(UNKNOWN_BLOCK_INFO_FIELD, 261) \
|
|
|
|
M(BAD_COLLATION, 262) \
|
|
|
|
M(CANNOT_COMPILE_CODE, 263) \
|
|
|
|
M(INCOMPATIBLE_TYPE_OF_JOIN, 264) \
|
|
|
|
M(NO_AVAILABLE_REPLICA, 265) \
|
|
|
|
M(MISMATCH_REPLICAS_DATA_SOURCES, 266) \
|
|
|
|
M(STORAGE_DOESNT_SUPPORT_PARALLEL_REPLICAS, 267) \
|
|
|
|
M(CPUID_ERROR, 268) \
|
|
|
|
M(INFINITE_LOOP, 269) \
|
|
|
|
M(CANNOT_COMPRESS, 270) \
|
|
|
|
M(CANNOT_DECOMPRESS, 271) \
|
|
|
|
M(CANNOT_IO_SUBMIT, 272) \
|
|
|
|
M(CANNOT_IO_GETEVENTS, 273) \
|
|
|
|
M(AIO_READ_ERROR, 274) \
|
|
|
|
M(AIO_WRITE_ERROR, 275) \
|
|
|
|
M(INDEX_NOT_USED, 277) \
|
|
|
|
M(ALL_CONNECTION_TRIES_FAILED, 279) \
|
|
|
|
M(NO_AVAILABLE_DATA, 280) \
|
|
|
|
M(DICTIONARY_IS_EMPTY, 281) \
|
|
|
|
M(INCORRECT_INDEX, 282) \
|
|
|
|
M(UNKNOWN_DISTRIBUTED_PRODUCT_MODE, 283) \
|
|
|
|
M(WRONG_GLOBAL_SUBQUERY, 284) \
|
|
|
|
M(TOO_FEW_LIVE_REPLICAS, 285) \
|
|
|
|
M(UNSATISFIED_QUORUM_FOR_PREVIOUS_WRITE, 286) \
|
|
|
|
M(UNKNOWN_FORMAT_VERSION, 287) \
|
|
|
|
M(DISTRIBUTED_IN_JOIN_SUBQUERY_DENIED, 288) \
|
|
|
|
M(REPLICA_IS_NOT_IN_QUORUM, 289) \
|
|
|
|
M(LIMIT_EXCEEDED, 290) \
|
|
|
|
M(DATABASE_ACCESS_DENIED, 291) \
|
|
|
|
M(MONGODB_CANNOT_AUTHENTICATE, 293) \
|
|
|
|
M(INVALID_BLOCK_EXTRA_INFO, 294) \
|
|
|
|
M(RECEIVED_EMPTY_DATA, 295) \
|
|
|
|
M(NO_REMOTE_SHARD_FOUND, 296) \
|
|
|
|
M(SHARD_HAS_NO_CONNECTIONS, 297) \
|
|
|
|
M(CANNOT_PIPE, 298) \
|
|
|
|
M(CANNOT_FORK, 299) \
|
|
|
|
M(CANNOT_DLSYM, 300) \
|
|
|
|
M(CANNOT_CREATE_CHILD_PROCESS, 301) \
|
|
|
|
M(CHILD_WAS_NOT_EXITED_NORMALLY, 302) \
|
|
|
|
M(CANNOT_SELECT, 303) \
|
|
|
|
M(CANNOT_WAITPID, 304) \
|
|
|
|
M(TABLE_WAS_NOT_DROPPED, 305) \
|
|
|
|
M(TOO_DEEP_RECURSION, 306) \
|
|
|
|
M(TOO_MANY_BYTES, 307) \
|
|
|
|
M(UNEXPECTED_NODE_IN_ZOOKEEPER, 308) \
|
|
|
|
M(FUNCTION_CANNOT_HAVE_PARAMETERS, 309) \
|
|
|
|
M(INVALID_SHARD_WEIGHT, 317) \
|
|
|
|
M(INVALID_CONFIG_PARAMETER, 318) \
|
|
|
|
M(UNKNOWN_STATUS_OF_INSERT, 319) \
|
|
|
|
M(VALUE_IS_OUT_OF_RANGE_OF_DATA_TYPE, 321) \
|
|
|
|
M(BARRIER_TIMEOUT, 335) \
|
|
|
|
M(UNKNOWN_DATABASE_ENGINE, 336) \
|
|
|
|
M(DDL_GUARD_IS_ACTIVE, 337) \
|
|
|
|
M(UNFINISHED, 341) \
|
|
|
|
M(METADATA_MISMATCH, 342) \
|
|
|
|
M(SUPPORT_IS_DISABLED, 344) \
|
|
|
|
M(TABLE_DIFFERS_TOO_MUCH, 345) \
|
|
|
|
M(CANNOT_CONVERT_CHARSET, 346) \
|
|
|
|
M(CANNOT_LOAD_CONFIG, 347) \
|
|
|
|
M(CANNOT_INSERT_NULL_IN_ORDINARY_COLUMN, 349) \
|
|
|
|
M(INCOMPATIBLE_SOURCE_TABLES, 350) \
|
|
|
|
M(AMBIGUOUS_TABLE_NAME, 351) \
|
|
|
|
M(AMBIGUOUS_COLUMN_NAME, 352) \
|
|
|
|
M(INDEX_OF_POSITIONAL_ARGUMENT_IS_OUT_OF_RANGE, 353) \
|
|
|
|
M(ZLIB_INFLATE_FAILED, 354) \
|
|
|
|
M(ZLIB_DEFLATE_FAILED, 355) \
|
|
|
|
M(BAD_LAMBDA, 356) \
|
|
|
|
M(RESERVED_IDENTIFIER_NAME, 357) \
|
|
|
|
M(INTO_OUTFILE_NOT_ALLOWED, 358) \
|
|
|
|
M(TABLE_SIZE_EXCEEDS_MAX_DROP_SIZE_LIMIT, 359) \
|
|
|
|
M(CANNOT_CREATE_CHARSET_CONVERTER, 360) \
|
|
|
|
M(SEEK_POSITION_OUT_OF_BOUND, 361) \
|
|
|
|
M(CURRENT_WRITE_BUFFER_IS_EXHAUSTED, 362) \
|
|
|
|
M(CANNOT_CREATE_IO_BUFFER, 363) \
|
|
|
|
M(RECEIVED_ERROR_TOO_MANY_REQUESTS, 364) \
|
|
|
|
M(SIZES_OF_NESTED_COLUMNS_ARE_INCONSISTENT, 366) \
|
|
|
|
M(TOO_MANY_FETCHES, 367) \
|
|
|
|
M(ALL_REPLICAS_ARE_STALE, 369) \
|
|
|
|
M(DATA_TYPE_CANNOT_BE_USED_IN_TABLES, 370) \
|
|
|
|
M(INCONSISTENT_CLUSTER_DEFINITION, 371) \
|
|
|
|
M(SESSION_NOT_FOUND, 372) \
|
|
|
|
M(SESSION_IS_LOCKED, 373) \
|
|
|
|
M(INVALID_SESSION_TIMEOUT, 374) \
|
|
|
|
M(CANNOT_DLOPEN, 375) \
|
|
|
|
M(CANNOT_PARSE_UUID, 376) \
|
|
|
|
M(ILLEGAL_SYNTAX_FOR_DATA_TYPE, 377) \
|
|
|
|
M(DATA_TYPE_CANNOT_HAVE_ARGUMENTS, 378) \
|
|
|
|
M(UNKNOWN_STATUS_OF_DISTRIBUTED_DDL_TASK, 379) \
|
|
|
|
M(CANNOT_KILL, 380) \
|
|
|
|
M(HTTP_LENGTH_REQUIRED, 381) \
|
|
|
|
M(CANNOT_LOAD_CATBOOST_MODEL, 382) \
|
|
|
|
M(CANNOT_APPLY_CATBOOST_MODEL, 383) \
|
|
|
|
M(PART_IS_TEMPORARILY_LOCKED, 384) \
|
|
|
|
M(MULTIPLE_STREAMS_REQUIRED, 385) \
|
|
|
|
M(NO_COMMON_TYPE, 386) \
|
|
|
|
M(DICTIONARY_ALREADY_EXISTS, 387) \
|
|
|
|
M(CANNOT_ASSIGN_OPTIMIZE, 388) \
|
|
|
|
M(INSERT_WAS_DEDUPLICATED, 389) \
|
|
|
|
M(CANNOT_GET_CREATE_TABLE_QUERY, 390) \
|
|
|
|
M(EXTERNAL_LIBRARY_ERROR, 391) \
|
|
|
|
M(QUERY_IS_PROHIBITED, 392) \
|
|
|
|
M(THERE_IS_NO_QUERY, 393) \
|
|
|
|
M(QUERY_WAS_CANCELLED, 394) \
|
|
|
|
M(FUNCTION_THROW_IF_VALUE_IS_NON_ZERO, 395) \
|
|
|
|
M(TOO_MANY_ROWS_OR_BYTES, 396) \
|
|
|
|
M(QUERY_IS_NOT_SUPPORTED_IN_MATERIALIZED_VIEW, 397) \
|
|
|
|
M(UNKNOWN_MUTATION_COMMAND, 398) \
|
|
|
|
M(FORMAT_IS_NOT_SUITABLE_FOR_OUTPUT, 399) \
|
|
|
|
M(CANNOT_STAT, 400) \
|
|
|
|
M(FEATURE_IS_NOT_ENABLED_AT_BUILD_TIME, 401) \
|
|
|
|
M(CANNOT_IOSETUP, 402) \
|
|
|
|
M(INVALID_JOIN_ON_EXPRESSION, 403) \
|
|
|
|
M(BAD_ODBC_CONNECTION_STRING, 404) \
|
|
|
|
M(PARTITION_SIZE_EXCEEDS_MAX_DROP_SIZE_LIMIT, 405) \
|
|
|
|
M(TOP_AND_LIMIT_TOGETHER, 406) \
|
|
|
|
M(DECIMAL_OVERFLOW, 407) \
|
|
|
|
M(BAD_REQUEST_PARAMETER, 408) \
|
|
|
|
M(EXTERNAL_EXECUTABLE_NOT_FOUND, 409) \
|
|
|
|
M(EXTERNAL_SERVER_IS_NOT_RESPONDING, 410) \
|
|
|
|
M(PTHREAD_ERROR, 411) \
|
|
|
|
M(NETLINK_ERROR, 412) \
|
|
|
|
M(CANNOT_SET_SIGNAL_HANDLER, 413) \
|
|
|
|
M(ALL_REPLICAS_LOST, 415) \
|
|
|
|
M(REPLICA_STATUS_CHANGED, 416) \
|
|
|
|
M(EXPECTED_ALL_OR_ANY, 417) \
|
|
|
|
M(UNKNOWN_JOIN, 418) \
|
|
|
|
M(MULTIPLE_ASSIGNMENTS_TO_COLUMN, 419) \
|
|
|
|
M(CANNOT_UPDATE_COLUMN, 420) \
|
|
|
|
M(CANNOT_ADD_DIFFERENT_AGGREGATE_STATES, 421) \
|
|
|
|
M(UNSUPPORTED_URI_SCHEME, 422) \
|
|
|
|
M(CANNOT_GETTIMEOFDAY, 423) \
|
|
|
|
M(CANNOT_LINK, 424) \
|
|
|
|
M(SYSTEM_ERROR, 425) \
|
|
|
|
M(CANNOT_COMPILE_REGEXP, 427) \
|
|
|
|
M(UNKNOWN_LOG_LEVEL, 428) \
|
|
|
|
M(FAILED_TO_GETPWUID, 429) \
|
|
|
|
M(MISMATCHING_USERS_FOR_PROCESS_AND_DATA, 430) \
|
|
|
|
M(ILLEGAL_SYNTAX_FOR_CODEC_TYPE, 431) \
|
|
|
|
M(UNKNOWN_CODEC, 432) \
|
|
|
|
M(ILLEGAL_CODEC_PARAMETER, 433) \
|
|
|
|
M(CANNOT_PARSE_PROTOBUF_SCHEMA, 434) \
|
|
|
|
M(NO_DATA_FOR_REQUIRED_PROTOBUF_FIELD, 435) \
|
|
|
|
M(PROTOBUF_BAD_CAST, 436) \
|
|
|
|
M(PROTOBUF_FIELD_NOT_REPEATED, 437) \
|
|
|
|
M(DATA_TYPE_CANNOT_BE_PROMOTED, 438) \
|
|
|
|
M(CANNOT_SCHEDULE_TASK, 439) \
|
|
|
|
M(INVALID_LIMIT_EXPRESSION, 440) \
|
|
|
|
M(CANNOT_PARSE_DOMAIN_VALUE_FROM_STRING, 441) \
|
|
|
|
M(BAD_DATABASE_FOR_TEMPORARY_TABLE, 442) \
|
|
|
|
M(NO_COMMON_COLUMNS_WITH_PROTOBUF_SCHEMA, 443) \
|
|
|
|
M(UNKNOWN_PROTOBUF_FORMAT, 444) \
|
|
|
|
M(CANNOT_MPROTECT, 445) \
|
|
|
|
M(FUNCTION_NOT_ALLOWED, 446) \
|
|
|
|
M(HYPERSCAN_CANNOT_SCAN_TEXT, 447) \
|
|
|
|
M(BROTLI_READ_FAILED, 448) \
|
|
|
|
M(BROTLI_WRITE_FAILED, 449) \
|
|
|
|
M(BAD_TTL_EXPRESSION, 450) \
|
|
|
|
M(BAD_TTL_FILE, 451) \
|
|
|
|
M(SETTING_CONSTRAINT_VIOLATION, 452) \
|
|
|
|
M(MYSQL_CLIENT_INSUFFICIENT_CAPABILITIES, 453) \
|
|
|
|
M(OPENSSL_ERROR, 454) \
|
|
|
|
M(SUSPICIOUS_TYPE_FOR_LOW_CARDINALITY, 455) \
|
|
|
|
M(UNKNOWN_QUERY_PARAMETER, 456) \
|
|
|
|
M(BAD_QUERY_PARAMETER, 457) \
|
|
|
|
M(CANNOT_UNLINK, 458) \
|
|
|
|
M(CANNOT_SET_THREAD_PRIORITY, 459) \
|
|
|
|
M(CANNOT_CREATE_TIMER, 460) \
|
|
|
|
M(CANNOT_SET_TIMER_PERIOD, 461) \
|
|
|
|
M(CANNOT_DELETE_TIMER, 462) \
|
|
|
|
M(CANNOT_FCNTL, 463) \
|
|
|
|
M(CANNOT_PARSE_ELF, 464) \
|
|
|
|
M(CANNOT_PARSE_DWARF, 465) \
|
|
|
|
M(INSECURE_PATH, 466) \
|
|
|
|
M(CANNOT_PARSE_BOOL, 467) \
|
|
|
|
M(CANNOT_PTHREAD_ATTR, 468) \
|
|
|
|
M(VIOLATED_CONSTRAINT, 469) \
|
|
|
|
M(QUERY_IS_NOT_SUPPORTED_IN_LIVE_VIEW, 470) \
|
|
|
|
M(INVALID_SETTING_VALUE, 471) \
|
|
|
|
M(READONLY_SETTING, 472) \
|
|
|
|
M(DEADLOCK_AVOIDED, 473) \
|
|
|
|
M(INVALID_TEMPLATE_FORMAT, 474) \
|
|
|
|
M(INVALID_WITH_FILL_EXPRESSION, 475) \
|
|
|
|
M(WITH_TIES_WITHOUT_ORDER_BY, 476) \
|
|
|
|
M(INVALID_USAGE_OF_INPUT, 477) \
|
|
|
|
M(UNKNOWN_POLICY, 478) \
|
|
|
|
M(UNKNOWN_DISK, 479) \
|
|
|
|
M(UNKNOWN_PROTOCOL, 480) \
|
|
|
|
M(PATH_ACCESS_DENIED, 481) \
|
|
|
|
M(DICTIONARY_ACCESS_DENIED, 482) \
|
|
|
|
M(TOO_MANY_REDIRECTS, 483) \
|
|
|
|
M(INTERNAL_REDIS_ERROR, 484) \
|
|
|
|
M(SCALAR_ALREADY_EXISTS, 485) \
|
|
|
|
M(CANNOT_GET_CREATE_DICTIONARY_QUERY, 487) \
|
|
|
|
M(UNKNOWN_DICTIONARY, 488) \
|
|
|
|
M(INCORRECT_DICTIONARY_DEFINITION, 489) \
|
|
|
|
M(CANNOT_FORMAT_DATETIME, 490) \
|
|
|
|
M(UNACCEPTABLE_URL, 491) \
|
|
|
|
M(ACCESS_ENTITY_NOT_FOUND, 492) \
|
|
|
|
M(ACCESS_ENTITY_ALREADY_EXISTS, 493) \
|
|
|
|
M(ACCESS_ENTITY_FOUND_DUPLICATES, 494) \
|
|
|
|
M(ACCESS_STORAGE_READONLY, 495) \
|
|
|
|
M(QUOTA_REQUIRES_CLIENT_KEY, 496) \
|
|
|
|
M(ACCESS_DENIED, 497) \
|
|
|
|
M(LIMIT_BY_WITH_TIES_IS_NOT_SUPPORTED, 498) \
|
|
|
|
M(S3_ERROR, 499) \
|
|
|
|
M(CANNOT_CREATE_DATABASE, 501) \
|
|
|
|
M(CANNOT_SIGQUEUE, 502) \
|
|
|
|
M(AGGREGATE_FUNCTION_THROW, 503) \
|
|
|
|
M(FILE_ALREADY_EXISTS, 504) \
|
|
|
|
M(CANNOT_DELETE_DIRECTORY, 505) \
|
|
|
|
M(UNEXPECTED_ERROR_CODE, 506) \
|
|
|
|
M(UNABLE_TO_SKIP_UNUSED_SHARDS, 507) \
|
|
|
|
M(UNKNOWN_ACCESS_TYPE, 508) \
|
|
|
|
M(INVALID_GRANT, 509) \
|
|
|
|
M(CACHE_DICTIONARY_UPDATE_FAIL, 510) \
|
|
|
|
M(UNKNOWN_ROLE, 511) \
|
|
|
|
M(SET_NON_GRANTED_ROLE, 512) \
|
|
|
|
M(UNKNOWN_PART_TYPE, 513) \
|
|
|
|
M(ACCESS_STORAGE_FOR_INSERTION_NOT_FOUND, 514) \
|
|
|
|
M(INCORRECT_ACCESS_ENTITY_DEFINITION, 515) \
|
|
|
|
M(AUTHENTICATION_FAILED, 516) \
|
|
|
|
M(CANNOT_ASSIGN_ALTER, 517) \
|
|
|
|
M(CANNOT_COMMIT_OFFSET, 518) \
|
|
|
|
M(NO_REMOTE_SHARD_AVAILABLE, 519) \
|
|
|
|
M(CANNOT_DETACH_DICTIONARY_AS_TABLE, 520) \
|
|
|
|
M(ATOMIC_RENAME_FAIL, 521) \
|
|
|
|
M(UNKNOWN_ROW_POLICY, 523) \
|
|
|
|
M(ALTER_OF_COLUMN_IS_FORBIDDEN, 524) \
|
|
|
|
M(INCORRECT_DISK_INDEX, 525) \
|
|
|
|
M(UNKNOWN_VOLUME_TYPE, 526) \
|
|
|
|
M(NO_SUITABLE_FUNCTION_IMPLEMENTATION, 527) \
|
|
|
|
M(CASSANDRA_INTERNAL_ERROR, 528) \
|
|
|
|
M(NOT_A_LEADER, 529) \
|
|
|
|
M(CANNOT_CONNECT_RABBITMQ, 530) \
|
|
|
|
M(CANNOT_FSTAT, 531) \
|
|
|
|
M(LDAP_ERROR, 532) \
|
|
|
|
M(INCONSISTENT_RESERVATIONS, 533) \
|
|
|
|
M(NO_RESERVATIONS_PROVIDED, 534) \
|
|
|
|
M(UNKNOWN_RAID_TYPE, 535) \
|
|
|
|
M(CANNOT_RESTORE_FROM_FIELD_DUMP, 536) \
|
|
|
|
M(ILLEGAL_MYSQL_VARIABLE, 537) \
|
|
|
|
M(MYSQL_SYNTAX_ERROR, 538) \
|
|
|
|
M(CANNOT_BIND_RABBITMQ_EXCHANGE, 539) \
|
|
|
|
M(CANNOT_DECLARE_RABBITMQ_EXCHANGE, 540) \
|
|
|
|
M(CANNOT_CREATE_RABBITMQ_QUEUE_BINDING, 541) \
|
|
|
|
M(CANNOT_REMOVE_RABBITMQ_EXCHANGE, 542) \
|
|
|
|
M(UNKNOWN_MYSQL_DATATYPES_SUPPORT_LEVEL, 543) \
|
|
|
|
M(ROW_AND_ROWS_TOGETHER, 544) \
|
|
|
|
M(FIRST_AND_NEXT_TOGETHER, 545) \
|
|
|
|
M(NO_ROW_DELIMITER, 546) \
|
|
|
|
M(INVALID_RAID_TYPE, 547) \
|
|
|
|
M(UNKNOWN_VOLUME, 548) \
|
|
|
|
\
|
|
|
|
M(KEEPER_EXCEPTION, 999) \
|
|
|
|
M(POCO_EXCEPTION, 1000) \
|
|
|
|
M(STD_EXCEPTION, 1001) \
|
|
|
|
M(UNKNOWN_EXCEPTION, 1002) \
|
|
|
|
\
|
|
|
|
M(CONDITIONAL_TREE_PARENT_NOT_FOUND, 2001) \
|
|
|
|
M(ILLEGAL_PROJECTION_MANIPULATOR, 2002) \
|
|
|
|
M(UNRECOGNIZED_ARGUMENTS, 2003)
|
|
|
|
/* See DB::ErrorCodes::END */
|
|
|
|
|
2016-01-11 21:46:36 +00:00
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
|
|
|
namespace ErrorCodes
|
|
|
|
{
|
2020-10-29 07:07:42 +00:00
|
|
|
#define M(NAME, VALUE) extern const Value NAME = VALUE;
|
|
|
|
APPLY_FOR_ERROR_CODES(M)
|
|
|
|
#undef M
|
|
|
|
|
|
|
|
constexpr Value END = 3000;
|
|
|
|
std::atomic<Value> values[END+1] {};
|
2016-01-12 03:17:33 +00:00
|
|
|
|
2020-10-29 07:07:42 +00:00
|
|
|
struct ErrorCodesNames
|
|
|
|
{
|
|
|
|
const char * strings[END+1];
|
|
|
|
ErrorCodesNames()
|
|
|
|
{
|
|
|
|
#define M(NAME, VALUE) strings[VALUE] = #NAME;
|
|
|
|
APPLY_FOR_ERROR_CODES(M)
|
|
|
|
#undef M
|
|
|
|
}
|
|
|
|
} error_codes_names;
|
2016-01-11 21:46:36 +00:00
|
|
|
|
2020-10-29 07:07:42 +00:00
|
|
|
std::string_view getName(ErrorCode error_code)
|
|
|
|
{
|
|
|
|
if (error_code >= END)
|
|
|
|
return std::string_view();
|
|
|
|
const char * name = error_codes_names.strings[error_code];
|
|
|
|
if (!name)
|
|
|
|
return std::string_view();
|
|
|
|
return std::string_view(name);
|
|
|
|
}
|
2018-04-24 07:16:39 +00:00
|
|
|
|
2020-10-29 07:07:42 +00:00
|
|
|
ErrorCode end() { return END+1; }
|
2016-01-11 21:46:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|