📄 ndberror.c
字号:
/* Copyright (C) 2003 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */#include <ndb_global.h>#include <ndberror.h>#include <m_string.h>typedef struct ErrorBundle { int code; ndberror_classification classification; const char * message;} ErrorBundle;/** * Shorter names in table below */#define ST_S ndberror_st_success#define ST_P ndberror_st_permanent#define ST_T ndberror_st_temporary#define ST_U ndberror_st_unknown#define NE ndberror_cl_none#define AE ndberror_cl_application#define CE ndberror_cl_configuration#define ND ndberror_cl_no_data_found#define CV ndberror_cl_constraint_violation#define SE ndberror_cl_schema_error#define UD ndberror_cl_user_defined#define IS ndberror_cl_insufficient_space#define TR ndberror_cl_temporary_resource#define NR ndberror_cl_node_recovery#define OL ndberror_cl_overload#define TO ndberror_cl_timeout_expired#define NS ndberror_cl_node_shutdown#define UR ndberror_cl_unknown_result#define IE ndberror_cl_internal_error#define NI ndberror_cl_function_not_implemented#define UE ndberror_cl_unknown_error_code#define OE ndberror_cl_schema_object_already_existsstatic const char* empty_string = "";/* * Error code ranges are reserved for respective block * * 200 - TC * 300 - DIH * 400 - LQH * 600 - ACC * 700 - DICT * 800 - TUP * 900 - TUX * 1200 - LQH * 1300 - BACKUP * 4000 - API * 4100 - "" * 4200 - "" * 4300 - "" * 4400 - "" * 4500 - "" * 4600 - "" * 4700 - "" Event * 5000 - Management server */staticconst ErrorBundle ErrorCodes[] = { /** * No error */ { 0, NE, "No error" }, /** * NoDataFound */ { 626, ND, "Tuple did not exist" }, /** * ConstraintViolation */ { 630, CV, "Tuple already existed when attempting to insert" }, { 840, CV, "Trying to set a NOT NULL attribute to NULL" }, { 893, CV, "Constraint violation e.g. duplicate value in unique index" }, /** * Node recovery errors */ { 286, NR, "Node failure caused abort of transaction" }, { 250, NR, "Node where lock was held crashed, restart scan transaction" }, { 499, NR, "Scan take over error, restart scan transaction" }, { 1204, NR, "Temporary failure, distribution changed" }, { 4002, NR, "Send to NDB failed" }, { 4010, NR, "Node failure caused abort of transaction" }, { 4025, NR, "Node failure caused abort of transaction" }, { 4027, NR, "Node failure caused abort of transaction" }, { 4028, NR, "Node failure caused abort of transaction" }, { 4029, NR, "Node failure caused abort of transaction" }, { 4031, NR, "Node failure caused abort of transaction" }, { 4033, NR, "Send to NDB failed" }, { 4115, NR, "Transaction was committed but all read information was not " "received due to node crash" }, { 4119, NR, "Simple/dirty read failed due to node failure" }, /** * Node shutdown */ { 280, NS, "Transaction aborted due to node shutdown" }, /* This scan trans had an active fragment scan in a LQH which have crashed */ { 270, NS, "Transaction aborted due to node shutdown" }, { 1223, NS, "Read operation aborted due to node shutdown" }, { 4023, NS, "Transaction aborted due to node shutdown" }, { 4030, NS, "Transaction aborted due to node shutdown" }, { 4034, NS, "Transaction aborted due to node shutdown" }, /** * Unknown result */ { 4008, UR, "Receive from NDB failed" }, { 4009, UR, "Cluster Failure" }, { 4012, UR, "Request ndbd time-out, maybe due to high load or communication problems"}, { 4024, UR, "Time-out, most likely caused by simple read or cluster failure" }, /** * TemporaryResourceError */ { 217, TR, "217" }, { 218, TR, "218" }, { 219, TR, "219" }, { 233, TR, "Out of operation records in transaction coordinator (increase MaxNoOfConcurrentOperations)" }, { 275, TR, "275" }, { 279, TR, "Out of transaction markers in transaction coordinator" }, { 414, TR, "414" }, { 418, TR, "Out of transaction buffers in LQH" }, { 419, TR, "419" }, { 245, TR, "Too many active scans" }, { 488, TR, "Too many active scans" }, { 490, TR, "Too many active scans" }, { 805, TR, "Out of attrinfo records in tuple manager" }, { 830, TR, "Out of add fragment operation records" }, { 873, TR, "Out of attrinfo records for scan in tuple manager" }, { 1217, TR, "Out of operation records in local data manager (increase MaxNoOfLocalOperations)" }, { 1220, TR, "REDO log files overloaded, consult online manual (decrease TimeBetweenLocalCheckpoints, and|or increase NoOfFragmentLogFiles)" }, { 1222, TR, "Out of transaction markers in LQH" }, { 1224, TR, "Out of Send Buffer space in LQH" }, { 4021, TR, "Out of Send Buffer space in NDB API" }, { 4022, TR, "Out of Send Buffer space in NDB API" }, { 4032, TR, "Out of Send Buffer space in NDB API" }, { 288, TR, "Out of index operations in transaction coordinator (increase MaxNoOfConcurrentIndexOperations)" }, /** * InsufficientSpace */ { 623, IS, "623" }, { 624, IS, "624" }, { 625, IS, "Out of memory in Ndb Kernel, hash index part (increase IndexMemory)" }, { 640, IS, "Too many hash indexes (should not happen)" }, { 826, IS, "Too many tables and attributes (increase MaxNoOfAttributes or MaxNoOfTables)" }, { 827, IS, "Out of memory in Ndb Kernel, table data (increase DataMemory)" }, { 902, IS, "Out of memory in Ndb Kernel, ordered index data (increase DataMemory)" }, { 903, IS, "Too many ordered indexes (increase MaxNoOfOrderedIndexes)" }, { 904, IS, "Out of fragment records (increase MaxNoOfOrderedIndexes)" }, { 905, IS, "Out of attribute records (increase MaxNoOfAttributes)" }, /** * TimeoutExpired */ { 266, TO, "Time-out in NDB, probably caused by deadlock" }, { 274, TO, "Time-out in NDB, probably caused by deadlock" }, /* Scan trans timeout */ { 296, TO, "Time-out in NDB, probably caused by deadlock" }, /* Scan trans timeout */ { 297, TO, "Time-out in NDB, probably caused by deadlock" }, /* Scan trans timeout, temporary!! */ { 237, TO, "Transaction had timed out when trying to commit it" }, /** * OverloadError */ { 410, OL, "REDO log files overloaded, consult online manual (decrease TimeBetweenLocalCheckpoints, and|or increase NoOfFragmentLogFiles)" }, { 677, OL, "Index UNDO buffers overloaded (increase UndoIndexBuffer)" }, { 891, OL, "Data UNDO buffers overloaded (increase UndoDataBuffer)" }, { 1221, OL, "REDO buffers overloaded, consult online manual (increase RedoBuffer)" }, { 4006, OL, "Connect failure - out of connection objects (increase MaxNoOfConcurrentTransactions)" }, /** * Internal errors */ { 892, IE, "Inconsistent hash index. The index needs to be dropped and recreated" }, { 896, IE, "Tuple corrupted - wrong checksum or column data in invalid format" }, { 901, IE, "Inconsistent ordered index. The index needs to be dropped and recreated" }, { 202, IE, "202" }, { 203, IE, "203" }, { 207, IE, "207" }, { 208, IE, "208" }, { 209, IE, "Communication problem, signal error" }, { 220, IE, "220" }, { 230, IE, "230" }, { 232, IE, "232" }, { 238, IE, "238" }, { 271, IE, "Simple Read transaction without any attributes to read" }, { 272, IE, "Update operation without any attributes to update" }, { 276, IE, "276" }, { 277, IE, "277" }, { 278, IE, "278" }, { 287, IE, "Index corrupted" }, { 290, IE, "Corrupt key in TC, unable to xfrm" }, { 631, IE, "631" }, { 632, IE, "632" }, { 702, IE, "Request to non-master" }, { 706, IE, "Inconsistency during table creation" }, { 809, IE, "809" }, { 812, IE, "812" }, { 829, IE, "829" }, { 833, IE, "833" }, { 839, IE, "Illegal null attribute" }, { 871, IE, "871" }, { 882, IE, "882" }, { 883, IE, "883" }, { 887, IE, "887" }, { 888, IE, "888" }, { 890, IE, "890" }, { 4000, IE, "MEMORY ALLOCATION ERROR" }, { 4001, IE, "Signal Definition Error" }, { 4005, IE, "Internal Error in NdbApi" }, { 4011, IE, "Internal Error in NdbApi" }, { 4107, IE, "Simple Transaction and Not Start" }, { 4108, IE, "Faulty operation type" }, { 4109, IE, "Faulty primary key attribute length" }, { 4110, IE, "Faulty length in ATTRINFO signal" }, { 4111, IE, "Status Error in NdbConnection" }, { 4113, IE, "Too many operations received" }, { 4320, IE, "Cannot use the same object twice to create table" }, { 4321, IE, "Trying to start two schema transactions" }, { 4344, IE, "Only DBDICT and TRIX can send requests to TRIX" }, { 4345, IE, "TRIX block is not available yet, probably due to node failure" }, { 4346, IE, "Internal error at index create/build" }, { 4347, IE, "Bad state at alter index" }, { 4348, IE, "Inconsistency detected at alter index" }, { 4349, IE, "Inconsistency detected at index usage" }, { 4350, IE, "Transaction already aborted" }, /** * Application error */ { 823, AE, "Too much attrinfo from application in tuple manager" }, { 831, AE, "Too many nullable/bitfields in table definition" }, { 876, AE, "876" }, { 877, AE, "877" }, { 878, AE, "878" }, { 879, AE, "879" }, { 880, AE, "Tried to read too much - too many getValue calls" }, { 884, AE, "Stack overflow in interpreter" }, { 885, AE, "Stack underflow in interpreter" }, { 886, AE, "More than 65535 instructions executed in interpreter" }, { 897, AE, "Update attempt of primary key via ndbcluster internal api (if this occurs via the MySQL server it is a bug, please report)" }, { 4256, AE, "Must call Ndb::init() before this function" }, { 4257, AE, "Tried to read too much - too many getValue calls" }, /** * Scan application errors */ { 242, AE, "Zero concurrency in scan"}, { 244, AE, "Too high concurrency in scan"}, { 269, AE, "No condition and attributes to read in scan"}, { 4600, AE, "Transaction is already started"}, { 4601, AE, "Transaction is not started"}, { 4602, AE, "You must call getNdbOperation before executeScan" }, { 4603, AE, "There can only be ONE operation in a scan transaction" }, { 4604, AE, "takeOverScanOp, opType must be UpdateRequest or DeleteRequest" }, { 4605, AE, "You may only call openScanRead or openScanExclusive once for each operation"}, { 4607, AE, "There may only be one operation in a scan transaction"}, { 4608, AE, "You can not takeOverScan unless you have used openScanExclusive"}, { 4609, AE, "You must call nextScanResult before trying to takeOverScan"}, { 4232, AE, "Parallelism can only be between 1 and 240" }, /** * Event schema errors */ { 4713, SE, "Column defined in event does not exist in table"}, /** * Event application errors */ { 4707, AE, "Too many event have been defined"}, { 4708, AE, "Event name is too long"}, { 4709, AE, "Can't accept more subscribers"}, { 746, OE, "Event name already exists"}, { 4710, AE, "Event not found"}, { 4711, AE, "Creation of event failed"}, { 4712, AE, "Stopped event operation does not exist. Already stopped?"}, /** * Event internal errors */ { 4731, IE, "Event not found"}, /** * SchemaError */ { 701, SE, "System busy with other schema operation" }, { 703, SE, "Invalid table format" }, { 704, SE, "Attribute name too long" }, { 705, SE, "Table name too long" }, { 707, SE, "No more table metadata records (increase MaxNoOfTables)" }, { 708, SE, "No more attribute metadata records (increase MaxNoOfAttributes)" }, { 709, SE, "No such table existed" }, { 721, OE, "Table or index with given name already exists" }, { 723, SE, "No such table existed" }, { 736, SE, "Unsupported array size" }, { 737, SE, "Attribute array size too big" }, { 738, SE, "Record too big" }, { 739, SE, "Unsupported primary key length" }, { 740, SE, "Nullable primary key not supported" }, { 741, SE, "Unsupported alter table" }, { 743, SE, "Unsupported character set in table or index" }, { 744, SE, "Character string is invalid for given character set" }, { 745, SE, "Distribution key not supported for char attribute (use binary attribute)" }, { 761, SE, "Unable to drop table as backup is in progress" }, { 762, SE, "Unable to alter table as backup is in progress" }, { 241, SE, "Invalid schema object version" }, { 283, SE, "Table is being dropped" }, { 284, SE, "Table not defined in transaction coordinator" },
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -