~ubuntu-branches/ubuntu/precise/mysql-5.1/precise

« back to all changes in this revision

Viewing changes to storage/ibmdb2i/db2i_errors.h

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Tretkowski
  • Date: 2010-03-17 14:56:02 UTC
  • Revision ID: james.westby@ubuntu.com-20100317145602-x7e30l1b2sb5s6w6
Tags: upstream-5.1.45
ImportĀ upstreamĀ versionĀ 5.1.45

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
Licensed Materials - Property of IBM
 
3
DB2 Storage Engine Enablement
 
4
Copyright IBM Corporation 2007,2008
 
5
All rights reserved
 
6
 
 
7
Redistribution and use in source and binary forms, with or without modification,
 
8
are permitted provided that the following conditions are met: 
 
9
 (a) Redistributions of source code must retain this list of conditions, the
 
10
     copyright notice in section {d} below, and the disclaimer following this
 
11
     list of conditions. 
 
12
 (b) Redistributions in binary form must reproduce this list of conditions, the
 
13
     copyright notice in section (d) below, and the disclaimer following this
 
14
     list of conditions, in the documentation and/or other materials provided
 
15
     with the distribution. 
 
16
 (c) The name of IBM may not be used to endorse or promote products derived from
 
17
     this software without specific prior written permission. 
 
18
 (d) The text of the required copyright notice is: 
 
19
       Licensed Materials - Property of IBM
 
20
       DB2 Storage Engine Enablement 
 
21
       Copyright IBM Corporation 2007,2008 
 
22
       All rights reserved
 
23
 
 
24
THIS SOFTWARE IS PROVIDED BY IBM CORPORATION "AS IS" AND ANY EXPRESS OR IMPLIED
 
25
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 
26
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
 
27
SHALL IBM CORPORATION BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 
28
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
 
29
OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 
30
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 
31
CONTRACT, STRICT LIABILITY, OR TORT INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
 
32
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
 
33
OF SUCH DAMAGE.
 
34
*/
 
35
 
 
36
 
 
37
#ifndef DB2I_ERRORS_H
 
38
#define DB2I_ERRORS_H
 
39
 
 
40
#include "qmyse.h"
 
41
class THD;
 
42
 
 
43
/**
 
44
  @enum DB2I_errors
 
45
  
 
46
  @brief These are the errors that can be returned by the storage engine proper 
 
47
  and that are specific to the engine. Refer to db2i_errors.cc for text
 
48
  descriptions of the errors.
 
49
*/
 
50
 
 
51
enum DB2I_errors
 
52
{
 
53
  DB2I_FIRST_ERR = 2500,
 
54
  DB2I_ERR_ICONV_OPEN,
 
55
  DB2I_ERR_INVALID_NAME,
 
56
  DB2I_ERR_RENAME_MOVE,
 
57
  DB2I_ERR_UNSUPP_CHARSET,
 
58
  DB2I_ERR_PART_AUTOINC,
 
59
  DB2I_ERR_UNKNOWN_ENCODING,
 
60
  DB2I_ERR_RESERVED,
 
61
  DB2I_ERR_TABLE_NOT_FOUND,
 
62
  DB2I_ERR_RESOLVE_OBJ,
 
63
  DB2I_ERR_PGMCALL,
 
64
  DB2I_ERR_ILECALL,
 
65
  DB2I_ERR_ICONV,
 
66
  DB2I_ERR_QTQGESP,
 
67
  DB2I_ERR_QTQGRDC,
 
68
  DB2I_ERR_INVALID_COL_VALUE,
 
69
  DB2I_ERR_TOO_LONG_SCHEMA,
 
70
  DB2I_ERR_MIXED_COLLATIONS,
 
71
  DB2I_ERR_SRTSEQ,
 
72
  DB2I_ERR_SUB_CHARS,
 
73
  DB2I_ERR_PRECISION,
 
74
  DB2I_ERR_INVALID_DATA,
 
75
  DB2I_ERR_RESERVED2,
 
76
  DB2I_ERR_ILL_CHAR,
 
77
  DB2I_ERR_BAD_RDB_NAME,
 
78
  DB2I_ERR_UNKNOWN_IDX,
 
79
  DB2I_ERR_DISCOVERY_MISMATCH,
 
80
  DB2I_ERR_WARN_CREATE_DISCOVER,
 
81
  DB2I_ERR_WARN_COL_ATTRS,
 
82
  DB2I_LAST_ERR = DB2I_ERR_WARN_COL_ATTRS
 
83
};
 
84
 
 
85
void getErrTxt(int errcode, ...);
 
86
void reportSystemAPIError(int errCode, const Qmy_Error_output *errInfo);
 
87
void warning(THD *thd, int errCode, ...);
 
88
 
 
89
const char* DB2I_SQL0350 = "\xE2\xD8\xD3\xF0\xF3\xF5\xF0"; // SQL0350 in EBCDIC
 
90
const char* DB2I_CPF503A = "\xC3\xD7\xC6\xF5\xF0\xF3\xC1"; // CPF503A in EBCDIC
 
91
const char* DB2I_SQL0538 = "\xE2\xD8\xD3\xF0\xF5\xF3\xF8"; // SQL0538 in EBCDIC
 
92
 
 
93
#endif