643
643
#endif /* __WIN__ */
645
/*************************************************************//**
646
Convert an error number to a human readable text message. The
647
returned string is static and should not be freed or modified.
648
@return string, describing the error */
653
enum db_err num) /*!< in: error number */
659
return("Generic error");
661
return("Operation interrupted");
662
case DB_OUT_OF_MEMORY:
663
return("Cannot allocate memory");
664
case DB_OUT_OF_FILE_SPACE:
665
return("Out of disk space");
672
case DB_DUPLICATE_KEY:
673
return("Duplicate key");
674
case DB_QUE_THR_SUSPENDED:
675
return("The queue thread has been suspended");
676
case DB_MISSING_HISTORY:
677
return("Required history data has been deleted");
678
case DB_CLUSTER_NOT_FOUND:
679
return("Cluster not found");
680
case DB_TABLE_NOT_FOUND:
681
return("Table not found");
682
case DB_MUST_GET_MORE_FILE_SPACE:
683
return("More file space needed");
684
case DB_TABLE_IS_BEING_USED:
685
return("Table is being used");
686
case DB_TOO_BIG_RECORD:
687
return("Record too big");
688
case DB_LOCK_WAIT_TIMEOUT:
689
return("Lock wait timeout");
690
case DB_NO_REFERENCED_ROW:
691
return("Referenced key value not found");
692
case DB_ROW_IS_REFERENCED:
693
return("Row is referenced");
694
case DB_CANNOT_ADD_CONSTRAINT:
695
return("Cannot add constraint");
697
return("Data structure corruption");
698
case DB_COL_APPEARS_TWICE_IN_INDEX:
699
return("Column appears twice in index");
700
case DB_CANNOT_DROP_CONSTRAINT:
701
return("Cannot drop constraint");
702
case DB_NO_SAVEPOINT:
703
return("No such savepoint");
704
case DB_TABLESPACE_ALREADY_EXISTS:
705
return("Tablespace already exists");
706
case DB_TABLESPACE_DELETED:
707
return("No such tablespace");
708
case DB_LOCK_TABLE_FULL:
709
return("Lock structs have exhausted the buffer pool");
710
case DB_FOREIGN_DUPLICATE_KEY:
711
return("Foreign key activated with duplicate keys");
712
case DB_TOO_MANY_CONCURRENT_TRXS:
713
return("Too many concurrent transactions");
715
return("Unsupported");
716
case DB_PRIMARY_KEY_IS_NULL:
717
return("Primary key is NULL");
718
case DB_STATS_DO_NOT_EXIST:
719
return("Persistent statistics do not exist");
721
return("Failed, retry may succeed");
727
return("Failed, retry will not succeed");
728
case DB_ZIP_OVERFLOW:
729
return("Zip overflow");
730
case DB_RECORD_NOT_FOUND:
731
return("Record not found");
732
case DB_END_OF_INDEX:
733
return("End of index");
734
/* do not add default: in order to produce a warning if new code
735
is added to the enum but not added here */
738
/* we abort here because if unknown error code is given, this could
739
mean that memory corruption has happened and someone's error-code
740
variable has been overwritten with bogus data */
744
return("Unknown error");