~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/innobase/ut/ut0ut.c

  • Committer: Lee Bieber
  • Date: 2010-10-27 18:28:56 UTC
  • mfrom: (1883.1.3 build)
  • Revision ID: kalebral@gmail.com-20101027182856-q3wqtbv1t4egkjsk
Merge Andrew - fix bug 667360: --defaults-file not processed before paths read           
Merge Andrew - fix bug 656577: Importing SQL script results in silent failure    
Merge Andrew - fix bug 667053: drizzledump minor output cleanup needed

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*****************************************************************************
2
2
 
3
 
Copyright (C) 1994, 2010, Innobase Oy. All Rights Reserved.
4
 
Copyright (C) 2009 Sun Microsystems, Inc.
 
3
Copyright (c) 1994, 2009, Innobase Oy. All Rights Reserved.
 
4
Copyright (c) 2009, Sun Microsystems, Inc.
5
5
 
6
6
Portions of this file contain modifications contributed and copyrighted by
7
7
Sun Microsystems, Inc. Those modifications are gratefully acknowledged and
641
641
        return(res);
642
642
}
643
643
#endif /* __WIN__ */
644
 
 
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 */
649
 
UNIV_INTERN
650
 
const char*
651
 
ut_strerr(
652
 
/*======*/
653
 
        enum db_err     num)    /*!< in: error number */
654
 
{
655
 
        switch (num) {
656
 
        case DB_SUCCESS:
657
 
                return("Success");
658
 
        case DB_SUCCESS_LOCKED_REC:
659
 
                return("Success, record lock created");
660
 
        case DB_ERROR:
661
 
                return("Generic error");
662
 
        case DB_INTERRUPTED:
663
 
                return("Operation interrupted");
664
 
        case DB_OUT_OF_MEMORY:
665
 
                return("Cannot allocate memory");
666
 
        case DB_OUT_OF_FILE_SPACE:
667
 
                return("Out of disk space");
668
 
        case DB_LOCK_WAIT:
669
 
                return("Lock wait");
670
 
        case DB_DEADLOCK:
671
 
                return("Deadlock");
672
 
        case DB_ROLLBACK:
673
 
                return("Rollback");
674
 
        case DB_DUPLICATE_KEY:
675
 
                return("Duplicate key");
676
 
        case DB_QUE_THR_SUSPENDED:
677
 
                return("The queue thread has been suspended");
678
 
        case DB_MISSING_HISTORY:
679
 
                return("Required history data has been deleted");
680
 
        case DB_CLUSTER_NOT_FOUND:
681
 
                return("Cluster not found");
682
 
        case DB_TABLE_NOT_FOUND:
683
 
                return("Table not found");
684
 
        case DB_MUST_GET_MORE_FILE_SPACE:
685
 
                return("More file space needed");
686
 
        case DB_TABLE_IS_BEING_USED:
687
 
                return("Table is being used");
688
 
        case DB_TOO_BIG_RECORD:
689
 
                return("Record too big");
690
 
        case DB_LOCK_WAIT_TIMEOUT:
691
 
                return("Lock wait timeout");
692
 
        case DB_NO_REFERENCED_ROW:
693
 
                return("Referenced key value not found");
694
 
        case DB_ROW_IS_REFERENCED:
695
 
                return("Row is referenced");
696
 
        case DB_CANNOT_ADD_CONSTRAINT:
697
 
                return("Cannot add constraint");
698
 
        case DB_CORRUPTION:
699
 
                return("Data structure corruption");
700
 
        case DB_COL_APPEARS_TWICE_IN_INDEX:
701
 
                return("Column appears twice in index");
702
 
        case DB_CANNOT_DROP_CONSTRAINT:
703
 
                return("Cannot drop constraint");
704
 
        case DB_NO_SAVEPOINT:
705
 
                return("No such savepoint");
706
 
        case DB_TABLESPACE_ALREADY_EXISTS:
707
 
                return("Tablespace already exists");
708
 
        case DB_TABLESPACE_DELETED:
709
 
                return("No such tablespace");
710
 
        case DB_LOCK_TABLE_FULL:
711
 
                return("Lock structs have exhausted the buffer pool");
712
 
        case DB_FOREIGN_DUPLICATE_KEY:
713
 
                return("Foreign key activated with duplicate keys");
714
 
        case DB_FOREIGN_EXCEED_MAX_CASCADE:
715
 
                return("Foreign key cascade delete/update exceeds max depth");
716
 
        case DB_TOO_MANY_CONCURRENT_TRXS:
717
 
                return("Too many concurrent transactions");
718
 
        case DB_UNSUPPORTED:
719
 
                return("Unsupported");
720
 
        case DB_PRIMARY_KEY_IS_NULL:
721
 
                return("Primary key is NULL");
722
 
        case DB_STATS_DO_NOT_EXIST:
723
 
                return("Persistent statistics do not exist");
724
 
        case DB_FAIL:
725
 
                return("Failed, retry may succeed");
726
 
        case DB_OVERFLOW:
727
 
                return("Overflow");
728
 
        case DB_UNDERFLOW:
729
 
                return("Underflow");
730
 
        case DB_STRONG_FAIL:
731
 
                return("Failed, retry will not succeed");
732
 
        case DB_ZIP_OVERFLOW:
733
 
                return("Zip overflow");
734
 
        case DB_RECORD_NOT_FOUND:
735
 
                return("Record not found");
736
 
        case DB_CHILD_NO_INDEX:
737
 
                return("No index on referencing keys in referencing table");
738
 
        case DB_PARENT_NO_INDEX:
739
 
                return("No index on referenced keys in referenced table");
740
 
        case DB_END_OF_INDEX:
741
 
                return("End of index");
742
 
        /* do not add default: in order to produce a warning if new code
743
 
        is added to the enum but not added here */
744
 
        }
745
 
 
746
 
        /* we abort here because if unknown error code is given, this could
747
 
        mean that memory corruption has happened and someone's error-code
748
 
        variable has been overwritten with bogus data */
749
 
        ut_error;
750
 
 
751
 
        /* NOT REACHED */
752
 
        return("Unknown error");
753
 
}