From fa0b97ac610aa36a5007bf0187e4fae50dac442d Mon Sep 17 00:00:00 2001 From: Massimiliano Pinto Date: Fri, 14 Dec 2012 16:40:34 +0100 Subject: [PATCH] New version compatible with prepared statements --- protocol_1.0/skysql_client.h | 5 ++++- protocol_1.0/skysql_gw.h | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/protocol_1.0/skysql_client.h b/protocol_1.0/skysql_client.h index bbf0f4ed2..3d03b3614 100644 --- a/protocol_1.0/skysql_client.h +++ b/protocol_1.0/skysql_client.h @@ -121,9 +121,11 @@ typedef enum #define SMALL_CHUNK 1024 -#define MAX_CHUNK SMALL_CHUNK * 16 +#define MAX_CHUNK SMALL_CHUNK * 8 * 2 #define ToHex(Y) (Y>='0'&&Y<='9'?Y-'0':Y-'A'+10) +//#define MYSQL_CONN_DEBUG + typedef struct { apr_socket_t *socket; char scramble[33]; @@ -132,3 +134,4 @@ typedef struct { unsigned long tid; apr_pool_t *pool; } MYSQL_conn; + diff --git a/protocol_1.0/skysql_gw.h b/protocol_1.0/skysql_gw.h index fadca928e..53aec4689 100644 --- a/protocol_1.0/skysql_gw.h +++ b/protocol_1.0/skysql_gw.h @@ -102,7 +102,7 @@ apr_status_t skysql_send_handshake(conn_rec *c, uint8_t *scramble, int *scramble apr_status_t skysql_send_error (conn_rec *c, uint8_t packet_number, MYSQL_conn *conn); //apr_status_t skysql_prepare_ok(conn_rec *c, uint8_t packet_number, MYSQL_STMT *statement, MYSQL_conn *conn); apr_status_t skysql_send_ok(conn_rec *c, apr_pool_t *p, uint8_t packet_number, uint8_t in_affected_rows, const char* skysql_message); -apr_status_t skysql_send_eof(conn_rec *c, uint8_t packet_number); +apr_status_t skysql_send_eof(conn_rec *c, apr_pool_t *p, uint8_t packet_number); apr_status_t skysql_send_result(conn_rec *c, uint8_t *data, uint8_t len); int select_random_slave_server(int nslaves); apr_status_t gateway_send_error (conn_rec *c, apr_pool_t *p, uint8_t packet_number);