andrey                                   Fri, 11 Dec 2009 10:18:00 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=291977

Log:
Move two functions which are used in the extension as methods of
the connection. Two functions less in the global namespace.

Changed paths:
    U   php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd.c
    U   php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_enum_n_def.h
    U   php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_loaddata.c
    U   php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_ps.c
    U   php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_structs.h
    U   php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_wireprotocol.h
    U   php/php-src/trunk/ext/mysqlnd/mysqlnd.c
    U   php/php-src/trunk/ext/mysqlnd/mysqlnd_enum_n_def.h
    U   php/php-src/trunk/ext/mysqlnd/mysqlnd_loaddata.c
    U   php/php-src/trunk/ext/mysqlnd/mysqlnd_ps.c
    U   php/php-src/trunk/ext/mysqlnd/mysqlnd_structs.h
    U   php/php-src/trunk/ext/mysqlnd/mysqlnd_wireprotocol.h

Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd.c	2009-12-11 10:17:40 UTC (rev 291976)
+++ php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd.c	2009-12-11 10:18:00 UTC (rev 291977)
@@ -242,16 +242,15 @@
 /* }}} */


-/* {{{ mysqlnd_simple_command_handle_response */
-enum_func_status
-mysqlnd_simple_command_handle_response(MYSQLND *conn, enum php_mysql_packet_type ok_packet,
-									   zend_bool silent, enum php_mysqlnd_server_command command,
-									   zend_bool ignore_upsert_status
-									   TSRMLS_DC)
+/* {{{ mysqlnd_conn::simple_command_handle_response */
+static enum_func_status
+MYSQLND_METHOD(mysqlnd_conn, simple_command_handle_response)(MYSQLND *conn, enum php_mysql_packet_type ok_packet,
+									   						 zend_bool silent, enum php_mysqlnd_server_command command,
+									   						 zend_bool ignore_upsert_status TSRMLS_DC)
 {
 	enum_func_status ret;

-	DBG_ENTER("mysqlnd_simple_command_handle_response");
+	DBG_ENTER("mysqlnd_conn::simple_command_handle_response");
 	DBG_INF_FMT("silent=%d packet=%d command=%s", silent, ok_packet, mysqlnd_command_to_text[command]);

 	switch (ok_packet) {
@@ -343,17 +342,16 @@
 /* }}} */


-/* {{{ mysqlnd_simple_command */
-enum_func_status
-mysqlnd_simple_command(MYSQLND *conn, enum php_mysqlnd_server_command command,
-					   const char * const arg, size_t arg_len,
-					   enum php_mysql_packet_type ok_packet, zend_bool silent,
-					   zend_bool ignore_upsert_status TSRMLS_DC)
+/* {{{ mysqlnd_conn::simple_command */
+static enum_func_status
+MYSQLND_METHOD(mysqlnd_conn, simple_command)(MYSQLND *conn, enum php_mysqlnd_server_command command,
+			   const char * const arg, size_t arg_len, enum php_mysql_packet_type ok_packet, zend_bool silent,
+			   zend_bool ignore_upsert_status TSRMLS_DC)
 {
 	enum_func_status ret = PASS;
 	php_mysql_packet_command cmd_packet;

-	DBG_ENTER("mysqlnd_simple_command");
+	DBG_ENTER("mysqlnd_conn::simple_command");
 	DBG_INF_FMT("command=%s ok_packet=%d silent=%d", mysqlnd_command_to_text[command], ok_packet, silent);

 	switch (CONN_GET_STATE(conn)) {
@@ -394,7 +392,7 @@
 		DBG_ERR("Server is gone");
 		ret = FAIL;
 	} else if (ok_packet != PROT_LAST) {
-		ret = mysqlnd_simple_command_handle_response(conn, ok_packet, silent, command, ignore_upsert_status TSRMLS_CC);
+		ret = conn->m->simple_command_handle_response(conn, ok_packet, silent, command, ignore_upsert_status TSRMLS_CC);
 	}

 	/*
@@ -419,8 +417,7 @@
 	DBG_ENTER("mysqlnd_conn::set_server_option");

 	int2store(buffer, (unsigned int) option);
-	ret = mysqlnd_simple_command(conn, COM_SET_OPTION, buffer, sizeof(buffer),
-								 PROT_EOF_PACKET, FALSE, TRUE TSRMLS_CC);
+	ret = conn->m->simple_command(conn, COM_SET_OPTION, buffer, sizeof(buffer), PROT_EOF_PACKET, FALSE, TRUE TSRMLS_CC);
 	DBG_RETURN(ret);
 }
 /* }}} */
@@ -892,7 +889,7 @@
 	DBG_ENTER("mysqlnd_conn::query");
 	DBG_INF_FMT("conn=%llu query=%s", conn->thread_id, query);

-	if (PASS != mysqlnd_simple_command(conn, COM_QUERY, query, query_len,
+	if (PASS != conn->m->simple_command(conn, COM_QUERY, query, query_len,
 									   PROT_LAST /* we will handle the OK packet*/,
 									   FALSE, FALSE TSRMLS_CC)) {
 		DBG_RETURN(FAIL);
@@ -920,7 +917,7 @@
 	DBG_ENTER("mysqlnd_conn::send_query");
 	DBG_INF_FMT("conn=%llu query=%s", conn->thread_id, query);

-	ret = mysqlnd_simple_command(conn, COM_QUERY, query, query_len,
+	ret = conn->m->simple_command(conn, COM_QUERY, query, query_len,
 								 PROT_LAST /* we will handle the OK packet*/,
 								 FALSE, FALSE TSRMLS_CC);
 	CONN_SET_STATE(conn, CONN_QUERY_SENT);
@@ -1155,7 +1152,7 @@
 		*p++ = '\0';
 	}

-	if (PASS != mysqlnd_simple_command(conn, COM_FIELD_LIST, buff, p - buff,
+	if (PASS != conn->m->simple_command(conn, COM_FIELD_LIST, buff, p - buff,
 									   PROT_LAST /* we will handle the OK packet*/,
 									   FALSE, TRUE TSRMLS_CC)) {
 		DBG_RETURN(NULL);
@@ -1278,7 +1275,7 @@
 {
 	DBG_ENTER("mysqlnd_conn::dump_debug_info");
 	DBG_INF_FMT("conn=%llu", conn->thread_id);
-	DBG_RETURN(mysqlnd_simple_command(conn, COM_DEBUG, NULL, 0, PROT_EOF_PACKET, FALSE, TRUE TSRMLS_CC));
+	DBG_RETURN(conn->m->simple_command(conn, COM_DEBUG, NULL, 0, PROT_EOF_PACKET, FALSE, TRUE TSRMLS_CC));
 }
 /* }}} */

@@ -1294,7 +1291,7 @@
 	DBG_ENTER("mysqlnd_conn::select_db");
 	DBG_INF_FMT("conn=%llu db=%s", conn->thread_id, db);

-	ret = mysqlnd_simple_command(conn, COM_INIT_DB, db, db_len, PROT_OK_PACKET, FALSE, TRUE TSRMLS_CC);
+	ret = conn->m->simple_command(conn, COM_INIT_DB, db, db_len, PROT_OK_PACKET, FALSE, TRUE TSRMLS_CC);
 	/*
 	  The server sends 0 but libmysql doesn't read it and has established
 	  a protocol of giving back -1. Thus we have to follow it :(
@@ -1321,7 +1318,7 @@
 	DBG_ENTER("mysqlnd_conn::ping");
 	DBG_INF_FMT("conn=%llu", conn->thread_id);

-	ret = mysqlnd_simple_command(conn, COM_PING, NULL, 0, PROT_OK_PACKET, TRUE, TRUE TSRMLS_CC);
+	ret = conn->m->simple_command(conn, COM_PING, NULL, 0, PROT_OK_PACKET, TRUE, TRUE TSRMLS_CC);
 	/*
 	  The server sends 0 but libmysql doesn't read it and has established
 	  a protocol of giving back -1. Thus we have to follow it :(
@@ -1344,7 +1341,7 @@
 	DBG_ENTER("mysqlnd_conn::stat");
 	DBG_INF_FMT("conn=%llu", conn->thread_id);

-	ret = mysqlnd_simple_command(conn, COM_STATISTICS, NULL, 0, PROT_LAST, FALSE, TRUE TSRMLS_CC);
+	ret = conn->m->simple_command(conn, COM_STATISTICS, NULL, 0, PROT_LAST, FALSE, TRUE TSRMLS_CC);
 	if (FAIL == ret) {
 		DBG_RETURN(FAIL);
 	}
@@ -1378,13 +1375,13 @@

 	/* If we kill ourselves don't expect OK packet, PROT_LAST will skip it */
 	if (pid != conn->thread_id) {
-		ret = mysqlnd_simple_command(conn, COM_PROCESS_KILL, buff, 4, PROT_OK_PACKET, FALSE, TRUE TSRMLS_CC);
+		ret = conn->m->simple_command(conn, COM_PROCESS_KILL, buff, 4, PROT_OK_PACKET, FALSE, TRUE TSRMLS_CC);
 		/*
 		  The server sends 0 but libmysql doesn't read it and has established
 		  a protocol of giving back -1. Thus we have to follow it :(
 		*/
 		SET_ERROR_AFF_ROWS(conn);
-	} else if (PASS == (ret = mysqlnd_simple_command(conn, COM_PROCESS_KILL, buff,
+	} else if (PASS == (ret = conn->m->simple_command(conn, COM_PROCESS_KILL, buff,
 													 4, PROT_LAST, FALSE, TRUE TSRMLS_CC))) {
 		CONN_SET_STATE(conn, CONN_QUIT_SENT);
 	}
@@ -1438,7 +1435,7 @@

 	int1store(bits, options);

-	DBG_RETURN(mysqlnd_simple_command(conn, COM_REFRESH, (char *)bits, 1, PROT_OK_PACKET, FALSE, TRUE TSRMLS_CC));
+	DBG_RETURN(conn->m->simple_command(conn, COM_REFRESH, (char *)bits, 1, PROT_OK_PACKET, FALSE, TRUE TSRMLS_CC));
 }
 /* }}} */

@@ -1453,7 +1450,7 @@

 	int1store(bits, level);

-	DBG_RETURN(mysqlnd_simple_command(conn, COM_SHUTDOWN, (char *)bits, 1, PROT_OK_PACKET, FALSE, TRUE TSRMLS_CC));
+	DBG_RETURN(conn->m->simple_command(conn, COM_SHUTDOWN, (char *)bits, 1, PROT_OK_PACKET, FALSE, TRUE TSRMLS_CC));
 }
 /* }}} */

@@ -1472,7 +1469,7 @@
 		case CONN_READY:
 			DBG_INF("Connection clean, sending COM_QUIT");
 			if (conn->net.stream) {
-				ret =  mysqlnd_simple_command(conn, COM_QUIT, NULL, 0, PROT_LAST, TRUE, TRUE TSRMLS_CC);
+				ret =  conn->m->simple_command(conn, COM_QUIT, NULL, 0, PROT_LAST, TRUE, TRUE TSRMLS_CC);
 			}
 			/* Do nothing */
 			break;
@@ -1888,7 +1885,7 @@
 	}
 	*p++ = '\0';

-	if (PASS != mysqlnd_simple_command(conn, COM_CHANGE_USER, buffer, p - buffer,
+	if (PASS != conn->m->simple_command(conn, COM_CHANGE_USER, buffer, p - buffer,
 									   PROT_LAST /* we will handle the OK packet*/,
 									   silent, TRUE TSRMLS_CC)) {
 		DBG_RETURN(FAIL);
@@ -2200,6 +2197,9 @@
 	MYSQLND_METHOD_PRIVATE(mysqlnd_conn, free_reference),
 	MYSQLND_METHOD_PRIVATE(mysqlnd_conn, get_state),
 	MYSQLND_METHOD_PRIVATE(mysqlnd_conn, set_state),
+
+	MYSQLND_METHOD(mysqlnd_conn, simple_command),
+	MYSQLND_METHOD(mysqlnd_conn, simple_command_handle_response)
 MYSQLND_CLASS_METHODS_END;



Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_enum_n_def.h
===================================================================
--- php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_enum_n_def.h	2009-12-11 10:17:40 UTC (rev 291976)
+++ php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_enum_n_def.h	2009-12-11 10:18:00 UTC (rev 291977)
@@ -478,6 +478,60 @@
 } enum_mysqlnd_collected_stats;


+/* Enums */
+enum php_mysql_packet_type
+{
+	PROT_GREET_PACKET= 0,
+	PROT_AUTH_PACKET,
+	PROT_OK_PACKET,
+	PROT_EOF_PACKET,
+	PROT_CMD_PACKET,
+	PROT_RSET_HEADER_PACKET,
+	PROT_RSET_FLD_PACKET,
+	PROT_ROW_PACKET,
+	PROT_STATS_PACKET,
+	PROT_PREPARE_RESP_PACKET,
+	PROT_CHG_USER_PACKET,
+	PROT_LAST, /* should always be last */
+};
+
+
+enum php_mysqlnd_server_command
+{
+	COM_SLEEP = 0,
+	COM_QUIT,
+	COM_INIT_DB,
+	COM_QUERY,
+	COM_FIELD_LIST,
+	COM_CREATE_DB,
+	COM_DROP_DB,
+	COM_REFRESH,
+	COM_SHUTDOWN,
+	COM_STATISTICS,
+	COM_PROCESS_INFO,
+	COM_CONNECT,
+	COM_PROCESS_KILL,
+	COM_DEBUG,
+	COM_PING,
+	COM_TIME = 15,
+	COM_DELAYED_INSERT,
+	COM_CHANGE_USER,
+	COM_BINLOG_DUMP,
+	COM_TABLE_DUMP,
+	COM_CONNECT_OUT = 20,
+	COM_REGISTER_SLAVE,
+	COM_STMT_PREPARE = 22,
+	COM_STMT_EXECUTE = 23,
+	COM_STMT_SEND_LONG_DATA = 24,
+	COM_STMT_CLOSE = 25,
+	COM_STMT_RESET = 26,
+	COM_SET_OPTION = 27,
+	COM_STMT_FETCH = 28,
+	COM_DAEMON,
+	COM_END
+};
+
+
 #define MYSQLND_DEFAULT_PREFETCH_ROWS (ulong) 1

 #define MYSQLND_REFRESH_GRANT      1	/* Refresh grant tables */

Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_loaddata.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_loaddata.c	2009-12-11 10:17:40 UTC (rev 291976)
+++ php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_loaddata.c	2009-12-11 10:18:00 UTC (rev 291977)
@@ -25,13 +25,7 @@
 #include "mysqlnd_priv.h"
 #include "mysqlnd_debug.h"

-enum_func_status mysqlnd_simple_command_handle_response(MYSQLND *conn,
-										enum php_mysql_packet_type ok_packet,
-										zend_bool silent, enum php_mysqlnd_server_command command,
-										zend_bool ignore_upsert_status
-									  	TSRMLS_DC);

-
 #define ALLOC_CALLBACK_ARGS(a, b, c)\
 if (c) {\
 	a = (zval ***)safe_emalloc(c, sizeof(zval **), 0);\
@@ -242,7 +236,7 @@

 infile_error:
 	/* get response from server and update upsert values */
-	if (FAIL == mysqlnd_simple_command_handle_response(conn, PROT_OK_PACKET, FALSE, COM_QUERY, FALSE TSRMLS_CC)) {
+	if (FAIL == conn->m->simple_command_handle_response(conn, PROT_OK_PACKET, FALSE, COM_QUERY, FALSE TSRMLS_CC)) {
 		result = FAIL;
 	}


Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_ps.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_ps.c	2009-12-11 10:17:40 UTC (rev 291976)
+++ php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_ps.c	2009-12-11 10:18:00 UTC (rev 291977)
@@ -38,13 +38,6 @@

 static struct st_mysqlnd_stmt_methods *mysqlnd_stmt_methods;

-/* Exported by mysqlnd.c */
-enum_func_status mysqlnd_simple_command(MYSQLND *conn, enum php_mysqlnd_server_command command,
-										const char * const arg, size_t arg_len,
-										enum php_mysql_packet_type ok_packet,
-										zend_bool silent, zend_bool ignore_upsert_status
-										TSRMLS_DC);
-
 /* Exported by mysqlnd_ps_codec.c */
 zend_uchar* mysqlnd_stmt_execute_generate_request(MYSQLND_STMT *stmt, size_t *request_len,
 												  zend_bool *free_buffer TSRMLS_DC);
@@ -343,8 +336,8 @@
 		stmt_to_prepare = mysqlnd_stmt_init(stmt->conn);
 	}

-	if (FAIL == mysqlnd_simple_command(stmt_to_prepare->conn, COM_STMT_PREPARE, query,
-									   query_len, PROT_LAST, FALSE, TRUE TSRMLS_CC) ||
+	if (FAIL == stmt_to_prepare->conn->m->simple_command(stmt_to_prepare->conn, COM_STMT_PREPARE, query,
+															query_len, PROT_LAST, FALSE, TRUE TSRMLS_CC) ||
 		FAIL == mysqlnd_stmt_read_prepare_response(stmt_to_prepare TSRMLS_CC)) {
 		goto fail;
 	}
@@ -605,9 +598,9 @@

 	/* support for buffer types should be added here ! */

-	ret = mysqlnd_simple_command(stmt->conn, COM_STMT_EXECUTE, (char *)request, request_len,
-								 PROT_LAST /* we will handle the response packet*/,
-								 FALSE, FALSE TSRMLS_CC);
+	ret = stmt->conn->m->simple_command(stmt->conn, COM_STMT_EXECUTE, (char *)request, request_len,
+										PROT_LAST /* we will handle the response packet*/,
+										FALSE, FALSE TSRMLS_CC);

 	if (free_request) {
 		mnd_efree(request);
@@ -923,9 +916,9 @@
 	int4store(buf, stmt->stmt_id);
 	int4store(buf + STMT_ID_LENGTH, 1); /* for now fetch only one row */

-	if (FAIL == mysqlnd_simple_command(stmt->conn, COM_STMT_FETCH, (char *)buf, sizeof(buf),
-									   PROT_LAST /* we will handle the response packet*/,
-									   FALSE, TRUE TSRMLS_CC)) {
+	if (FAIL == stmt->conn->m->simple_command(stmt->conn, COM_STMT_FETCH, (char *)buf, sizeof(buf),
+											  PROT_LAST /* we will handle the response packet*/,
+											  FALSE, TRUE TSRMLS_CC)) {
 		stmt->error_info = stmt->conn->error_info;
 		DBG_RETURN(FAIL);
 	}
@@ -1133,7 +1126,7 @@

 		int4store(cmd_buf, stmt->stmt_id);
 		if (CONN_GET_STATE(conn) == CONN_READY &&
-			FAIL == (ret = mysqlnd_simple_command(conn, COM_STMT_RESET, (char *)cmd_buf,
+			FAIL == (ret = conn->m->simple_command(conn, COM_STMT_RESET, (char *)cmd_buf,
 												  sizeof(cmd_buf), PROT_OK_PACKET,
 												  FALSE, TRUE TSRMLS_CC))) {
 			stmt->error_info = conn->error_info;
@@ -1190,7 +1183,7 @@
 	  XXX:	Unfortunately we have to allocate additional buffer to be able the
 			additional data, which is like a header inside the payload.
 			This should be optimised, but it will be a pervasive change, so
-			mysqlnd_simple_command() will accept not a buffer, but actually MYSQLND_STRING*
+			conn->m->simple_command() will accept not a buffer, but actually MYSQLND_STRING*
 			terminated by NULL, to send. If the strings are not big, we can collapse them
 			on the buffer every connection has, but otherwise we will just send them
 			one by one to the wire.
@@ -1206,7 +1199,7 @@
 		memcpy(cmd_buf + STMT_ID_LENGTH + 2, data, length);

 		/* COM_STMT_SEND_LONG_DATA doesn't send an OK packet*/
-		ret = mysqlnd_simple_command(conn, cmd, (char *)cmd_buf, packet_len,
+		ret = conn->m->simple_command(conn, cmd, (char *)cmd_buf, packet_len,
 									 PROT_LAST , FALSE, TRUE TSRMLS_CC);
 		mnd_efree(cmd_buf);
 		if (FAIL == ret) {
@@ -1976,7 +1969,7 @@

 		int4store(cmd_buf, stmt->stmt_id);
 		if (CONN_GET_STATE(conn) == CONN_READY &&
-			FAIL == mysqlnd_simple_command(conn, COM_STMT_CLOSE, (char *)cmd_buf, sizeof(cmd_buf),
+			FAIL == conn->m->simple_command(conn, COM_STMT_CLOSE, (char *)cmd_buf, sizeof(cmd_buf),
 										   PROT_LAST /* COM_STMT_CLOSE doesn't send an OK packet*/,
 										   FALSE, TRUE TSRMLS_CC)) {
 			stmt->error_info = conn->error_info;

Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_structs.h
===================================================================
--- php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_structs.h	2009-12-11 10:17:40 UTC (rev 291976)
+++ php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_structs.h	2009-12-11 10:18:00 UTC (rev 291977)
@@ -305,6 +305,9 @@
 	enum_func_status	(*free_reference)(MYSQLND * const conn TSRMLS_DC);
 	enum mysqlnd_connection_state (*get_state)(MYSQLND * const conn TSRMLS_DC);
 	void				(*set_state)(MYSQLND * const conn, enum mysqlnd_connection_state new_state TSRMLS_DC);
+
+	enum_func_status	(*simple_command)(MYSQLND *conn, enum php_mysqlnd_server_command command, const char * const arg, size_t arg_len, enum php_mysql_packet_type ok_packet, zend_bool silent, zend_bool ignore_upsert_status TSRMLS_DC);
+	enum_func_status	(*simple_command_handle_response)(MYSQLND *conn, enum php_mysql_packet_type ok_packet, zend_bool silent, enum php_mysqlnd_server_command command, zend_bool ignore_upsert_status TSRMLS_DC);
 };


@@ -348,8 +351,6 @@
 									zend_bool persistent,
 									zend_bool as_unicode, zend_bool as_int_or_float,
 									MYSQLND_STATS * stats TSRMLS_DC);
-
-
 };



Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_wireprotocol.h
===================================================================
--- php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_wireprotocol.h	2009-12-11 10:17:40 UTC (rev 291976)
+++ php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_wireprotocol.h	2009-12-11 10:18:00 UTC (rev 291977)
@@ -58,59 +58,6 @@
 #define PACKET_READ_ALLOCA(packet, conn)	PACKET_READ(&(packet), (conn))
 #define PACKET_FREE_ALLOCA(packet)			(packet.header.m->free_mem(&(packet), TRUE TSRMLS_CC))

-/* Enums */
-enum php_mysql_packet_type
-{
-	PROT_GREET_PACKET= 0,
-	PROT_AUTH_PACKET,
-	PROT_OK_PACKET,
-	PROT_EOF_PACKET,
-	PROT_CMD_PACKET,
-	PROT_RSET_HEADER_PACKET,
-	PROT_RSET_FLD_PACKET,
-	PROT_ROW_PACKET,
-	PROT_STATS_PACKET,
-	PROT_PREPARE_RESP_PACKET,
-	PROT_CHG_USER_PACKET,
-	PROT_LAST, /* should always be last */
-};
-
-
-enum php_mysqlnd_server_command
-{
-	COM_SLEEP = 0,
-	COM_QUIT,
-	COM_INIT_DB,
-	COM_QUERY,
-	COM_FIELD_LIST,
-	COM_CREATE_DB,
-	COM_DROP_DB,
-	COM_REFRESH,
-	COM_SHUTDOWN,
-	COM_STATISTICS,
-	COM_PROCESS_INFO,
-	COM_CONNECT,
-	COM_PROCESS_KILL,
-	COM_DEBUG,
-	COM_PING,
-	COM_TIME = 15,
-	COM_DELAYED_INSERT,
-	COM_CHANGE_USER,
-	COM_BINLOG_DUMP,
-	COM_TABLE_DUMP,
-	COM_CONNECT_OUT = 20,
-	COM_REGISTER_SLAVE,
-	COM_STMT_PREPARE = 22,
-	COM_STMT_EXECUTE = 23,
-	COM_STMT_SEND_LONG_DATA = 24,
-	COM_STMT_CLOSE = 25,
-	COM_STMT_RESET = 26,
-	COM_SET_OPTION = 27,
-	COM_STMT_FETCH = 28,
-	COM_DAEMON,
-	COM_END
-};
-
 extern const char * const mysqlnd_command_to_text[COM_END];

 /* Low-level extraction functionality */

Modified: php/php-src/trunk/ext/mysqlnd/mysqlnd.c
===================================================================
--- php/php-src/trunk/ext/mysqlnd/mysqlnd.c	2009-12-11 10:17:40 UTC (rev 291976)
+++ php/php-src/trunk/ext/mysqlnd/mysqlnd.c	2009-12-11 10:18:00 UTC (rev 291977)
@@ -242,16 +242,15 @@
 /* }}} */


-/* {{{ mysqlnd_simple_command_handle_response */
-enum_func_status
-mysqlnd_simple_command_handle_response(MYSQLND *conn, enum php_mysql_packet_type ok_packet,
-									   zend_bool silent, enum php_mysqlnd_server_command command,
-									   zend_bool ignore_upsert_status
-									   TSRMLS_DC)
+/* {{{ mysqlnd_conn::simple_command_handle_response */
+static enum_func_status
+MYSQLND_METHOD(mysqlnd_conn, simple_command_handle_response)(MYSQLND *conn, enum php_mysql_packet_type ok_packet,
+									   						 zend_bool silent, enum php_mysqlnd_server_command command,
+									   						 zend_bool ignore_upsert_status TSRMLS_DC)
 {
 	enum_func_status ret;

-	DBG_ENTER("mysqlnd_simple_command_handle_response");
+	DBG_ENTER("mysqlnd_conn::simple_command_handle_response");
 	DBG_INF_FMT("silent=%d packet=%d command=%s", silent, ok_packet, mysqlnd_command_to_text[command]);

 	switch (ok_packet) {
@@ -343,17 +342,16 @@
 /* }}} */


-/* {{{ mysqlnd_simple_command */
-enum_func_status
-mysqlnd_simple_command(MYSQLND *conn, enum php_mysqlnd_server_command command,
-					   const char * const arg, size_t arg_len,
-					   enum php_mysql_packet_type ok_packet, zend_bool silent,
-					   zend_bool ignore_upsert_status TSRMLS_DC)
+/* {{{ mysqlnd_conn::simple_command */
+static enum_func_status
+MYSQLND_METHOD(mysqlnd_conn, simple_command)(MYSQLND *conn, enum php_mysqlnd_server_command command,
+			   const char * const arg, size_t arg_len, enum php_mysql_packet_type ok_packet, zend_bool silent,
+			   zend_bool ignore_upsert_status TSRMLS_DC)
 {
 	enum_func_status ret = PASS;
 	php_mysql_packet_command cmd_packet;

-	DBG_ENTER("mysqlnd_simple_command");
+	DBG_ENTER("mysqlnd_conn::simple_command");
 	DBG_INF_FMT("command=%s ok_packet=%d silent=%d", mysqlnd_command_to_text[command], ok_packet, silent);

 	switch (CONN_GET_STATE(conn)) {
@@ -394,7 +392,7 @@
 		DBG_ERR("Server is gone");
 		ret = FAIL;
 	} else if (ok_packet != PROT_LAST) {
-		ret = mysqlnd_simple_command_handle_response(conn, ok_packet, silent, command, ignore_upsert_status TSRMLS_CC);
+		ret = conn->m->simple_command_handle_response(conn, ok_packet, silent, command, ignore_upsert_status TSRMLS_CC);
 	}

 	/*
@@ -419,8 +417,7 @@
 	DBG_ENTER("mysqlnd_conn::set_server_option");

 	int2store(buffer, (unsigned int) option);
-	ret = mysqlnd_simple_command(conn, COM_SET_OPTION, buffer, sizeof(buffer),
-								 PROT_EOF_PACKET, FALSE, TRUE TSRMLS_CC);
+	ret = conn->m->simple_command(conn, COM_SET_OPTION, buffer, sizeof(buffer), PROT_EOF_PACKET, FALSE, TRUE TSRMLS_CC);
 	DBG_RETURN(ret);
 }
 /* }}} */
@@ -892,7 +889,7 @@
 	DBG_ENTER("mysqlnd_conn::query");
 	DBG_INF_FMT("conn=%llu query=%s", conn->thread_id, query);

-	if (PASS != mysqlnd_simple_command(conn, COM_QUERY, query, query_len,
+	if (PASS != conn->m->simple_command(conn, COM_QUERY, query, query_len,
 									   PROT_LAST /* we will handle the OK packet*/,
 									   FALSE, FALSE TSRMLS_CC)) {
 		DBG_RETURN(FAIL);
@@ -920,7 +917,7 @@
 	DBG_ENTER("mysqlnd_conn::send_query");
 	DBG_INF_FMT("conn=%llu query=%s", conn->thread_id, query);

-	ret = mysqlnd_simple_command(conn, COM_QUERY, query, query_len,
+	ret = conn->m->simple_command(conn, COM_QUERY, query, query_len,
 								 PROT_LAST /* we will handle the OK packet*/,
 								 FALSE, FALSE TSRMLS_CC);
 	CONN_SET_STATE(conn, CONN_QUERY_SENT);
@@ -1155,7 +1152,7 @@
 		*p++ = '\0';
 	}

-	if (PASS != mysqlnd_simple_command(conn, COM_FIELD_LIST, buff, p - buff,
+	if (PASS != conn->m->simple_command(conn, COM_FIELD_LIST, buff, p - buff,
 									   PROT_LAST /* we will handle the OK packet*/,
 									   FALSE, TRUE TSRMLS_CC)) {
 		DBG_RETURN(NULL);
@@ -1278,7 +1275,7 @@
 {
 	DBG_ENTER("mysqlnd_conn::dump_debug_info");
 	DBG_INF_FMT("conn=%llu", conn->thread_id);
-	DBG_RETURN(mysqlnd_simple_command(conn, COM_DEBUG, NULL, 0, PROT_EOF_PACKET, FALSE, TRUE TSRMLS_CC));
+	DBG_RETURN(conn->m->simple_command(conn, COM_DEBUG, NULL, 0, PROT_EOF_PACKET, FALSE, TRUE TSRMLS_CC));
 }
 /* }}} */

@@ -1294,7 +1291,7 @@
 	DBG_ENTER("mysqlnd_conn::select_db");
 	DBG_INF_FMT("conn=%llu db=%s", conn->thread_id, db);

-	ret = mysqlnd_simple_command(conn, COM_INIT_DB, db, db_len, PROT_OK_PACKET, FALSE, TRUE TSRMLS_CC);
+	ret = conn->m->simple_command(conn, COM_INIT_DB, db, db_len, PROT_OK_PACKET, FALSE, TRUE TSRMLS_CC);
 	/*
 	  The server sends 0 but libmysql doesn't read it and has established
 	  a protocol of giving back -1. Thus we have to follow it :(
@@ -1321,7 +1318,7 @@
 	DBG_ENTER("mysqlnd_conn::ping");
 	DBG_INF_FMT("conn=%llu", conn->thread_id);

-	ret = mysqlnd_simple_command(conn, COM_PING, NULL, 0, PROT_OK_PACKET, TRUE, TRUE TSRMLS_CC);
+	ret = conn->m->simple_command(conn, COM_PING, NULL, 0, PROT_OK_PACKET, TRUE, TRUE TSRMLS_CC);
 	/*
 	  The server sends 0 but libmysql doesn't read it and has established
 	  a protocol of giving back -1. Thus we have to follow it :(
@@ -1344,7 +1341,7 @@
 	DBG_ENTER("mysqlnd_conn::stat");
 	DBG_INF_FMT("conn=%llu", conn->thread_id);

-	ret = mysqlnd_simple_command(conn, COM_STATISTICS, NULL, 0, PROT_LAST, FALSE, TRUE TSRMLS_CC);
+	ret = conn->m->simple_command(conn, COM_STATISTICS, NULL, 0, PROT_LAST, FALSE, TRUE TSRMLS_CC);
 	if (FAIL == ret) {
 		DBG_RETURN(FAIL);
 	}
@@ -1378,13 +1375,13 @@

 	/* If we kill ourselves don't expect OK packet, PROT_LAST will skip it */
 	if (pid != conn->thread_id) {
-		ret = mysqlnd_simple_command(conn, COM_PROCESS_KILL, buff, 4, PROT_OK_PACKET, FALSE, TRUE TSRMLS_CC);
+		ret = conn->m->simple_command(conn, COM_PROCESS_KILL, buff, 4, PROT_OK_PACKET, FALSE, TRUE TSRMLS_CC);
 		/*
 		  The server sends 0 but libmysql doesn't read it and has established
 		  a protocol of giving back -1. Thus we have to follow it :(
 		*/
 		SET_ERROR_AFF_ROWS(conn);
-	} else if (PASS == (ret = mysqlnd_simple_command(conn, COM_PROCESS_KILL, buff,
+	} else if (PASS == (ret = conn->m->simple_command(conn, COM_PROCESS_KILL, buff,
 													 4, PROT_LAST, FALSE, TRUE TSRMLS_CC))) {
 		CONN_SET_STATE(conn, CONN_QUIT_SENT);
 	}
@@ -1438,7 +1435,7 @@

 	int1store(bits, options);

-	DBG_RETURN(mysqlnd_simple_command(conn, COM_REFRESH, (char *)bits, 1, PROT_OK_PACKET, FALSE, TRUE TSRMLS_CC));
+	DBG_RETURN(conn->m->simple_command(conn, COM_REFRESH, (char *)bits, 1, PROT_OK_PACKET, FALSE, TRUE TSRMLS_CC));
 }
 /* }}} */

@@ -1453,7 +1450,7 @@

 	int1store(bits, level);

-	DBG_RETURN(mysqlnd_simple_command(conn, COM_SHUTDOWN, (char *)bits, 1, PROT_OK_PACKET, FALSE, TRUE TSRMLS_CC));
+	DBG_RETURN(conn->m->simple_command(conn, COM_SHUTDOWN, (char *)bits, 1, PROT_OK_PACKET, FALSE, TRUE TSRMLS_CC));
 }
 /* }}} */

@@ -1472,7 +1469,7 @@
 		case CONN_READY:
 			DBG_INF("Connection clean, sending COM_QUIT");
 			if (conn->net.stream) {
-				ret =  mysqlnd_simple_command(conn, COM_QUIT, NULL, 0, PROT_LAST, TRUE, TRUE TSRMLS_CC);
+				ret =  conn->m->simple_command(conn, COM_QUIT, NULL, 0, PROT_LAST, TRUE, TRUE TSRMLS_CC);
 			}
 			/* Do nothing */
 			break;
@@ -1888,7 +1885,7 @@
 	}
 	*p++ = '\0';

-	if (PASS != mysqlnd_simple_command(conn, COM_CHANGE_USER, buffer, p - buffer,
+	if (PASS != conn->m->simple_command(conn, COM_CHANGE_USER, buffer, p - buffer,
 									   PROT_LAST /* we will handle the OK packet*/,
 									   silent, TRUE TSRMLS_CC)) {
 		DBG_RETURN(FAIL);
@@ -2200,6 +2197,9 @@
 	MYSQLND_METHOD_PRIVATE(mysqlnd_conn, free_reference),
 	MYSQLND_METHOD_PRIVATE(mysqlnd_conn, get_state),
 	MYSQLND_METHOD_PRIVATE(mysqlnd_conn, set_state),
+
+	MYSQLND_METHOD(mysqlnd_conn, simple_command),
+	MYSQLND_METHOD(mysqlnd_conn, simple_command_handle_response)
 MYSQLND_CLASS_METHODS_END;



Modified: php/php-src/trunk/ext/mysqlnd/mysqlnd_enum_n_def.h
===================================================================
--- php/php-src/trunk/ext/mysqlnd/mysqlnd_enum_n_def.h	2009-12-11 10:17:40 UTC (rev 291976)
+++ php/php-src/trunk/ext/mysqlnd/mysqlnd_enum_n_def.h	2009-12-11 10:18:00 UTC (rev 291977)
@@ -478,6 +478,60 @@
 } enum_mysqlnd_collected_stats;


+/* Enums */
+enum php_mysql_packet_type
+{
+	PROT_GREET_PACKET= 0,
+	PROT_AUTH_PACKET,
+	PROT_OK_PACKET,
+	PROT_EOF_PACKET,
+	PROT_CMD_PACKET,
+	PROT_RSET_HEADER_PACKET,
+	PROT_RSET_FLD_PACKET,
+	PROT_ROW_PACKET,
+	PROT_STATS_PACKET,
+	PROT_PREPARE_RESP_PACKET,
+	PROT_CHG_USER_PACKET,
+	PROT_LAST, /* should always be last */
+};
+
+
+enum php_mysqlnd_server_command
+{
+	COM_SLEEP = 0,
+	COM_QUIT,
+	COM_INIT_DB,
+	COM_QUERY,
+	COM_FIELD_LIST,
+	COM_CREATE_DB,
+	COM_DROP_DB,
+	COM_REFRESH,
+	COM_SHUTDOWN,
+	COM_STATISTICS,
+	COM_PROCESS_INFO,
+	COM_CONNECT,
+	COM_PROCESS_KILL,
+	COM_DEBUG,
+	COM_PING,
+	COM_TIME = 15,
+	COM_DELAYED_INSERT,
+	COM_CHANGE_USER,
+	COM_BINLOG_DUMP,
+	COM_TABLE_DUMP,
+	COM_CONNECT_OUT = 20,
+	COM_REGISTER_SLAVE,
+	COM_STMT_PREPARE = 22,
+	COM_STMT_EXECUTE = 23,
+	COM_STMT_SEND_LONG_DATA = 24,
+	COM_STMT_CLOSE = 25,
+	COM_STMT_RESET = 26,
+	COM_SET_OPTION = 27,
+	COM_STMT_FETCH = 28,
+	COM_DAEMON,
+	COM_END
+};
+
+
 #define MYSQLND_DEFAULT_PREFETCH_ROWS (ulong) 1

 #define MYSQLND_REFRESH_GRANT      1	/* Refresh grant tables */

Modified: php/php-src/trunk/ext/mysqlnd/mysqlnd_loaddata.c
===================================================================
--- php/php-src/trunk/ext/mysqlnd/mysqlnd_loaddata.c	2009-12-11 10:17:40 UTC (rev 291976)
+++ php/php-src/trunk/ext/mysqlnd/mysqlnd_loaddata.c	2009-12-11 10:18:00 UTC (rev 291977)
@@ -25,13 +25,7 @@
 #include "mysqlnd_priv.h"
 #include "mysqlnd_debug.h"

-enum_func_status mysqlnd_simple_command_handle_response(MYSQLND *conn,
-										enum php_mysql_packet_type ok_packet,
-										zend_bool silent, enum php_mysqlnd_server_command command,
-										zend_bool ignore_upsert_status
-									  	TSRMLS_DC);

-
 #define ALLOC_CALLBACK_ARGS(a, b, c)\
 if (c) {\
 	a = (zval ***)safe_emalloc(c, sizeof(zval **), 0);\
@@ -242,7 +236,7 @@

 infile_error:
 	/* get response from server and update upsert values */
-	if (FAIL == mysqlnd_simple_command_handle_response(conn, PROT_OK_PACKET, FALSE, COM_QUERY, FALSE TSRMLS_CC)) {
+	if (FAIL == conn->m->simple_command_handle_response(conn, PROT_OK_PACKET, FALSE, COM_QUERY, FALSE TSRMLS_CC)) {
 		result = FAIL;
 	}


Modified: php/php-src/trunk/ext/mysqlnd/mysqlnd_ps.c
===================================================================
--- php/php-src/trunk/ext/mysqlnd/mysqlnd_ps.c	2009-12-11 10:17:40 UTC (rev 291976)
+++ php/php-src/trunk/ext/mysqlnd/mysqlnd_ps.c	2009-12-11 10:18:00 UTC (rev 291977)
@@ -38,13 +38,6 @@

 static struct st_mysqlnd_stmt_methods *mysqlnd_stmt_methods;

-/* Exported by mysqlnd.c */
-enum_func_status mysqlnd_simple_command(MYSQLND *conn, enum php_mysqlnd_server_command command,
-										const char * const arg, size_t arg_len,
-										enum php_mysql_packet_type ok_packet,
-										zend_bool silent, zend_bool ignore_upsert_status
-										TSRMLS_DC);
-
 /* Exported by mysqlnd_ps_codec.c */
 zend_uchar* mysqlnd_stmt_execute_generate_request(MYSQLND_STMT *stmt, size_t *request_len,
 												  zend_bool *free_buffer TSRMLS_DC);
@@ -343,8 +336,8 @@
 		stmt_to_prepare = mysqlnd_stmt_init(stmt->conn);
 	}

-	if (FAIL == mysqlnd_simple_command(stmt_to_prepare->conn, COM_STMT_PREPARE, query,
-									   query_len, PROT_LAST, FALSE, TRUE TSRMLS_CC) ||
+	if (FAIL == stmt_to_prepare->conn->m->simple_command(stmt_to_prepare->conn, COM_STMT_PREPARE, query,
+															query_len, PROT_LAST, FALSE, TRUE TSRMLS_CC) ||
 		FAIL == mysqlnd_stmt_read_prepare_response(stmt_to_prepare TSRMLS_CC)) {
 		goto fail;
 	}
@@ -605,9 +598,9 @@

 	/* support for buffer types should be added here ! */

-	ret = mysqlnd_simple_command(stmt->conn, COM_STMT_EXECUTE, (char *)request, request_len,
-								 PROT_LAST /* we will handle the response packet*/,
-								 FALSE, FALSE TSRMLS_CC);
+	ret = stmt->conn->m->simple_command(stmt->conn, COM_STMT_EXECUTE, (char *)request, request_len,
+										PROT_LAST /* we will handle the response packet*/,
+										FALSE, FALSE TSRMLS_CC);

 	if (free_request) {
 		mnd_efree(request);
@@ -923,9 +916,9 @@
 	int4store(buf, stmt->stmt_id);
 	int4store(buf + STMT_ID_LENGTH, 1); /* for now fetch only one row */

-	if (FAIL == mysqlnd_simple_command(stmt->conn, COM_STMT_FETCH, (char *)buf, sizeof(buf),
-									   PROT_LAST /* we will handle the response packet*/,
-									   FALSE, TRUE TSRMLS_CC)) {
+	if (FAIL == stmt->conn->m->simple_command(stmt->conn, COM_STMT_FETCH, (char *)buf, sizeof(buf),
+											  PROT_LAST /* we will handle the response packet*/,
+											  FALSE, TRUE TSRMLS_CC)) {
 		stmt->error_info = stmt->conn->error_info;
 		DBG_RETURN(FAIL);
 	}
@@ -1133,7 +1126,7 @@

 		int4store(cmd_buf, stmt->stmt_id);
 		if (CONN_GET_STATE(conn) == CONN_READY &&
-			FAIL == (ret = mysqlnd_simple_command(conn, COM_STMT_RESET, (char *)cmd_buf,
+			FAIL == (ret = conn->m->simple_command(conn, COM_STMT_RESET, (char *)cmd_buf,
 												  sizeof(cmd_buf), PROT_OK_PACKET,
 												  FALSE, TRUE TSRMLS_CC))) {
 			stmt->error_info = conn->error_info;
@@ -1190,7 +1183,7 @@
 	  XXX:	Unfortunately we have to allocate additional buffer to be able the
 			additional data, which is like a header inside the payload.
 			This should be optimised, but it will be a pervasive change, so
-			mysqlnd_simple_command() will accept not a buffer, but actually MYSQLND_STRING*
+			conn->m->simple_command() will accept not a buffer, but actually MYSQLND_STRING*
 			terminated by NULL, to send. If the strings are not big, we can collapse them
 			on the buffer every connection has, but otherwise we will just send them
 			one by one to the wire.
@@ -1206,7 +1199,7 @@
 		memcpy(cmd_buf + STMT_ID_LENGTH + 2, data, length);

 		/* COM_STMT_SEND_LONG_DATA doesn't send an OK packet*/
-		ret = mysqlnd_simple_command(conn, cmd, (char *)cmd_buf, packet_len,
+		ret = conn->m->simple_command(conn, cmd, (char *)cmd_buf, packet_len,
 									 PROT_LAST , FALSE, TRUE TSRMLS_CC);
 		mnd_efree(cmd_buf);
 		if (FAIL == ret) {
@@ -1976,7 +1969,7 @@

 		int4store(cmd_buf, stmt->stmt_id);
 		if (CONN_GET_STATE(conn) == CONN_READY &&
-			FAIL == mysqlnd_simple_command(conn, COM_STMT_CLOSE, (char *)cmd_buf, sizeof(cmd_buf),
+			FAIL == conn->m->simple_command(conn, COM_STMT_CLOSE, (char *)cmd_buf, sizeof(cmd_buf),
 										   PROT_LAST /* COM_STMT_CLOSE doesn't send an OK packet*/,
 										   FALSE, TRUE TSRMLS_CC)) {
 			stmt->error_info = conn->error_info;

Modified: php/php-src/trunk/ext/mysqlnd/mysqlnd_structs.h
===================================================================
--- php/php-src/trunk/ext/mysqlnd/mysqlnd_structs.h	2009-12-11 10:17:40 UTC (rev 291976)
+++ php/php-src/trunk/ext/mysqlnd/mysqlnd_structs.h	2009-12-11 10:18:00 UTC (rev 291977)
@@ -305,6 +305,9 @@
 	enum_func_status	(*free_reference)(MYSQLND * const conn TSRMLS_DC);
 	enum mysqlnd_connection_state (*get_state)(MYSQLND * const conn TSRMLS_DC);
 	void				(*set_state)(MYSQLND * const conn, enum mysqlnd_connection_state new_state TSRMLS_DC);
+
+	enum_func_status	(*simple_command)(MYSQLND *conn, enum php_mysqlnd_server_command command, const char * const arg, size_t arg_len, enum php_mysql_packet_type ok_packet, zend_bool silent, zend_bool ignore_upsert_status TSRMLS_DC);
+	enum_func_status	(*simple_command_handle_response)(MYSQLND *conn, enum php_mysql_packet_type ok_packet, zend_bool silent, enum php_mysqlnd_server_command command, zend_bool ignore_upsert_status TSRMLS_DC);
 };


@@ -348,8 +351,6 @@
 									zend_bool persistent,
 									zend_bool as_unicode, zend_bool as_int_or_float,
 									MYSQLND_STATS * stats TSRMLS_DC);
-
-
 };



Modified: php/php-src/trunk/ext/mysqlnd/mysqlnd_wireprotocol.h
===================================================================
--- php/php-src/trunk/ext/mysqlnd/mysqlnd_wireprotocol.h	2009-12-11 10:17:40 UTC (rev 291976)
+++ php/php-src/trunk/ext/mysqlnd/mysqlnd_wireprotocol.h	2009-12-11 10:18:00 UTC (rev 291977)
@@ -58,59 +58,6 @@
 #define PACKET_READ_ALLOCA(packet, conn)	PACKET_READ(&(packet), (conn))
 #define PACKET_FREE_ALLOCA(packet)			(packet.header.m->free_mem(&(packet), TRUE TSRMLS_CC))

-/* Enums */
-enum php_mysql_packet_type
-{
-	PROT_GREET_PACKET= 0,
-	PROT_AUTH_PACKET,
-	PROT_OK_PACKET,
-	PROT_EOF_PACKET,
-	PROT_CMD_PACKET,
-	PROT_RSET_HEADER_PACKET,
-	PROT_RSET_FLD_PACKET,
-	PROT_ROW_PACKET,
-	PROT_STATS_PACKET,
-	PROT_PREPARE_RESP_PACKET,
-	PROT_CHG_USER_PACKET,
-	PROT_LAST, /* should always be last */
-};
-
-
-enum php_mysqlnd_server_command
-{
-	COM_SLEEP = 0,
-	COM_QUIT,
-	COM_INIT_DB,
-	COM_QUERY,
-	COM_FIELD_LIST,
-	COM_CREATE_DB,
-	COM_DROP_DB,
-	COM_REFRESH,
-	COM_SHUTDOWN,
-	COM_STATISTICS,
-	COM_PROCESS_INFO,
-	COM_CONNECT,
-	COM_PROCESS_KILL,
-	COM_DEBUG,
-	COM_PING,
-	COM_TIME = 15,
-	COM_DELAYED_INSERT,
-	COM_CHANGE_USER,
-	COM_BINLOG_DUMP,
-	COM_TABLE_DUMP,
-	COM_CONNECT_OUT = 20,
-	COM_REGISTER_SLAVE,
-	COM_STMT_PREPARE = 22,
-	COM_STMT_EXECUTE = 23,
-	COM_STMT_SEND_LONG_DATA = 24,
-	COM_STMT_CLOSE = 25,
-	COM_STMT_RESET = 26,
-	COM_SET_OPTION = 27,
-	COM_STMT_FETCH = 28,
-	COM_DAEMON,
-	COM_END
-};
-
 extern const char * const mysqlnd_command_to_text[COM_END];

 /* Low-level extraction functionality */
-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to