~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/mysql_protocol/errmsg.h

  • Committer: Brian Aker
  • Date: 2009-11-18 06:24:48 UTC
  • mfrom: (1220.1.15 staging)
  • Revision ID: brian@gaz-20091118062448-o36lo3yv81sc6u9z
Merge Brian + Stewart

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
#ifndef PLUGIN_MYSQL_PROTOCOL_ERRMSG_H
21
21
#define PLUGIN_MYSQL_PROTOCOL_ERRMSG_H
22
22
 
23
 
namespace drizzle_plugin
24
 
{
25
 
 
26
23
/* Error messages for MySQL clients */
 
24
/* (Error messages for the daemon are in sql/share/errmsg.txt) */
 
25
 
 
26
#ifdef  __cplusplus
 
27
extern "C"
 
28
#endif
 
29
const char * drizzleclient_get_client_error(unsigned int err_index);
 
30
 
 
31
#define CR_MIN_ERROR    2000  /* For easier client code */
 
32
#define CR_MAX_ERROR    2999
 
33
#if !defined(ER)
 
34
#define ER(X) drizzleclient_get_client_error((X)-CR_MIN_ERROR)
 
35
#endif
 
36
#define CLIENT_ERRMAP    2  /* Errormap used by my_error() */
 
37
 
 
38
/* Do not add error numbers before CR_ERROR_FIRST. */
 
39
/* If necessary to add lower numbers, change CR_ERROR_FIRST accordingly. */
27
40
enum CR_CLIENT_ERRORS {
28
41
  CR_ERROR_FIRST    =2000, /*Copy first error nr.*/
29
42
  CR_UNKNOWN_ERROR  =2000,
90
103
  CR_ERROR_LAST    =2065 /*Copy last error nr:*/
91
104
};
92
105
 
93
 
} /* namespace drizzle_plugin */
94
 
 
95
106
#endif /* PLUGIN_MYSQL_PROTOCOL_ERRMSG_H */