1 /* DO NOT EDIT THIS FILE!!! It is auto generated by get_error_codes.php */
2 #ifdef ER_DUP_KEY
3   case ER_DUP_KEY                             : return "23000";
4 #endif
5 #ifdef ER_OUTOFMEMORY
6   case ER_OUTOFMEMORY                         : return "HY001";
7 #endif
8 #ifdef ER_OUT_OF_SORTMEMORY
9   case ER_OUT_OF_SORTMEMORY                   : return "HY001";
10 #endif
11 #ifdef ER_CON_COUNT_ERROR
12   case ER_CON_COUNT_ERROR                     : return "08004";
13 #endif
14 #ifdef ER_BAD_HOST_ERROR
15   case ER_BAD_HOST_ERROR                      : return "08S01";
16 #endif
17 #ifdef ER_HANDSHAKE_ERROR
18   case ER_HANDSHAKE_ERROR                     : return "08S01";
19 #endif
20 #ifdef ER_DBACCESS_DENIED_ERROR
21   case ER_DBACCESS_DENIED_ERROR               : return "42000";
22 #endif
23 #ifdef ER_ACCESS_DENIED_ERROR
24   case ER_ACCESS_DENIED_ERROR                 : return "28000";
25 #endif
26 #ifdef ER_NO_DB_ERROR
27   case ER_NO_DB_ERROR                         : return "3D000";
28 #endif
29 #ifdef ER_UNKNOWN_COM_ERROR
30   case ER_UNKNOWN_COM_ERROR                   : return "08S01";
31 #endif
32 #ifdef ER_BAD_NULL_ERROR
33   case ER_BAD_NULL_ERROR                      : return "23000";
34 #endif
35 #ifdef ER_BAD_DB_ERROR
36   case ER_BAD_DB_ERROR                        : return "42000";
37 #endif
38 #ifdef ER_TABLE_EXISTS_ERROR
39   case ER_TABLE_EXISTS_ERROR                  : return "42S01";
40 #endif
41 #ifdef ER_BAD_TABLE_ERROR
42   case ER_BAD_TABLE_ERROR                     : return "42S02";
43 #endif
44 #ifdef ER_NON_UNIQ_ERROR
45   case ER_NON_UNIQ_ERROR                      : return "23000";
46 #endif
47 #ifdef ER_SERVER_SHUTDOWN
48   case ER_SERVER_SHUTDOWN                     : return "08S01";
49 #endif
50 #ifdef ER_BAD_FIELD_ERROR
51   case ER_BAD_FIELD_ERROR                     : return "42S22";
52 #endif
53 #ifdef ER_WRONG_FIELD_WITH_GROUP
54   case ER_WRONG_FIELD_WITH_GROUP              : return "42000";
55 #endif
56 #ifdef ER_WRONG_GROUP_FIELD
57   case ER_WRONG_GROUP_FIELD                   : return "42000";
58 #endif
59 #ifdef ER_WRONG_SUM_SELECT
60   case ER_WRONG_SUM_SELECT                    : return "42000";
61 #endif
62 #ifdef ER_WRONG_VALUE_COUNT
63   case ER_WRONG_VALUE_COUNT                   : return "21S01";
64 #endif
65 #ifdef ER_TOO_LONG_IDENT
66   case ER_TOO_LONG_IDENT                      : return "42000";
67 #endif
68 #ifdef ER_DUP_FIELDNAME
69   case ER_DUP_FIELDNAME                       : return "42S21";
70 #endif
71 #ifdef ER_DUP_KEYNAME
72   case ER_DUP_KEYNAME                         : return "42000";
73 #endif
74 #ifdef ER_DUP_ENTRY
75   case ER_DUP_ENTRY                           : return "23000";
76 #endif
77 #ifdef ER_WRONG_FIELD_SPEC
78   case ER_WRONG_FIELD_SPEC                    : return "42000";
79 #endif
80 #ifdef ER_PARSE_ERROR
81   case ER_PARSE_ERROR                         : return "42000";
82 #endif
83 #ifdef ER_EMPTY_QUERY
84   case ER_EMPTY_QUERY                         : return "42000";
85 #endif
86 #ifdef ER_NONUNIQ_TABLE
87   case ER_NONUNIQ_TABLE                       : return "42000";
88 #endif
89 #ifdef ER_INVALID_DEFAULT
90   case ER_INVALID_DEFAULT                     : return "42000";
91 #endif
92 #ifdef ER_MULTIPLE_PRI_KEY
93   case ER_MULTIPLE_PRI_KEY                    : return "42000";
94 #endif
95 #ifdef ER_TOO_MANY_KEYS
96   case ER_TOO_MANY_KEYS                       : return "42000";
97 #endif
98 #ifdef ER_TOO_MANY_KEY_PARTS
99   case ER_TOO_MANY_KEY_PARTS                  : return "42000";
100 #endif
101 #ifdef ER_TOO_LONG_KEY
102   case ER_TOO_LONG_KEY                        : return "42000";
103 #endif
104 #ifdef ER_KEY_COLUMN_DOES_NOT_EXITS
105   case ER_KEY_COLUMN_DOES_NOT_EXITS           : return "42000";
106 #endif
107 #ifdef ER_BLOB_USED_AS_KEY
108   case ER_BLOB_USED_AS_KEY                    : return "42000";
109 #endif
110 #ifdef ER_TOO_BIG_FIELDLENGTH
111   case ER_TOO_BIG_FIELDLENGTH                 : return "42000";
112 #endif
113 #ifdef ER_WRONG_AUTO_KEY
114   case ER_WRONG_AUTO_KEY                      : return "42000";
115 #endif
116 #ifdef ER_FORCING_CLOSE
117   case ER_FORCING_CLOSE                       : return "08S01";
118 #endif
119 #ifdef ER_IPSOCK_ERROR
120   case ER_IPSOCK_ERROR                        : return "08S01";
121 #endif
122 #ifdef ER_NO_SUCH_INDEX
123   case ER_NO_SUCH_INDEX                       : return "42S12";
124 #endif
125 #ifdef ER_WRONG_FIELD_TERMINATORS
126   case ER_WRONG_FIELD_TERMINATORS             : return "42000";
127 #endif
128 #ifdef ER_BLOBS_AND_NO_TERMINATED
129   case ER_BLOBS_AND_NO_TERMINATED             : return "42000";
130 #endif
131 #ifdef ER_CANT_REMOVE_ALL_FIELDS
132   case ER_CANT_REMOVE_ALL_FIELDS              : return "42000";
133 #endif
134 #ifdef ER_CANT_DROP_FIELD_OR_KEY
135   case ER_CANT_DROP_FIELD_OR_KEY              : return "42000";
136 #endif
137 #ifdef ER_BLOB_CANT_HAVE_DEFAULT
138   case ER_BLOB_CANT_HAVE_DEFAULT              : return "42000";
139 #endif
140 #ifdef ER_WRONG_DB_NAME
141   case ER_WRONG_DB_NAME                       : return "42000";
142 #endif
143 #ifdef ER_WRONG_TABLE_NAME
144   case ER_WRONG_TABLE_NAME                    : return "42000";
145 #endif
146 #ifdef ER_TOO_BIG_SELECT
147   case ER_TOO_BIG_SELECT                      : return "42000";
148 #endif
149 #ifdef ER_UNKNOWN_PROCEDURE
150   case ER_UNKNOWN_PROCEDURE                   : return "42000";
151 #endif
152 #ifdef ER_WRONG_PARAMCOUNT_TO_PROCEDURE
153   case ER_WRONG_PARAMCOUNT_TO_PROCEDURE       : return "42000";
154 #endif
155 #ifdef ER_UNKNOWN_TABLE
156   case ER_UNKNOWN_TABLE                       : return "42S02";
157 #endif
158 #ifdef ER_FIELD_SPECIFIED_TWICE
159   case ER_FIELD_SPECIFIED_TWICE               : return "42000";
160 #endif
161 #ifdef ER_UNSUPPORTED_EXTENSION
162   case ER_UNSUPPORTED_EXTENSION               : return "42000";
163 #endif
164 #ifdef ER_TABLE_MUST_HAVE_COLUMNS
165   case ER_TABLE_MUST_HAVE_COLUMNS             : return "42000";
166 #endif
167 #ifdef ER_UNKNOWN_CHARACTER_SET
168   case ER_UNKNOWN_CHARACTER_SET               : return "42000";
169 #endif
170 #ifdef ER_TOO_BIG_ROWSIZE
171   case ER_TOO_BIG_ROWSIZE                     : return "42000";
172 #endif
173 #ifdef ER_WRONG_OUTER_JOIN
174   case ER_WRONG_OUTER_JOIN                    : return "42000";
175 #endif
176 #ifdef ER_NULL_COLUMN_IN_INDEX
177   case ER_NULL_COLUMN_IN_INDEX                : return "42000";
178 #endif
179 #ifdef ER_PASSWORD_ANONYMOUS_USER
180   case ER_PASSWORD_ANONYMOUS_USER             : return "42000";
181 #endif
182 #ifdef ER_PASSWORD_NOT_ALLOWED
183   case ER_PASSWORD_NOT_ALLOWED                : return "42000";
184 #endif
185 #ifdef ER_PASSWORD_NO_MATCH
186   case ER_PASSWORD_NO_MATCH                   : return "42000";
187 #endif
188 #ifdef ER_WRONG_VALUE_COUNT_ON_ROW
189   case ER_WRONG_VALUE_COUNT_ON_ROW            : return "21S01";
190 #endif
191 #ifdef ER_INVALID_USE_OF_NULL
192   case ER_INVALID_USE_OF_NULL                 : return "22004";
193 #endif
194 #ifdef ER_REGEXP_ERROR
195   case ER_REGEXP_ERROR                        : return "42000";
196 #endif
197 #ifdef ER_MIX_OF_GROUP_FUNC_AND_FIELDS
198   case ER_MIX_OF_GROUP_FUNC_AND_FIELDS        : return "42000";
199 #endif
200 #ifdef ER_NONEXISTING_GRANT
201   case ER_NONEXISTING_GRANT                   : return "42000";
202 #endif
203 #ifdef ER_TABLEACCESS_DENIED_ERROR
204   case ER_TABLEACCESS_DENIED_ERROR            : return "42000";
205 #endif
206 #ifdef ER_COLUMNACCESS_DENIED_ERROR
207   case ER_COLUMNACCESS_DENIED_ERROR           : return "42000";
208 #endif
209 #ifdef ER_ILLEGAL_GRANT_FOR_TABLE
210   case ER_ILLEGAL_GRANT_FOR_TABLE             : return "42000";
211 #endif
212 #ifdef ER_GRANT_WRONG_HOST_OR_USER
213   case ER_GRANT_WRONG_HOST_OR_USER            : return "42000";
214 #endif
215 #ifdef ER_NO_SUCH_TABLE
216   case ER_NO_SUCH_TABLE                       : return "42S02";
217 #endif
218 #ifdef ER_NONEXISTING_TABLE_GRANT
219   case ER_NONEXISTING_TABLE_GRANT             : return "42000";
220 #endif
221 #ifdef ER_NOT_ALLOWED_COMMAND
222   case ER_NOT_ALLOWED_COMMAND                 : return "42000";
223 #endif
224 #ifdef ER_SYNTAX_ERROR
225   case ER_SYNTAX_ERROR                        : return "42000";
226 #endif
227 #ifdef ER_ABORTING_CONNECTION
228   case ER_ABORTING_CONNECTION                 : return "08S01";
229 #endif
230 #ifdef ER_NET_PACKET_TOO_LARGE
231   case ER_NET_PACKET_TOO_LARGE                : return "08S01";
232 #endif
233 #ifdef ER_NET_READ_ERROR_FROM_PIPE
234   case ER_NET_READ_ERROR_FROM_PIPE            : return "08S01";
235 #endif
236 #ifdef ER_NET_FCNTL_ERROR
237   case ER_NET_FCNTL_ERROR                     : return "08S01";
238 #endif
239 #ifdef ER_NET_PACKETS_OUT_OF_ORDER
240   case ER_NET_PACKETS_OUT_OF_ORDER            : return "08S01";
241 #endif
242 #ifdef ER_NET_UNCOMPRESS_ERROR
243   case ER_NET_UNCOMPRESS_ERROR                : return "08S01";
244 #endif
245 #ifdef ER_NET_READ_ERROR
246   case ER_NET_READ_ERROR                      : return "08S01";
247 #endif
248 #ifdef ER_NET_READ_INTERRUPTED
249   case ER_NET_READ_INTERRUPTED                : return "08S01";
250 #endif
251 #ifdef ER_NET_ERROR_ON_WRITE
252   case ER_NET_ERROR_ON_WRITE                  : return "08S01";
253 #endif
254 #ifdef ER_NET_WRITE_INTERRUPTED
255   case ER_NET_WRITE_INTERRUPTED               : return "08S01";
256 #endif
257 #ifdef ER_TOO_LONG_STRING
258   case ER_TOO_LONG_STRING                     : return "42000";
259 #endif
260 #ifdef ER_TABLE_CANT_HANDLE_BLOB
261   case ER_TABLE_CANT_HANDLE_BLOB              : return "42000";
262 #endif
263 #ifdef ER_TABLE_CANT_HANDLE_AUTO_INCREMENT
264   case ER_TABLE_CANT_HANDLE_AUTO_INCREMENT    : return "42000";
265 #endif
266 #ifdef ER_WRONG_COLUMN_NAME
267   case ER_WRONG_COLUMN_NAME                   : return "42000";
268 #endif
269 #ifdef ER_WRONG_KEY_COLUMN
270   case ER_WRONG_KEY_COLUMN                    : return "42000";
271 #endif
272 #ifdef ER_DUP_UNIQUE
273   case ER_DUP_UNIQUE                          : return "23000";
274 #endif
275 #ifdef ER_BLOB_KEY_WITHOUT_LENGTH
276   case ER_BLOB_KEY_WITHOUT_LENGTH             : return "42000";
277 #endif
278 #ifdef ER_PRIMARY_CANT_HAVE_NULL
279   case ER_PRIMARY_CANT_HAVE_NULL              : return "42000";
280 #endif
281 #ifdef ER_TOO_MANY_ROWS
282   case ER_TOO_MANY_ROWS                       : return "42000";
283 #endif
284 #ifdef ER_REQUIRES_PRIMARY_KEY
285   case ER_REQUIRES_PRIMARY_KEY                : return "42000";
286 #endif
287 #ifdef ER_KEY_DOES_NOT_EXITS
288   case ER_KEY_DOES_NOT_EXITS                  : return "42000";
289 #endif
290 #ifdef ER_CHECK_NO_SUCH_TABLE
291   case ER_CHECK_NO_SUCH_TABLE                 : return "42000";
292 #endif
293 #ifdef ER_CHECK_NOT_IMPLEMENTED
294   case ER_CHECK_NOT_IMPLEMENTED               : return "42000";
295 #endif
296 #ifdef ER_CANT_DO_THIS_DURING_AN_TRANSACTION
297   case ER_CANT_DO_THIS_DURING_AN_TRANSACTION  : return "25000";
298 #endif
299 #ifdef ER_NEW_ABORTING_CONNECTION
300   case ER_NEW_ABORTING_CONNECTION             : return "08S01";
301 #endif
302 #ifdef ER_MASTER_NET_READ
303   case ER_MASTER_NET_READ                     : return "08S01";
304 #endif
305 #ifdef ER_MASTER_NET_WRITE
306   case ER_MASTER_NET_WRITE                    : return "08S01";
307 #endif
308 #ifdef ER_TOO_MANY_USER_CONNECTIONS
309   case ER_TOO_MANY_USER_CONNECTIONS           : return "42000";
310 #endif
311 #ifdef ER_READ_ONLY_TRANSACTION
312   case ER_READ_ONLY_TRANSACTION               : return "25000";
313 #endif
314 #ifdef ER_NO_PERMISSION_TO_CREATE_USER
315   case ER_NO_PERMISSION_TO_CREATE_USER        : return "42000";
316 #endif
317 #ifdef ER_LOCK_DEADLOCK
318   case ER_LOCK_DEADLOCK                       : return "40001";
319 #endif
320 #ifdef ER_NO_REFERENCED_ROW
321   case ER_NO_REFERENCED_ROW                   : return "23000";
322 #endif
323 #ifdef ER_ROW_IS_REFERENCED
324   case ER_ROW_IS_REFERENCED                   : return "23000";
325 #endif
326 #ifdef ER_CONNECT_TO_MASTER
327   case ER_CONNECT_TO_MASTER                   : return "08S01";
328 #endif
329 #ifdef ER_WRONG_NUMBER_OF_COLUMNS_IN_SELECT
330   case ER_WRONG_NUMBER_OF_COLUMNS_IN_SELECT   : return "21000";
331 #endif
332 #ifdef ER_USER_LIMIT_REACHED
333   case ER_USER_LIMIT_REACHED                  : return "42000";
334 #endif
335 #ifdef ER_SPECIFIC_ACCESS_DENIED_ERROR
336   case ER_SPECIFIC_ACCESS_DENIED_ERROR        : return "42000";
337 #endif
338 #ifdef ER_NO_DEFAULT
339   case ER_NO_DEFAULT                          : return "42000";
340 #endif
341 #ifdef ER_WRONG_VALUE_FOR_VAR
342   case ER_WRONG_VALUE_FOR_VAR                 : return "42000";
343 #endif
344 #ifdef ER_WRONG_TYPE_FOR_VAR
345   case ER_WRONG_TYPE_FOR_VAR                  : return "42000";
346 #endif
347 #ifdef ER_CANT_USE_OPTION_HERE
348   case ER_CANT_USE_OPTION_HERE                : return "42000";
349 #endif
350 #ifdef ER_NOT_SUPPORTED_YET
351   case ER_NOT_SUPPORTED_YET                   : return "42000";
352 #endif
353 #ifdef ER_WRONG_FK_DEF
354   case ER_WRONG_FK_DEF                        : return "42000";
355 #endif
356 #ifdef ER_OPERAND_COLUMNS
357   case ER_OPERAND_COLUMNS                     : return "21000";
358 #endif
359 #ifdef ER_SUBQUERY_NO_1_ROW
360   case ER_SUBQUERY_NO_1_ROW                   : return "21000";
361 #endif
362 #ifdef ER_ILLEGAL_REFERENCE
363   case ER_ILLEGAL_REFERENCE                   : return "42S22";
364 #endif
365 #ifdef ER_DERIVED_MUST_HAVE_ALIAS
366   case ER_DERIVED_MUST_HAVE_ALIAS             : return "42000";
367 #endif
368 #ifdef ER_SELECT_REDUCED
369   case ER_SELECT_REDUCED                      : return "01000";
370 #endif
371 #ifdef ER_TABLENAME_NOT_ALLOWED_HERE
372   case ER_TABLENAME_NOT_ALLOWED_HERE          : return "42000";
373 #endif
374 #ifdef ER_NOT_SUPPORTED_AUTH_MODE
375   case ER_NOT_SUPPORTED_AUTH_MODE             : return "08004";
376 #endif
377 #ifdef ER_SPATIAL_CANT_HAVE_NULL
378   case ER_SPATIAL_CANT_HAVE_NULL              : return "42000";
379 #endif
380 #ifdef ER_COLLATION_CHARSET_MISMATCH
381   case ER_COLLATION_CHARSET_MISMATCH          : return "42000";
382 #endif
383 #ifdef ER_WARN_TOO_FEW_RECORDS
384   case ER_WARN_TOO_FEW_RECORDS                : return "01000";
385 #endif
386 #ifdef ER_WARN_TOO_MANY_RECORDS
387   case ER_WARN_TOO_MANY_RECORDS               : return "01000";
388 #endif
389 #ifdef ER_WARN_NULL_TO_NOTNULL
390   case ER_WARN_NULL_TO_NOTNULL                : return "22004";
391 #endif
392 #ifdef ER_WARN_DATA_OUT_OF_RANGE
393   case ER_WARN_DATA_OUT_OF_RANGE              : return "22003";
394 #endif
395 #ifdef ER_WRONG_NAME_FOR_INDEX
396   case ER_WRONG_NAME_FOR_INDEX                : return "42000";
397 #endif
398 #ifdef ER_WRONG_NAME_FOR_CATALOG
399   case ER_WRONG_NAME_FOR_CATALOG              : return "42000";
400 #endif
401 #ifdef ER_UNKNOWN_STORAGE_ENGINE
402   case ER_UNKNOWN_STORAGE_ENGINE              : return "42000";
403 #endif
404 #ifdef ER_TRUNCATED_WRONG_VALUE
405   case ER_TRUNCATED_WRONG_VALUE               : return "22007";
406 #endif
407 #ifdef ER_SP_NO_RECURSIVE_CREATE
408   case ER_SP_NO_RECURSIVE_CREATE              : return "2F003";
409 #endif
410 #ifdef ER_SP_ALREADY_EXISTS
411   case ER_SP_ALREADY_EXISTS                   : return "42000";
412 #endif
413 #ifdef ER_SP_DOES_NOT_EXIST
414   case ER_SP_DOES_NOT_EXIST                   : return "42000";
415 #endif
416 #ifdef ER_SP_LILABEL_MISMATCH
417   case ER_SP_LILABEL_MISMATCH                 : return "42000";
418 #endif
419 #ifdef ER_SP_LABEL_REDEFINE
420   case ER_SP_LABEL_REDEFINE                   : return "42000";
421 #endif
422 #ifdef ER_SP_LABEL_MISMATCH
423   case ER_SP_LABEL_MISMATCH                   : return "42000";
424 #endif
425 #ifdef ER_SP_UNINIT_VAR
426   case ER_SP_UNINIT_VAR                       : return "01000";
427 #endif
428 #ifdef ER_SP_BADSELECT
429   case ER_SP_BADSELECT                        : return "0A000";
430 #endif
431 #ifdef ER_SP_BADRETURN
432   case ER_SP_BADRETURN                        : return "42000";
433 #endif
434 #ifdef ER_SP_BADSTATEMENT
435   case ER_SP_BADSTATEMENT                     : return "0A000";
436 #endif
437 #ifdef ER_UPDATE_LOG_DEPRECATED_IGNORED
438   case ER_UPDATE_LOG_DEPRECATED_IGNORED       : return "42000";
439 #endif
440 #ifdef ER_UPDATE_LOG_DEPRECATED_TRANSLATED
441   case ER_UPDATE_LOG_DEPRECATED_TRANSLATED    : return "42000";
442 #endif
443 #ifdef ER_QUERY_INTERRUPTED
444   case ER_QUERY_INTERRUPTED                   : return "70100";
445 #endif
446 #ifdef ER_SP_WRONG_NO_OF_ARGS
447   case ER_SP_WRONG_NO_OF_ARGS                 : return "42000";
448 #endif
449 #ifdef ER_SP_COND_MISMATCH
450   case ER_SP_COND_MISMATCH                    : return "42000";
451 #endif
452 #ifdef ER_SP_NORETURN
453   case ER_SP_NORETURN                         : return "42000";
454 #endif
455 #ifdef ER_SP_NORETURNEND
456   case ER_SP_NORETURNEND                      : return "2F005";
457 #endif
458 #ifdef ER_SP_BAD_CURSOR_QUERY
459   case ER_SP_BAD_CURSOR_QUERY                 : return "42000";
460 #endif
461 #ifdef ER_SP_BAD_CURSOR_SELECT
462   case ER_SP_BAD_CURSOR_SELECT                : return "42000";
463 #endif
464 #ifdef ER_SP_CURSOR_MISMATCH
465   case ER_SP_CURSOR_MISMATCH                  : return "42000";
466 #endif
467 #ifdef ER_SP_CURSOR_ALREADY_OPEN
468   case ER_SP_CURSOR_ALREADY_OPEN              : return "24000";
469 #endif
470 #ifdef ER_SP_CURSOR_NOT_OPEN
471   case ER_SP_CURSOR_NOT_OPEN                  : return "24000";
472 #endif
473 #ifdef ER_SP_UNDECLARED_VAR
474   case ER_SP_UNDECLARED_VAR                   : return "42000";
475 #endif
476 #ifdef ER_SP_FETCH_NO_DATA
477   case ER_SP_FETCH_NO_DATA                    : return "02000";
478 #endif
479 #ifdef ER_SP_DUP_PARAM
480   case ER_SP_DUP_PARAM                        : return "42000";
481 #endif
482 #ifdef ER_SP_DUP_VAR
483   case ER_SP_DUP_VAR                          : return "42000";
484 #endif
485 #ifdef ER_SP_DUP_COND
486   case ER_SP_DUP_COND                         : return "42000";
487 #endif
488 #ifdef ER_SP_DUP_CURS
489   case ER_SP_DUP_CURS                         : return "42000";
490 #endif
491 #ifdef ER_SP_SUBSELECT_NYI
492   case ER_SP_SUBSELECT_NYI                    : return "0A000";
493 #endif
494 #ifdef ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
495   case ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG       : return "0A000";
496 #endif
497 #ifdef ER_SP_VARCOND_AFTER_CURSHNDLR
498   case ER_SP_VARCOND_AFTER_CURSHNDLR          : return "42000";
499 #endif
500 #ifdef ER_SP_CURSOR_AFTER_HANDLER
501   case ER_SP_CURSOR_AFTER_HANDLER             : return "42000";
502 #endif
503 #ifdef ER_SP_CASE_NOT_FOUND
504   case ER_SP_CASE_NOT_FOUND                   : return "20000";
505 #endif
506 #ifdef ER_DIVISION_BY_ZERO
507   case ER_DIVISION_BY_ZERO                    : return "22012";
508 #endif
509 #ifdef ER_ILLEGAL_VALUE_FOR_TYPE
510   case ER_ILLEGAL_VALUE_FOR_TYPE              : return "22007";
511 #endif
512 #ifdef ER_PROCACCESS_DENIED_ERROR
513   case ER_PROCACCESS_DENIED_ERROR             : return "42000";
514 #endif
515 #ifdef ER_XAER_NOTA
516   case ER_XAER_NOTA                           : return "XAE04";
517 #endif
518 #ifdef ER_XAER_INVAL
519   case ER_XAER_INVAL                          : return "XAE05";
520 #endif
521 #ifdef ER_XAER_RMFAIL
522   case ER_XAER_RMFAIL                         : return "XAE07";
523 #endif
524 #ifdef ER_XAER_OUTSIDE
525   case ER_XAER_OUTSIDE                        : return "XAE09";
526 #endif
527 #ifdef ER_XAER_RMERR
528   case ER_XAER_RMERR                          : return "XAE03";
529 #endif
530 #ifdef ER_XA_RBROLLBACK
531   case ER_XA_RBROLLBACK                       : return "XA100";
532 #endif
533 #ifdef ER_NONEXISTING_PROC_GRANT
534   case ER_NONEXISTING_PROC_GRANT              : return "42000";
535 #endif
536 #ifdef ER_DATA_TOO_LONG
537   case ER_DATA_TOO_LONG                       : return "22001";
538 #endif
539 #ifdef ER_SP_BAD_SQLSTATE
540   case ER_SP_BAD_SQLSTATE                     : return "42000";
541 #endif
542 #ifdef ER_CANT_CREATE_USER_WITH_GRANT
543   case ER_CANT_CREATE_USER_WITH_GRANT         : return "42000";
544 #endif
545 #ifdef ER_SP_DUP_HANDLER
546   case ER_SP_DUP_HANDLER                      : return "42000";
547 #endif
548 #ifdef ER_SP_NOT_VAR_ARG
549   case ER_SP_NOT_VAR_ARG                      : return "42000";
550 #endif
551 #ifdef ER_SP_NO_RETSET
552   case ER_SP_NO_RETSET                        : return "0A000";
553 #endif
554 #ifdef ER_CANT_CREATE_GEOMETRY_OBJECT
555   case ER_CANT_CREATE_GEOMETRY_OBJECT         : return "22003";
556 #endif
557 #ifdef ER_TOO_BIG_SCALE
558   case ER_TOO_BIG_SCALE                       : return "42000";
559 #endif
560 #ifdef ER_TOO_BIG_PRECISION
561   case ER_TOO_BIG_PRECISION                   : return "42000";
562 #endif
563 #ifdef ER_M_BIGGER_THAN_D
564   case ER_M_BIGGER_THAN_D                     : return "42000";
565 #endif
566 #ifdef ER_TOO_LONG_BODY
567   case ER_TOO_LONG_BODY                       : return "42000";
568 #endif
569 #ifdef ER_TOO_BIG_DISPLAYWIDTH
570   case ER_TOO_BIG_DISPLAYWIDTH                : return "42000";
571 #endif
572 #ifdef ER_XAER_DUPID
573   case ER_XAER_DUPID                          : return "XAE08";
574 #endif
575 #ifdef ER_DATETIME_FUNCTION_OVERFLOW
576   case ER_DATETIME_FUNCTION_OVERFLOW          : return "22008";
577 #endif
578 #ifdef ER_ROW_IS_REFERENCED_2
579   case ER_ROW_IS_REFERENCED_2                 : return "23000";
580 #endif
581 #ifdef ER_NO_REFERENCED_ROW_2
582   case ER_NO_REFERENCED_ROW_2                 : return "23000";
583 #endif
584 #ifdef ER_SP_BAD_VAR_SHADOW
585   case ER_SP_BAD_VAR_SHADOW                   : return "42000";
586 #endif
587 #ifdef ER_SP_WRONG_NAME
588   case ER_SP_WRONG_NAME                       : return "42000";
589 #endif
590 #ifdef ER_SP_NO_AGGREGATE
591   case ER_SP_NO_AGGREGATE                     : return "42000";
592 #endif
593 #ifdef ER_MAX_PREPARED_STMT_COUNT_REACHED
594   case ER_MAX_PREPARED_STMT_COUNT_REACHED     : return "42000";
595 #endif
596 #ifdef ER_NON_GROUPING_FIELD_USED
597   case ER_NON_GROUPING_FIELD_USED             : return "42000";
598 #endif
599 #ifdef ER_FOREIGN_DUPLICATE_KEY
600   case ER_FOREIGN_DUPLICATE_KEY               : return "23000";
601 #endif
602 #ifdef ER_CANT_CHANGE_TX_ISOLATION
603   case ER_CANT_CHANGE_TX_ISOLATION            : return "25001";
604 #endif
605 #ifdef ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
606   case ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT      : return "42000";
607 #endif
608 #ifdef ER_WRONG_PARAMETERS_TO_NATIVE_FCT
609   case ER_WRONG_PARAMETERS_TO_NATIVE_FCT      : return "42000";
610 #endif
611 #ifdef ER_WRONG_PARAMETERS_TO_STORED_FCT
612   case ER_WRONG_PARAMETERS_TO_STORED_FCT      : return "42000";
613 #endif
614 #ifdef ER_DUP_ENTRY_WITH_KEY_NAME
615   case ER_DUP_ENTRY_WITH_KEY_NAME             : return "23000";
616 #endif
617 #ifdef ER_XA_RBTIMEOUT
618   case ER_XA_RBTIMEOUT                        : return "XA106";
619 #endif
620 #ifdef ER_XA_RBDEADLOCK
621   case ER_XA_RBDEADLOCK                       : return "XA102";
622 #endif
623 #ifdef ER_FUNC_INEXISTENT_NAME_COLLISION
624   case ER_FUNC_INEXISTENT_NAME_COLLISION      : return "42000";
625 #endif
626 #ifdef ER_DUP_SIGNAL_SET
627   case ER_DUP_SIGNAL_SET                      : return "42000";
628 #endif
629 #ifdef ER_SIGNAL_WARN
630   case ER_SIGNAL_WARN                         : return "01000";
631 #endif
632 #ifdef ER_SIGNAL_NOT_FOUND
633   case ER_SIGNAL_NOT_FOUND                    : return "02000";
634 #endif
635 #ifdef ER_SIGNAL_EXCEPTION
636   case ER_SIGNAL_EXCEPTION                    : return "HY000";
637 #endif
638 #ifdef ER_RESIGNAL_WITHOUT_ACTIVE_HANDLER
639   case ER_RESIGNAL_WITHOUT_ACTIVE_HANDLER     : return "0K000";
640 #endif
641 #ifdef ER_SPATIAL_MUST_HAVE_GEOM_COL
642   case ER_SPATIAL_MUST_HAVE_GEOM_COL          : return "42000";
643 #endif
644 #ifdef ER_DATA_OUT_OF_RANGE
645   case ER_DATA_OUT_OF_RANGE                   : return "22003";
646 #endif
647