mysql_client_server_protocol.h in included in readconnroute.c

mysql_client_server_protocol.h now has defines for basic mysql commands and mysql packect related macros
This commit is contained in:
Massimiliano Pinto
2013-07-17 16:12:53 +02:00
parent 9a3dd78926
commit 50068f4c97
2 changed files with 26 additions and 8 deletions

View File

@ -210,6 +210,17 @@ typedef enum
GW_MYSQL_CAPABILITIES_COMPRESS
),
} gw_mysql_capabilities_t;
/* Basic mysql commands */
#define MYSQL_COM_CHANGE_USER 0x11
#define MYSQL_COM_QUIT 0x1
#define MYSQL_COM_INIT_DB 0x2
#define MYSQL_COM_QUERY 0x3
#define MYSQL_GET_COMMAND(payload) (payload[4])
#define MYSQL_GET_PACKET_NO(payload) (payload[3])
#define MYSQL_GET_PACKET_LEN(payload) (gw_mysql_get_byte3(payload))
#endif
void gw_mysql_close(MySQLProtocol **ptr);