1208.3.3
by brian
Adding missingfile. |
1 |
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
|
2 |
* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
|
|
3 |
*
|
|
1999.6.1
by kalebral at gmail
update Copyright strings to a more common format to help with creating the master debian copyright file |
4 |
* Copyright (C) 2008 Sun Microsystems, Inc.
|
1208.3.3
by brian
Adding missingfile. |
5 |
*
|
6 |
* This program is free software; you can redistribute it and/or modify
|
|
7 |
* it under the terms of the GNU General Public License as published by
|
|
8 |
* the Free Software Foundation; version 2 of the License.
|
|
9 |
*
|
|
10 |
* This program is distributed in the hope that it will be useful,
|
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13 |
* GNU General Public License for more details.
|
|
14 |
*
|
|
15 |
* You should have received a copy of the GNU General Public License
|
|
16 |
* along with this program; if not, write to the Free Software
|
|
17 |
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
18 |
*/
|
|
19 |
||
20 |
/**
|
|
21 |
@file Cursor.cc
|
|
22 |
||
23 |
Handler-calling-functions
|
|
24 |
*/
|
|
25 |
||
2173.2.1
by Monty Taylor
Fixes incorrect usage of include |
26 |
#include <config.h> |
27 |
#include <drizzled/error.h> |
|
28 |
#include <drizzled/gettext.h> |
|
29 |
#include <drizzled/probes.h> |
|
30 |
#include <drizzled/sql_parse.h> |
|
31 |
#include <drizzled/session.h> |
|
32 |
#include <drizzled/sql_base.h> |
|
33 |
#include <drizzled/replication_services.h> |
|
34 |
#include <drizzled/lock.h> |
|
35 |
#include <drizzled/item/int.h> |
|
36 |
#include <drizzled/item/empty_string.h> |
|
37 |
#include <drizzled/field/epoch.h> |
|
38 |
#include <drizzled/plugin/client.h> |
|
39 |
#include <drizzled/internal/my_sys.h> |
|
1208.3.3
by brian
Adding missingfile. |
40 |
|
41 |
using namespace std; |
|
1280.1.10
by Monty Taylor
Put everything in drizzled into drizzled namespace. |
42 |
|
43 |
namespace drizzled |
|
44 |
{
|
|
1208.3.3
by brian
Adding missingfile. |
45 |
|
46 |
KEY_CREATE_INFO default_key_create_info= { HA_KEY_ALG_UNDEF, 0, {NULL,0} }; |
|
47 |
||
48 |
const char *ha_row_type[] = { |
|
49 |
"", "FIXED", "DYNAMIC", "COMPRESSED", "REDUNDANT", "COMPACT", "PAGE", "?","?","?" |
|
50 |
};
|
|
51 |
||
52 |
||
53 |
||
54 |
/**
|
|
55 |
Register Cursor error messages for use with my_error().
|
|
56 |
*/
|
|
57 |
||
1271.7.9
by Tim Penhey
Almost there. |
58 |
void ha_init_errors(void) |
1208.3.3
by brian
Adding missingfile. |
59 |
{
|
1271.7.9
by Tim Penhey
Almost there. |
60 |
// Set the dedicated error messages.
|
1996.3.1
by Monty Taylor
Add error code name into ErrorMap. |
61 |
DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_KEY_NOT_FOUND, ER(ER_KEY_NOT_FOUND)); |
62 |
DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_FOUND_DUPP_KEY, ER(ER_DUP_KEY)); |
|
63 |
DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_RECORD_CHANGED, "Update wich is recoverable"); |
|
64 |
DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_WRONG_INDEX, "Wrong index given to function"); |
|
65 |
DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_CRASHED, ER(ER_NOT_KEYFILE)); |
|
66 |
DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_WRONG_IN_RECORD, ER(ER_CRASHED_ON_USAGE)); |
|
67 |
DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_OUT_OF_MEM, "Table Cursor out of memory"); |
|
68 |
DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_NOT_A_TABLE, "Incorrect file format '%.64s'"); |
|
69 |
DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_WRONG_COMMAND, "Command not supported"); |
|
70 |
DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_OLD_FILE, ER(ER_OLD_KEYFILE)); |
|
71 |
DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_NO_ACTIVE_RECORD, "No record read in update"); |
|
72 |
DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_RECORD_DELETED, "Intern record deleted"); |
|
73 |
DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_RECORD_FILE_FULL, ER(ER_RECORD_FILE_FULL)); |
|
74 |
DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_INDEX_FILE_FULL, "No more room in index file '%.64s'"); |
|
75 |
DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_END_OF_FILE, "End in next/prev/first/last"); |
|
76 |
DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_UNSUPPORTED, ER(ER_ILLEGAL_HA)); |
|
77 |
DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_TO_BIG_ROW, "Too big row"); |
|
78 |
DRIZZLE_ADD_ERROR_MESSAGE(HA_WRONG_CREATE_OPTION, "Wrong create option"); |
|
79 |
DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_FOUND_DUPP_UNIQUE, ER(ER_DUP_UNIQUE)); |
|
80 |
DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_UNKNOWN_CHARSET, "Can't open charset"); |
|
81 |
DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_WRONG_MRG_TABLE_DEF, ER(ER_WRONG_MRG_TABLE)); |
|
82 |
DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_CRASHED_ON_REPAIR, ER(ER_CRASHED_ON_REPAIR)); |
|
83 |
DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_CRASHED_ON_USAGE, ER(ER_CRASHED_ON_USAGE)); |
|
84 |
DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_LOCK_WAIT_TIMEOUT, ER(ER_LOCK_WAIT_TIMEOUT)); |
|
85 |
DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_LOCK_TABLE_FULL, ER(ER_LOCK_TABLE_FULL)); |
|
86 |
DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_READ_ONLY_TRANSACTION, ER(ER_READ_ONLY_TRANSACTION)); |
|
87 |
DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_LOCK_DEADLOCK, ER(ER_LOCK_DEADLOCK)); |
|
88 |
DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_CANNOT_ADD_FOREIGN, ER(ER_CANNOT_ADD_FOREIGN)); |
|
89 |
DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_NO_REFERENCED_ROW, ER(ER_NO_REFERENCED_ROW_2)); |
|
90 |
DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_ROW_IS_REFERENCED, ER(ER_ROW_IS_REFERENCED_2)); |
|
91 |
DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_NO_SAVEPOINT, "No savepoint with that name"); |
|
92 |
DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_NON_UNIQUE_BLOCK_SIZE, "Non unique key block size"); |
|
93 |
DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_NO_SUCH_TABLE, "No such table: '%.64s'"); |
|
94 |
DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_TABLE_EXIST, ER(ER_TABLE_EXISTS_ERROR)); |
|
95 |
DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_NO_CONNECTION, "Could not connect to storage engine"); |
|
96 |
DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_TABLE_DEF_CHANGED, ER(ER_TABLE_DEF_CHANGED)); |
|
97 |
DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_FOREIGN_DUPLICATE_KEY, "FK constraint would lead to duplicate key"); |
|
98 |
DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_TABLE_NEEDS_UPGRADE, ER(ER_TABLE_NEEDS_UPGRADE)); |
|
99 |
DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_TABLE_READONLY, ER(ER_OPEN_AS_READONLY)); |
|
100 |
DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_AUTOINC_READ_FAILED, ER(ER_AUTOINC_READ_FAILED)); |
|
101 |
DRIZZLE_ADD_ERROR_MESSAGE(HA_ERR_AUTOINC_ERANGE, ER(ER_WARN_DATA_OUT_OF_RANGE)); |
|
1208.3.3
by brian
Adding missingfile. |
102 |
}
|
103 |
||
1280.1.10
by Monty Taylor
Put everything in drizzled into drizzled namespace. |
104 |
} /* namespace drizzled */ |