summaryrefslogtreecommitdiff
path: root/ext/mysqlnd/mysqlnd.c
diff options
context:
space:
mode:
authorAndrey Hristov <andrey@php.net>2015-10-12 14:57:48 +0200
committerAndrey Hristov <andrey@php.net>2015-11-12 16:19:16 +0100
commitcfd868651a321fbfd84ed98e33669c5f94a7098a (patch)
tree5ba7809e4adcf207b94d64964ee98358a53f9e8b /ext/mysqlnd/mysqlnd.c
parent75dc67c6ae620f1262d8233594dae2f7ed77a19a (diff)
downloadphp-git-cfd868651a321fbfd84ed98e33669c5f94a7098a.tar.gz
MDNR:
- removed init() method from mysqlnd_conn_data and moved the initialization to the object factory->get_connection(). Now it is unified as with the prepared statement which doesn't have any init() method - the protocol decoder factory now takes connection as parameter at creation and thus there is no need to pass the connection as parameter when calling the read or the write method of a packet. - saved the protocol payload decoder factory as pointer in every packet (read/write) so the connection doesn't need to be passed on every call of read/write (dependency has been already injected at creation). This will alow to move protocol specific code from MYSQLND_NET (send_ex()) to make MYSQLND_NET leaner and free from protocol stuff.
Diffstat (limited to 'ext/mysqlnd/mysqlnd.c')
-rw-r--r--ext/mysqlnd/mysqlnd.c17
1 files changed, 0 insertions, 17 deletions
diff --git a/ext/mysqlnd/mysqlnd.c b/ext/mysqlnd/mysqlnd.c
index 3ca8b1114b..56f3396974 100644
--- a/ext/mysqlnd/mysqlnd.c
+++ b/ext/mysqlnd/mysqlnd.c
@@ -2974,27 +2974,10 @@ MYSQLND_METHOD(mysqlnd_conn_data, local_tx_end)(MYSQLND_CONN_DATA * conn, size_t
/* }}} */
-/* {{{ mysqlnd_conn_data::init */
-static enum_func_status
-MYSQLND_METHOD(mysqlnd_conn_data, init)(MYSQLND_CONN_DATA * conn)
-{
- DBG_ENTER("mysqlnd_conn_data::init");
- mysqlnd_stats_init(&conn->stats, STAT_LAST, conn->persistent);
- SET_ERROR_AFF_ROWS(conn);
-
- conn->net = mysqlnd_net_init(conn->persistent, conn->stats, conn->error_info);
- conn->payload_decoder_factory = mysqlnd_protocol_payload_decoder_factory_init(conn->persistent);
-
- DBG_RETURN(conn->stats && conn->net && conn->payload_decoder_factory? PASS:FAIL);
-}
-/* }}} */
-
-
MYSQLND_STMT * _mysqlnd_stmt_init(MYSQLND_CONN_DATA * const conn);
MYSQLND_CLASS_METHODS_START(mysqlnd_conn_data)
- MYSQLND_METHOD(mysqlnd_conn_data, init),
MYSQLND_METHOD(mysqlnd_conn_data, connect),
MYSQLND_METHOD(mysqlnd_conn_data, escape_string),