errmsg.h
上传用户:dzyhzl
上传日期:2019-04-29
资源大小:56270k
文件大小:2k
源码类别:

模拟服务器

开发平台:

C/C++

  1. /* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
  2.    
  3.    This library is free software; you can redistribute it and/or
  4.    modify it under the terms of the GNU Library General Public
  5.    License as published by the Free Software Foundation; either
  6.    version 2 of the License, or (at your option) any later version.
  7.    
  8.    This library is distributed in the hope that it will be useful,
  9.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  10.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  11.    Library General Public License for more details.
  12.    
  13.    You should have received a copy of the GNU Library General Public
  14.    License along with this library; if not, write to the Free
  15.    Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
  16.    MA 02111-1307, USA */
  17. /* Error messages for mysql clients */
  18. /* error messages for the demon is in share/language/errmsg.sys */
  19. #ifdef __cplusplus
  20. extern "C" {
  21. #endif
  22. void init_client_errs(void);
  23. extern const char *client_errors[]; /* Error messages */
  24. #ifdef __cplusplus
  25. }
  26. #endif
  27. #define CR_MIN_ERROR 2000 /* For easier client code */
  28. #define CR_MAX_ERROR 2999
  29. #if defined(OS2) && defined( MYSQL_SERVER)
  30. #define CER(X) client_errors[(X)-CR_MIN_ERROR]
  31. #else
  32. #define ER(X) client_errors[(X)-CR_MIN_ERROR]
  33. #endif
  34. #define CLIENT_ERRMAP 2 /* Errormap used by my_error() */
  35. #define CR_UNKNOWN_ERROR 2000
  36. #define CR_SOCKET_CREATE_ERROR 2001
  37. #define CR_CONNECTION_ERROR 2002
  38. #define CR_CONN_HOST_ERROR 2003
  39. #define CR_IPSOCK_ERROR 2004
  40. #define CR_UNKNOWN_HOST 2005
  41. #define CR_SERVER_GONE_ERROR 2006
  42. #define CR_VERSION_ERROR 2007
  43. #define CR_OUT_OF_MEMORY 2008
  44. #define CR_WRONG_HOST_INFO 2009
  45. #define CR_LOCALHOST_CONNECTION 2010
  46. #define CR_TCP_CONNECTION 2011
  47. #define CR_SERVER_HANDSHAKE_ERR 2012
  48. #define CR_SERVER_LOST 2013
  49. #define CR_COMMANDS_OUT_OF_SYNC 2014
  50. #define CR_NAMEDPIPE_CONNECTION 2015
  51. #define CR_NAMEDPIPEWAIT_ERROR 2016
  52. #define CR_NAMEDPIPEOPEN_ERROR 2017
  53. #define CR_NAMEDPIPESETSTATE_ERROR 2018
  54. #define CR_CANT_READ_CHARSET 2019
  55. #define CR_NET_PACKET_TOO_LARGE 2020