from ctypes import *



def ER(X): return client_errors[(X)-CR_MIN_ERROR] # macro
CR_VERSION_ERROR = 2007 # Variable c_int '2007'
CR_SHARED_MEMORY_CONNECT_REQUEST_ERROR = 2038 # Variable c_int '2038'
CR_IPSOCK_ERROR = 2004 # Variable c_int '2004'
CLIENT_ERRMAP = 2 # Variable c_int '2'
CR_NO_DATA = 2051 # Variable c_int '2051'
CR_SERVER_HANDSHAKE_ERR = 2012 # Variable c_int '2012'
CR_PARAMS_NOT_BOUND = 2031 # Variable c_int '2031'
CR_CONN_UNKNOW_PROTOCOL = 2047 # Variable c_int '2047'
CR_NO_PARAMETERS_EXISTS = 2033 # Variable c_int '2033'
CR_SERVER_GONE_ERROR = 2006 # Variable c_int '2006'
CR_MALFORMED_PACKET = 2027 # Variable c_int '2027'
CR_PROBE_SLAVE_HOSTS = 2023 # Variable c_int '2023'
CR_SHARED_MEMORY_CONNECT_ANSWER_ERROR = 2039 # Variable c_int '2039'
CR_TCP_CONNECTION = 2011 # Variable c_int '2011'
CR_SHARED_MEMORY_CONNECT_MAP_ERROR = 2041 # Variable c_int '2041'
CR_SSL_CONNECTION_ERROR = 2026 # Variable c_int '2026'
CR_SOCKET_CREATE_ERROR = 2001 # Variable c_int '2001'
CR_STMT_CLOSED = 2056 # Variable c_int '2056'
CR_LOCALHOST_CONNECTION = 2010 # Variable c_int '2010'
CR_NAMEDPIPEWAIT_ERROR = 2016 # Variable c_int '2016'
CR_MIN_ERROR = 2000 # Variable c_int '2000'
CR_NOT_IMPLEMENTED = 2054 # Variable c_int '2054'
CR_UNKNOWN_HOST = 2005 # Variable c_int '2005'
CR_INVALID_CONN_HANDLE = 2048 # Variable c_int '2048'
CR_CANT_READ_CHARSET = 2019 # Variable c_int '2019'
CR_SHARED_MEMORY_CONNECT_ABANDONED_ERROR = 2045 # Variable c_int '2045'
CR_ERROR_LAST = 2057 # Variable c_int '2057'
CR_NEW_STMT_METADATA = 2057 # Variable c_int '2057'
CR_NET_PACKET_TOO_LARGE = 2020 # Variable c_int '2020'
CR_NAMEDPIPESETSTATE_ERROR = 2018 # Variable c_int '2018'
CR_UNSUPPORTED_PARAM_TYPE = 2036 # Variable c_int '2036'
CR_WRONG_HOST_INFO = 2009 # Variable c_int '2009'
CR_PROBE_SLAVE_STATUS = 2022 # Variable c_int '2022'
CR_CONNECTION_ERROR = 2002 # Variable c_int '2002'
CR_CONN_HOST_ERROR = 2003 # Variable c_int '2003'
CR_NAMEDPIPEOPEN_ERROR = 2017 # Variable c_int '2017'
CR_COMMANDS_OUT_OF_SYNC = 2014 # Variable c_int '2014'
CR_ERROR_FIRST = 2000 # Variable c_int '2000'
CR_NULL_POINTER = 2029 # Variable c_int '2029'
CR_WRONG_LICENSE = 2028 # Variable c_int '2028'
CR_SHARED_MEMORY_CONNECT_SET_ERROR = 2046 # Variable c_int '2046'
CR_INVALID_BUFFER_USE = 2035 # Variable c_int '2035'
CR_NO_STMT_METADATA = 2052 # Variable c_int '2052'
CR_SHARED_MEMORY_CONNECT_FILE_MAP_ERROR = 2040 # Variable c_int '2040'
CR_SERVER_LOST_EXTENDED = 2055 # Variable c_int '2055'
CR_PROBE_SLAVE_CONNECT = 2024 # Variable c_int '2024'
CR_NAMEDPIPE_CONNECTION = 2015 # Variable c_int '2015'
CR_FETCH_CANCELED = 2050 # Variable c_int '2050'
CR_INVALID_PARAMETER_NO = 2034 # Variable c_int '2034'
CR_UNKNOWN_ERROR = 2000 # Variable c_int '2000'
CR_SECURE_AUTH = 2049 # Variable c_int '2049'
CR_SERVER_LOST = 2013 # Variable c_int '2013'
CR_NO_RESULT_SET = 2053 # Variable c_int '2053'
CR_PROBE_MASTER_CONNECT = 2025 # Variable c_int '2025'
CR_SHARED_MEMORY_MAP_ERROR = 2043 # Variable c_int '2043'
CR_DATA_TRUNCATED = 2032 # Variable c_int '2032'
CR_MAX_ERROR = 2999 # Variable c_int '2999'
CR_SHARED_MEMORY_FILE_MAP_ERROR = 2042 # Variable c_int '2042'
CR_SHARED_MEMORY_CONNECTION = 2037 # Variable c_int '2037'
CR_SHARED_MEMORY_EVENT_ERROR = 2044 # Variable c_int '2044'
CR_OUT_OF_MEMORY = 2008 # Variable c_int '2008'
CR_EMBEDDED_CONNECTION = 2021 # Variable c_int '2021'
CR_NO_PREPARE_STMT = 2030 # Variable c_int '2030'
__all__ = ['CR_VERSION_ERROR',
           'CR_SHARED_MEMORY_CONNECT_REQUEST_ERROR',
           'CR_IPSOCK_ERROR', 'CLIENT_ERRMAP',
           'CR_COMMANDS_OUT_OF_SYNC', 'CR_SERVER_HANDSHAKE_ERR',
           'CR_PARAMS_NOT_BOUND', 'CR_CONN_UNKNOW_PROTOCOL',
           'CR_SERVER_GONE_ERROR', 'CR_MALFORMED_PACKET',
           'CR_PROBE_SLAVE_HOSTS', 'CR_INVALID_PARAMETER_NO',
           'CR_PROBE_SLAVE_CONNECT', 'CR_TCP_CONNECTION',
           'CR_SHARED_MEMORY_CONNECT_SET_ERROR', 'CR_FETCH_CANCELED',
           'CR_SHARED_MEMORY_MAP_ERROR', 'CR_NAMEDPIPEWAIT_ERROR',
           'CR_MIN_ERROR', 'CR_UNKNOWN_HOST', 'CR_CANT_READ_CHARSET',
           'CR_SHARED_MEMORY_CONNECT_ABANDONED_ERROR',
           'CR_ERROR_LAST', 'CR_NEW_STMT_METADATA',
           'CR_NET_PACKET_TOO_LARGE', 'CR_NAMEDPIPESETSTATE_ERROR',
           'CR_UNSUPPORTED_PARAM_TYPE', 'CR_WRONG_HOST_INFO',
           'CR_PROBE_SLAVE_STATUS', 'CR_NO_PARAMETERS_EXISTS',
           'CR_SHARED_MEMORY_CONNECT_MAP_ERROR',
           'CR_NAMEDPIPEOPEN_ERROR', 'CR_SOCKET_CREATE_ERROR',
           'CR_INVALID_CONN_HANDLE', 'CR_NULL_POINTER',
           'CR_WRONG_LICENSE', 'CR_NOT_IMPLEMENTED',
           'CR_INVALID_BUFFER_USE', 'CR_NO_RESULT_SET',
           'CR_NO_STMT_METADATA',
           'CR_SHARED_MEMORY_CONNECT_FILE_MAP_ERROR',
           'CR_SERVER_LOST_EXTENDED', 'CR_CONN_HOST_ERROR',
           'CR_SHARED_MEMORY_CONNECT_ANSWER_ERROR',
           'CR_CONNECTION_ERROR', 'CR_NAMEDPIPE_CONNECTION', 'ER',
           'CR_ERROR_FIRST', 'CR_UNKNOWN_ERROR', 'CR_SECURE_AUTH',
           'CR_SERVER_LOST', 'CR_NO_DATA', 'CR_PROBE_MASTER_CONNECT',
           'CR_SSL_CONNECTION_ERROR', 'CR_DATA_TRUNCATED',
           'CR_LOCALHOST_CONNECTION',
           'CR_SHARED_MEMORY_FILE_MAP_ERROR',
           'CR_SHARED_MEMORY_CONNECTION',
           'CR_SHARED_MEMORY_EVENT_ERROR', 'CR_MAX_ERROR',
           'CR_EMBEDDED_CONNECTION', 'CR_OUT_OF_MEMORY',
           'CR_STMT_CLOSED', 'CR_NO_PREPARE_STMT']
