Partial fix to #463, http://bugs.skysql.com/show_bug.cgi?id=463
log_manager.cc: fixed block buffer overflow. Queries are logged to trace log and long queries exceed the bufsize in length. Those were written beyond allocated memory areas. mysql_client_server_protocol.h: added mysql_protocol_state_t to indicate whether MySQL protocol object is allocated, usable or freed. Freed means that memory allocations made by the protocol are freed. That is, command history etc. mysql_backend.c: gw_backend_hangup and gw_error_backend_event used to call error handling function although session was already closing. Added check for session state. mysql_client.c: route_by_statement lost some packets in case where query was sent in multiple packets. mysql_common.c: gw_MySQL_get_next_packet failed in packet handling with route_by_statement. When multi-packet query was merged into one, packet type wasn't copied. protocol_archive_srv_command and mysql_protocol_done didn't have proper locking in place which lead to occasional crashes.
This commit is contained in:
@ -145,9 +145,9 @@ typedef enum {
|
||||
DCB_STATE_POLLING, /*< Waiting in the poll loop */
|
||||
DCB_STATE_LISTENING, /*< The DCB is for a listening socket */
|
||||
DCB_STATE_DISCONNECTED, /*< The socket is now closed */
|
||||
DCB_STATE_FREED, /*< Memory freed */
|
||||
DCB_STATE_NOPOLLING, /*< Removed from poll mask */
|
||||
DCB_STATE_ZOMBIE /*< DCB is no longer active, waiting to free it */
|
||||
DCB_STATE_ZOMBIE, /*< DCB is no longer active, waiting to free it */
|
||||
DCB_STATE_FREED /*< Memory freed */
|
||||
} dcb_state_t;
|
||||
|
||||
typedef enum {
|
||||
|
||||
Reference in New Issue
Block a user