]> granicus.if.org Git - php/commitdiff
MNDR:
authorAndrey Hristov <andrey@php.net>
Fri, 2 Oct 2015 13:30:53 +0000 (15:30 +0200)
committerAndrey Hristov <andrey@php.net>
Thu, 12 Nov 2015 15:19:16 +0000 (16:19 +0100)
- Rename MYSQLND_PROTOCOL to MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY
- Rename other symbols related to MYSQLND_PROTOCOL accordingly

12 files changed:
ext/mysqlnd/mysqlnd.c
ext/mysqlnd/mysqlnd_auth.c
ext/mysqlnd/mysqlnd_driver.c
ext/mysqlnd/mysqlnd_ext_plugin.c
ext/mysqlnd/mysqlnd_ext_plugin.h
ext/mysqlnd/mysqlnd_priv.h
ext/mysqlnd/mysqlnd_ps.c
ext/mysqlnd/mysqlnd_result.c
ext/mysqlnd/mysqlnd_result_meta.c
ext/mysqlnd/mysqlnd_structs.h
ext/mysqlnd/mysqlnd_wireprotocol.c
ext/mysqlnd/mysqlnd_wireprotocol.h

index a68ed6651156cf76c68ceececc5884091bfce8b5..eede5a5800a80510f7b8abf2524f6f0aaf388893 100644 (file)
@@ -193,9 +193,9 @@ MYSQLND_METHOD_PRIVATE(mysqlnd_conn_data, dtor)(MYSQLND_CONN_DATA * conn)
                conn->net = NULL;
        }
 
-       if (conn->protocol) {
-               mysqlnd_protocol_free(conn->protocol);
-               conn->protocol = NULL;
+       if (conn->payload_decoder_factory) {
+               mysqlnd_protocol_payload_decoder_factory_free(conn->payload_decoder_factory);
+               conn->payload_decoder_factory = NULL;
        }
 
        if (conn->stats) {
@@ -222,7 +222,7 @@ MYSQLND_METHOD(mysqlnd_conn_data, send_command_handle_response)(MYSQLND_CONN_DAT
 
        switch (ok_packet) {
                case PROT_OK_PACKET:{
-                       MYSQLND_PACKET_OK * ok_response = conn->protocol->m.get_ok_packet(conn->protocol, FALSE);
+                       MYSQLND_PACKET_OK * ok_response = conn->payload_decoder_factory->m.get_ok_packet(conn->payload_decoder_factory, FALSE);
                        if (!ok_response) {
                                SET_OOM_ERROR(*conn->error_info);
                                break;
@@ -268,7 +268,7 @@ MYSQLND_METHOD(mysqlnd_conn_data, send_command_handle_response)(MYSQLND_CONN_DAT
                        break;
                }
                case PROT_EOF_PACKET:{
-                       MYSQLND_PACKET_EOF * ok_response = conn->protocol->m.get_eof_packet(conn->protocol, FALSE);
+                       MYSQLND_PACKET_EOF * ok_response = conn->payload_decoder_factory->m.get_eof_packet(conn->payload_decoder_factory, FALSE);
                        if (!ok_response) {
                                SET_OOM_ERROR(*conn->error_info);
                                break;
@@ -338,7 +338,7 @@ MYSQLND_METHOD(mysqlnd_conn_data, send_command_do_request)(MYSQLND_CONN_DATA * c
        SET_ERROR_AFF_ROWS(conn);
        SET_EMPTY_ERROR(*conn->error_info);
 
-       cmd_packet = conn->protocol->m.get_command_packet(conn->protocol, FALSE);
+       cmd_packet = conn->payload_decoder_factory->m.get_command_packet(conn->payload_decoder_factory, FALSE);
        if (!cmd_packet) {
                SET_OOM_ERROR(*conn->error_info);
                DBG_RETURN(FAIL);
@@ -473,7 +473,7 @@ mysqlnd_switch_to_ssl_if_needed(
        DBG_INF_FMT("CLIENT_SSL_VERIFY_SERVER_CERT=     %d", mysql_flags & CLIENT_SSL_VERIFY_SERVER_CERT? 1:0);
        DBG_INF_FMT("CLIENT_REMEMBER_OPTIONS=           %d", mysql_flags & CLIENT_REMEMBER_OPTIONS? 1:0);
 
-       auth_packet = conn->protocol->m.get_auth_packet(conn->protocol, FALSE);
+       auth_packet = conn->payload_decoder_factory->m.get_auth_packet(conn->payload_decoder_factory, FALSE);
        if (!auth_packet) {
                SET_OOM_ERROR(*conn->error_info);
                goto end;
@@ -800,7 +800,7 @@ MYSQLND_METHOD(mysqlnd_conn_data, connect_handshake)(MYSQLND_CONN_DATA * conn,
 
        DBG_ENTER("mysqlnd_conn_data::connect_handshake");
 
-       greet_packet = conn->protocol->m.get_greet_packet(conn->protocol, FALSE);
+       greet_packet = conn->payload_decoder_factory->m.get_greet_packet(conn->payload_decoder_factory, FALSE);
        if (!greet_packet) {
                SET_OOM_ERROR(*conn->error_info);
                DBG_RETURN(FAIL); /* OOM */
@@ -1761,7 +1761,7 @@ MYSQLND_METHOD(mysqlnd_conn_data, statistic)(MYSQLND_CONN_DATA * conn, zend_stri
                        if (FAIL == ret) {
                                break;
                        }
-                       stats_header = conn->protocol->m.get_stats_packet(conn->protocol, FALSE);
+                       stats_header = conn->payload_decoder_factory->m.get_stats_packet(conn->payload_decoder_factory, FALSE);
                        if (!stats_header) {
                                SET_OOM_ERROR(*conn->error_info);
                                break;
@@ -2983,9 +2983,9 @@ MYSQLND_METHOD(mysqlnd_conn_data, init)(MYSQLND_CONN_DATA * conn)
        SET_ERROR_AFF_ROWS(conn);
 
        conn->net = mysqlnd_net_init(conn->persistent, conn->stats, conn->error_info);
-       conn->protocol = mysqlnd_protocol_init(conn->persistent);
+       conn->payload_decoder_factory = mysqlnd_protocol_payload_decoder_factory_init(conn->persistent);
 
-       DBG_RETURN(conn->stats && conn->net && conn->protocol? PASS:FAIL);
+       DBG_RETURN(conn->stats && conn->net && conn->payload_decoder_factory? PASS:FAIL);
 }
 /* }}} */
 
index ac15bf66df1330990d709c9af3ef99156462619d..9512e12728edd17581a769b5a1ed8c4281b956af 100644 (file)
@@ -57,7 +57,7 @@ mysqlnd_auth_handshake(MYSQLND_CONN_DATA * conn,
 
        DBG_ENTER("mysqlnd_auth_handshake");
 
-       auth_resp_packet = conn->protocol->m.get_auth_response_packet(conn->protocol, FALSE);
+       auth_resp_packet = conn->payload_decoder_factory->m.get_auth_response_packet(conn->payload_decoder_factory, FALSE);
 
        if (!auth_resp_packet) {
                SET_OOM_ERROR(*conn->error_info);
@@ -65,7 +65,7 @@ mysqlnd_auth_handshake(MYSQLND_CONN_DATA * conn,
        }
 
        if (use_full_blown_auth_packet != TRUE) {
-               change_auth_resp_packet = conn->protocol->m.get_change_auth_response_packet(conn->protocol, FALSE);
+               change_auth_resp_packet = conn->payload_decoder_factory->m.get_change_auth_response_packet(conn->payload_decoder_factory, FALSE);
                if (!change_auth_resp_packet) {
                        SET_OOM_ERROR(*conn->error_info);
                        goto end;
@@ -80,7 +80,7 @@ mysqlnd_auth_handshake(MYSQLND_CONN_DATA * conn,
                        goto end;
                }
        } else {
-               auth_packet = conn->protocol->m.get_auth_packet(conn->protocol, FALSE);
+               auth_packet = conn->payload_decoder_factory->m.get_auth_packet(conn->payload_decoder_factory, FALSE);
 
                auth_packet->client_flags = mysql_flags;
                auth_packet->max_packet_size = session_options->max_allowed_packet;
@@ -178,7 +178,7 @@ mysqlnd_auth_change_user(MYSQLND_CONN_DATA * const conn,
 
        DBG_ENTER("mysqlnd_auth_change_user");
 
-       chg_user_resp = conn->protocol->m.get_change_user_response_packet(conn->protocol, FALSE);
+       chg_user_resp = conn->payload_decoder_factory->m.get_change_user_response_packet(conn->payload_decoder_factory, FALSE);
 
        if (!chg_user_resp) {
                SET_OOM_ERROR(*conn->error_info);
@@ -186,7 +186,7 @@ mysqlnd_auth_change_user(MYSQLND_CONN_DATA * const conn,
        }
 
        if (use_full_blown_auth_packet != TRUE) {
-               change_auth_resp_packet = conn->protocol->m.get_change_auth_response_packet(conn->protocol, FALSE);
+               change_auth_resp_packet = conn->payload_decoder_factory->m.get_change_auth_response_packet(conn->payload_decoder_factory, FALSE);
                if (!change_auth_resp_packet) {
                        SET_OOM_ERROR(*conn->error_info);
                        goto end;
@@ -201,7 +201,7 @@ mysqlnd_auth_change_user(MYSQLND_CONN_DATA * const conn,
                        goto end;
                }
        } else {
-               auth_packet = conn->protocol->m.get_auth_packet(conn->protocol, FALSE);
+               auth_packet = conn->payload_decoder_factory->m.get_auth_packet(conn->payload_decoder_factory, FALSE);
 
                if (!auth_packet) {
                        SET_OOM_ERROR(*conn->error_info);
@@ -260,7 +260,7 @@ mysqlnd_auth_change_user(MYSQLND_CONN_DATA * const conn,
                  When it gets fixed, there should be one more check here
                */
                if (conn->m->get_server_version(conn) > 50113L &&conn->m->get_server_version(conn) < 50118L) {
-                       MYSQLND_PACKET_OK * redundant_error_packet = conn->protocol->m.get_ok_packet(conn->protocol, FALSE);
+                       MYSQLND_PACKET_OK * redundant_error_packet = conn->payload_decoder_factory->m.get_ok_packet(conn->payload_decoder_factory, FALSE);
                        if (redundant_error_packet) {
                                PACKET_READ(redundant_error_packet, conn);
                                PACKET_FREE(redundant_error_packet);
@@ -499,12 +499,12 @@ mysqlnd_sha256_get_rsa_key(MYSQLND_CONN_DATA * conn,
 
                do {
                        DBG_INF("requesting the public key from the server");
-                       pk_req_packet = conn->protocol->m.get_sha256_pk_request_packet(conn->protocol, FALSE);
+                       pk_req_packet = conn->payload_decoder_factory->m.get_sha256_pk_request_packet(conn->payload_decoder_factory, FALSE);
                        if (!pk_req_packet) {
                                SET_OOM_ERROR(*conn->error_info);
                                break;
                        }
-                       pk_resp_packet = conn->protocol->m.get_sha256_pk_request_response_packet(conn->protocol, FALSE);
+                       pk_resp_packet = conn->payload_decoder_factory->m.get_sha256_pk_request_response_packet(conn->payload_decoder_factory, FALSE);
                        if (!pk_resp_packet) {
                                SET_OOM_ERROR(*conn->error_info);
                                PACKET_FREE(pk_req_packet);
index 628e02659d298ff1d3860bab9bfe59fcd3cc282d..11cbb70c5336c86de7cabc276e55af17b4fdac7a 100644 (file)
@@ -282,18 +282,18 @@ MYSQLND_METHOD(mysqlnd_object_factory, get_io_channel)(zend_bool persistent, MYS
 /* }}} */
 
 
-/* {{{ mysqlnd_object_factory::get_protocol_decoder */
-static MYSQLND_PROTOCOL *
-MYSQLND_METHOD(mysqlnd_object_factory, get_protocol_decoder)(zend_bool persistent)
+/* {{{ mysqlnd_object_factory::get_protocol_payload_decoder_factory */
+static MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY *
+MYSQLND_METHOD(mysqlnd_object_factory, get_protocol_payload_decoder_factory)(zend_bool persistent)
 {
-       size_t alloc_size = sizeof(MYSQLND_PROTOCOL) + mysqlnd_plugin_count() * sizeof(void *);
-       MYSQLND_PROTOCOL *ret = mnd_pecalloc(1, alloc_size, persistent);
+       size_t alloc_size = sizeof(MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY) + mysqlnd_plugin_count() * sizeof(void *);
+       MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY *ret = mnd_pecalloc(1, alloc_size, persistent);
 
-       DBG_ENTER("mysqlnd_object_factory::get_protocol_decoder");
+       DBG_ENTER("mysqlnd_object_factory::get_protocol_payload_decoder_factory");
        DBG_INF_FMT("persistent=%u", persistent);
        if (ret) {
                ret->persistent = persistent;
-               ret->m = mysqlnd_mysqlnd_protocol_methods;
+               ret->m = MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_protocol_payload_decoder_factory);
        }
 
        DBG_RETURN(ret);
@@ -306,7 +306,7 @@ PHPAPI MYSQLND_CLASS_METHODS_START(mysqlnd_object_factory)
        MYSQLND_METHOD(mysqlnd_object_factory, clone_connection_object),
        MYSQLND_METHOD(mysqlnd_object_factory, get_prepared_statement),
        MYSQLND_METHOD(mysqlnd_object_factory, get_io_channel),
-       MYSQLND_METHOD(mysqlnd_object_factory, get_protocol_decoder)
+       MYSQLND_METHOD(mysqlnd_object_factory, get_protocol_payload_decoder_factory)
 MYSQLND_CLASS_METHODS_END;
 
 /*
index ec88c29ced59596c50daea60ec01c8ccc65c3879..44ded51cf718f2ea1b6753ee510e265fedbdef6d 100644 (file)
@@ -110,14 +110,14 @@ PHPAPI void ** _mysqlnd_plugin_get_plugin_result_buffered_data_c(const MYSQLND_R
 
 /* {{{ _mysqlnd_plugin_get_plugin_protocol_data */
 PHPAPI void **
-_mysqlnd_plugin_get_plugin_protocol_data(const MYSQLND_PROTOCOL * protocol, unsigned int plugin_id)
+_mysqlnd_plugin_get_plugin_protocol_data(const MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * factory, unsigned int plugin_id)
 {
        DBG_ENTER("_mysqlnd_plugin_get_plugin_protocol_data");
        DBG_INF_FMT("plugin_id=%u", plugin_id);
-       if (!protocol || plugin_id >= mysqlnd_plugin_count()) {
+       if (!factory || plugin_id >= mysqlnd_plugin_count()) {
                return NULL;
        }
-       DBG_RETURN((void *)((char *)protocol + sizeof(MYSQLND_PROTOCOL) + plugin_id * sizeof(void *)));
+       DBG_RETURN((void *)((char *)factory + sizeof(MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY) + plugin_id * sizeof(void *)));
 }
 /* }}} */
 
@@ -253,20 +253,20 @@ mysqlnd_stmt_set_methods(struct st_mysqlnd_stmt_methods *methods)
 /* }}} */
 
 
-/* {{{ mysqlnd_protocol_get_methods */
-PHPAPI struct st_mysqlnd_protocol_methods *
-mysqlnd_protocol_get_methods()
+/* {{{ mysqlnd_protocol_payload_decoder_factory_get_methods */
+PHPAPI struct st_mysqlnd_protocol_payload_decoder_factory_methods *
+mysqlnd_protocol_payload_decoder_factory_get_methods()
 {
-       return &MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_protocol);
+       return &MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_protocol_payload_decoder_factory);
 }
 /* }}} */
 
 
-/* {{{ mysqlnd_protocol_set_methods */
+/* {{{ mysqlnd_protocol_payload_decoder_factory_set_methods */
 PHPAPI void
-mysqlnd_protocol_set_methods(struct st_mysqlnd_protocol_methods * methods)
+mysqlnd_protocol_payload_decoder_factory_set_methods(struct st_mysqlnd_protocol_payload_decoder_factory_methods * methods)
 {
-       MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_protocol) = *methods;
+       MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_protocol_payload_decoder_factory) = *methods;
 }
 /* }}} */
 
index 2fee96e6c55ef72d06f95de35e76005ae19e142a..e802be64c8e40ae3e2709872b4fb702283f751ff 100644 (file)
@@ -43,7 +43,7 @@ PHPAPI void ** _mysqlnd_plugin_get_plugin_result_buffered_data_c(const MYSQLND_R
 PHPAPI void ** _mysqlnd_plugin_get_plugin_stmt_data(const MYSQLND_STMT * stmt, unsigned int plugin_id);
 #define mysqlnd_plugin_get_plugin_stmt_data(s, p_id) _mysqlnd_plugin_get_plugin_stmt_data((s), (p_id))
 
-PHPAPI void ** _mysqlnd_plugin_get_plugin_protocol_data(const MYSQLND_PROTOCOL * protocol, unsigned int plugin_id);
+PHPAPI void ** _mysqlnd_plugin_get_plugin_protocol_data(const MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * factory, unsigned int plugin_id);
 #define mysqlnd_plugin_get_plugin_protocol_data(p, p_id) _mysqlnd_plugin_get_plugin_protocol_data((p), (p_id))
 
 PHPAPI void ** _mysqlnd_plugin_get_plugin_net_data(const MYSQLND_NET * net, unsigned int plugin_id);
index 2a78dd48b663eb8da2ff9a9e65efe0832f39ec34..618845afff2455921e9e4e73e139d1245512f610 100644 (file)
@@ -179,7 +179,7 @@ PHPAPI extern MYSQLND_CLASS_METHOD_TABLE_NAME_FORWARD(mysqlnd_conn_data);
 PHPAPI extern MYSQLND_CLASS_METHOD_TABLE_NAME_FORWARD(mysqlnd_res);
 PHPAPI extern MYSQLND_CLASS_METHOD_TABLE_NAME_FORWARD(mysqlnd_result_unbuffered);
 PHPAPI extern MYSQLND_CLASS_METHOD_TABLE_NAME_FORWARD(mysqlnd_result_buffered);
-PHPAPI extern MYSQLND_CLASS_METHOD_TABLE_NAME_FORWARD(mysqlnd_protocol);
+PHPAPI extern MYSQLND_CLASS_METHOD_TABLE_NAME_FORWARD(mysqlnd_protocol_payload_decoder_factory);
 PHPAPI extern MYSQLND_CLASS_METHOD_TABLE_NAME_FORWARD(mysqlnd_net);
 
 enum_func_status mysqlnd_handle_local_infile(MYSQLND_CONN_DATA * conn, const char * filename, zend_bool * is_warning);
index 3bc03fbe2f2ca2a4abca44ec50789967aa9dee54..461b078808bad316e4a7933f16bfd986ec05b833 100644 (file)
@@ -265,12 +265,12 @@ mysqlnd_stmt_skip_metadata(MYSQLND_STMT * s)
        MYSQLND_PACKET_RES_FIELD * field_packet;
 
        DBG_ENTER("mysqlnd_stmt_skip_metadata");
-       if (!stmt || !stmt->conn || !stmt->conn->protocol) {
+       if (!stmt || !stmt->conn || !stmt->conn->payload_decoder_factory) {
                DBG_RETURN(FAIL);
        }
        DBG_INF_FMT("stmt=%lu", stmt->stmt_id);
 
-       field_packet = stmt->conn->protocol->m.get_result_field_packet(stmt->conn->protocol, FALSE);
+       field_packet = stmt->conn->payload_decoder_factory->m.get_result_field_packet(stmt->conn->payload_decoder_factory, FALSE);
        if (!field_packet) {
                SET_OOM_ERROR(*stmt->error_info);
                SET_OOM_ERROR(*stmt->conn->error_info);
@@ -300,12 +300,12 @@ mysqlnd_stmt_read_prepare_response(MYSQLND_STMT * s)
        enum_func_status ret = FAIL;
 
        DBG_ENTER("mysqlnd_stmt_read_prepare_response");
-       if (!stmt || !stmt->conn || !stmt->conn->protocol) {
+       if (!stmt || !stmt->conn || !stmt->conn->payload_decoder_factory) {
                DBG_RETURN(FAIL);
        }
        DBG_INF_FMT("stmt=%lu", stmt->stmt_id);
 
-       prepare_resp = stmt->conn->protocol->m.get_prepare_response_packet(stmt->conn->protocol, FALSE);
+       prepare_resp = stmt->conn->payload_decoder_factory->m.get_prepare_response_packet(stmt->conn->payload_decoder_factory, FALSE);
        if (!prepare_resp) {
                SET_OOM_ERROR(*stmt->error_info);
                SET_OOM_ERROR(*stmt->conn->error_info);
@@ -344,12 +344,12 @@ mysqlnd_stmt_prepare_read_eof(MYSQLND_STMT * s)
        enum_func_status ret = FAIL;
 
        DBG_ENTER("mysqlnd_stmt_prepare_read_eof");
-       if (!stmt || !stmt->conn || !stmt->conn->protocol) {
+       if (!stmt || !stmt->conn || !stmt->conn->payload_decoder_factory) {
                DBG_RETURN(FAIL);
        }
        DBG_INF_FMT("stmt=%lu", stmt->stmt_id);
 
-       fields_eof = stmt->conn->protocol->m.get_eof_packet(stmt->conn->protocol, FALSE);
+       fields_eof = stmt->conn->payload_decoder_factory->m.get_eof_packet(stmt->conn->payload_decoder_factory, FALSE);
        if (!fields_eof) {
                SET_OOM_ERROR(*stmt->error_info);
                SET_OOM_ERROR(*stmt->conn->error_info);
index 4208097cf76e7fb0acc56ec40a534a959e9dffe3..bee0a1da88d6029ee95d0b2c34a7654977ef4c31 100644 (file)
@@ -411,7 +411,7 @@ mysqlnd_query_read_result_set_header(MYSQLND_CONN_DATA * conn, MYSQLND_STMT * s)
 
        ret = FAIL;
        do {
-               rset_header = conn->protocol->m.get_rset_header_packet(conn->protocol, FALSE);
+               rset_header = conn->payload_decoder_factory->m.get_rset_header_packet(conn->payload_decoder_factory, FALSE);
                if (!rset_header) {
                        SET_OOM_ERROR(*conn->error_info);
                        ret = FAIL;
@@ -542,7 +542,7 @@ mysqlnd_query_read_result_set_header(MYSQLND_CONN_DATA * conn, MYSQLND_STMT * s)
                                }
 
                                /* Check for SERVER_STATUS_MORE_RESULTS if needed */
-                               fields_eof = conn->protocol->m.get_eof_packet(conn->protocol, FALSE);
+                               fields_eof = conn->payload_decoder_factory->m.get_eof_packet(conn->payload_decoder_factory, FALSE);
                                if (!fields_eof) {
                                        SET_OOM_ERROR(*conn->error_info);
                                        ret = FAIL;
@@ -944,7 +944,7 @@ MYSQLND_METHOD(mysqlnd_res, use_result)(MYSQLND_RES * const result, zend_bool ps
          this to be not NULL.
        */
        /* FALSE = non-persistent */
-       result->unbuf->row_packet = result->conn->protocol->m.get_row_packet(result->conn->protocol, FALSE);
+       result->unbuf->row_packet = result->conn->payload_decoder_factory->m.get_row_packet(result->conn->payload_decoder_factory, FALSE);
        if (!result->unbuf->row_packet) {
                goto oom;
        }
@@ -1295,7 +1295,7 @@ MYSQLND_METHOD(mysqlnd_res, store_result_fetch_data)(MYSQLND_CONN_DATA * const c
        set->references = 1;
 
        /* non-persistent */
-       row_packet = conn->protocol->m.get_row_packet(conn->protocol, FALSE);
+       row_packet = conn->payload_decoder_factory->m.get_row_packet(conn->payload_decoder_factory, FALSE);
        if (!row_packet) {
                SET_OOM_ERROR(*conn->error_info);
                ret = FAIL;
index 154d05357f4d61339fce194fd0d33d7b5b535254..87a434fd3ad78178150449fd4e4a580c23435e1d 100644 (file)
@@ -57,7 +57,7 @@ MYSQLND_METHOD(mysqlnd_res_meta, read_metadata)(MYSQLND_RES_METADATA * const met
 
        DBG_ENTER("mysqlnd_res_meta::read_metadata");
 
-       field_packet = conn->protocol->m.get_result_field_packet(conn->protocol, FALSE);
+       field_packet = conn->payload_decoder_factory->m.get_result_field_packet(conn->payload_decoder_factory, FALSE);
        if (!field_packet) {
                SET_OOM_ERROR(*conn->error_info);
                DBG_RETURN(FAIL);
index fd3e6e51d13f1e83bd3d3aef98894dfd463f5385..03a341baba7a1598221f6b22f2c33a19967e7cba 100644 (file)
@@ -224,7 +224,7 @@ typedef struct st_mysqlnd_connection MYSQLND;
 typedef struct st_mysqlnd_connection_data MYSQLND_CONN_DATA;
 typedef struct st_mysqlnd_net  MYSQLND_NET;
 typedef struct st_mysqlnd_net_data     MYSQLND_NET_DATA;
-typedef struct st_mysqlnd_protocol     MYSQLND_PROTOCOL;
+typedef struct st_mysqlnd_protocol_payload_decoder_factory     MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY;
 typedef struct st_mysqlnd_res  MYSQLND_RES;
 typedef char**                                         MYSQLND_ROW_C;          /* return data as array of strings */
 typedef struct st_mysqlnd_stmt_data    MYSQLND_STMT_DATA;
@@ -357,39 +357,39 @@ struct st_mysqlnd_packet_auth_pam;
 struct st_mysqlnd_packet_sha256_pk_request;
 struct st_mysqlnd_packet_sha256_pk_request_response;
 
-typedef struct st_mysqlnd_packet_greet *               (*func_mysqlnd_protocol__get_greet_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent);
-typedef struct st_mysqlnd_packet_auth *                        (*func_mysqlnd_protocol__get_auth_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent);
-typedef struct st_mysqlnd_packet_auth_response *(*func_mysqlnd_protocol__get_auth_response_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent);
-typedef struct st_mysqlnd_packet_change_auth_response *        (*func_mysqlnd_protocol__get_change_auth_response_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent);
-typedef struct st_mysqlnd_packet_ok *                  (*func_mysqlnd_protocol__get_ok_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent);
-typedef struct st_mysqlnd_packet_command *             (*func_mysqlnd_protocol__get_command_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent);
-typedef struct st_mysqlnd_packet_eof *                 (*func_mysqlnd_protocol__get_eof_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent);
-typedef struct st_mysqlnd_packet_rset_header * (*func_mysqlnd_protocol__get_rset_header_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent);
-typedef struct st_mysqlnd_packet_res_field *   (*func_mysqlnd_protocol__get_result_field_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent);
-typedef struct st_mysqlnd_packet_row *                 (*func_mysqlnd_protocol__get_row_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent);
-typedef struct st_mysqlnd_packet_stats *               (*func_mysqlnd_protocol__get_stats_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent);
-typedef struct st_mysqlnd_packet_prepare_response *(*func_mysqlnd_protocol__get_prepare_response_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent);
-typedef struct st_mysqlnd_packet_chg_user_resp*(*func_mysqlnd_protocol__get_change_user_response_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent);
-typedef struct st_mysqlnd_packet_sha256_pk_request *(*func_mysqlnd_protocol__get_sha256_pk_request_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent);
-typedef struct st_mysqlnd_packet_sha256_pk_request_response *(*func_mysqlnd_protocol__get_sha256_pk_request_response_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent);
-
-struct st_mysqlnd_protocol_methods
+typedef struct st_mysqlnd_packet_greet *               (*func_mysqlnd_protocol_payload_decoder_factory__get_greet_packet)(MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * const factory, zend_bool persistent);
+typedef struct st_mysqlnd_packet_auth *                        (*func_mysqlnd_protocol_payload_decoder_factory__get_auth_packet)(MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * const factory, zend_bool persistent);
+typedef struct st_mysqlnd_packet_auth_response *(*func_mysqlnd_protocol_payload_decoder_factory__get_auth_response_packet)(MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * const factory, zend_bool persistent);
+typedef struct st_mysqlnd_packet_change_auth_response *        (*func_mysqlnd_protocol_payload_decoder_factory__get_change_auth_response_packet)(MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * const factory, zend_bool persistent);
+typedef struct st_mysqlnd_packet_ok *                  (*func_mysqlnd_protocol_payload_decoder_factory__get_ok_packet)(MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * const factory, zend_bool persistent);
+typedef struct st_mysqlnd_packet_command *             (*func_mysqlnd_protocol_payload_decoder_factory__get_command_packet)(MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * const factory, zend_bool persistent);
+typedef struct st_mysqlnd_packet_eof *                 (*func_mysqlnd_protocol_payload_decoder_factory__get_eof_packet)(MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * const factory, zend_bool persistent);
+typedef struct st_mysqlnd_packet_rset_header * (*func_mysqlnd_protocol_payload_decoder_factory__get_rset_header_packet)(MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * const factory, zend_bool persistent);
+typedef struct st_mysqlnd_packet_res_field *   (*func_mysqlnd_protocol_payload_decoder_factory__get_result_field_packet)(MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * const factory, zend_bool persistent);
+typedef struct st_mysqlnd_packet_row *                 (*func_mysqlnd_protocol_payload_decoder_factory__get_row_packet)(MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * const factory, zend_bool persistent);
+typedef struct st_mysqlnd_packet_stats *               (*func_mysqlnd_protocol_payload_decoder_factory__get_stats_packet)(MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * const factory, zend_bool persistent);
+typedef struct st_mysqlnd_packet_prepare_response *(*func_mysqlnd_protocol_payload_decoder_factory__get_prepare_response_packet)(MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * const factory, zend_bool persistent);
+typedef struct st_mysqlnd_packet_chg_user_resp*(*func_mysqlnd_protocol_payload_decoder_factory__get_change_user_response_packet)(MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * const factory, zend_bool persistent);
+typedef struct st_mysqlnd_packet_sha256_pk_request *(*func_mysqlnd_protocol_payload_decoder_factory__get_sha256_pk_request_packet)(MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * const factory, zend_bool persistent);
+typedef struct st_mysqlnd_packet_sha256_pk_request_response *(*func_mysqlnd_protocol_payload_decoder_factory__get_sha256_pk_request_response_packet)(MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * const factory, zend_bool persistent);
+
+struct st_mysqlnd_protocol_payload_decoder_factory_methods
 {
-       func_mysqlnd_protocol__get_greet_packet get_greet_packet;
-       func_mysqlnd_protocol__get_auth_packet get_auth_packet;
-       func_mysqlnd_protocol__get_auth_response_packet get_auth_response_packet;
-       func_mysqlnd_protocol__get_change_auth_response_packet get_change_auth_response_packet;
-       func_mysqlnd_protocol__get_ok_packet get_ok_packet;
-       func_mysqlnd_protocol__get_command_packet get_command_packet;
-       func_mysqlnd_protocol__get_eof_packet get_eof_packet;
-       func_mysqlnd_protocol__get_rset_header_packet get_rset_header_packet;
-       func_mysqlnd_protocol__get_result_field_packet get_result_field_packet;
-       func_mysqlnd_protocol__get_row_packet get_row_packet;
-       func_mysqlnd_protocol__get_stats_packet get_stats_packet;
-       func_mysqlnd_protocol__get_prepare_response_packet get_prepare_response_packet;
-       func_mysqlnd_protocol__get_change_user_response_packet get_change_user_response_packet;
-       func_mysqlnd_protocol__get_sha256_pk_request_packet get_sha256_pk_request_packet;
-       func_mysqlnd_protocol__get_sha256_pk_request_response_packet get_sha256_pk_request_response_packet;
+       func_mysqlnd_protocol_payload_decoder_factory__get_greet_packet get_greet_packet;
+       func_mysqlnd_protocol_payload_decoder_factory__get_auth_packet get_auth_packet;
+       func_mysqlnd_protocol_payload_decoder_factory__get_auth_response_packet get_auth_response_packet;
+       func_mysqlnd_protocol_payload_decoder_factory__get_change_auth_response_packet get_change_auth_response_packet;
+       func_mysqlnd_protocol_payload_decoder_factory__get_ok_packet get_ok_packet;
+       func_mysqlnd_protocol_payload_decoder_factory__get_command_packet get_command_packet;
+       func_mysqlnd_protocol_payload_decoder_factory__get_eof_packet get_eof_packet;
+       func_mysqlnd_protocol_payload_decoder_factory__get_rset_header_packet get_rset_header_packet;
+       func_mysqlnd_protocol_payload_decoder_factory__get_result_field_packet get_result_field_packet;
+       func_mysqlnd_protocol_payload_decoder_factory__get_row_packet get_row_packet;
+       func_mysqlnd_protocol_payload_decoder_factory__get_stats_packet get_stats_packet;
+       func_mysqlnd_protocol_payload_decoder_factory__get_prepare_response_packet get_prepare_response_packet;
+       func_mysqlnd_protocol_payload_decoder_factory__get_change_user_response_packet get_change_user_response_packet;
+       func_mysqlnd_protocol_payload_decoder_factory__get_sha256_pk_request_packet get_sha256_pk_request_packet;
+       func_mysqlnd_protocol_payload_decoder_factory__get_sha256_pk_request_response_packet get_sha256_pk_request_response_packet;
 
        void * unused1;
        void * unused2;
@@ -401,7 +401,7 @@ typedef MYSQLND * (*func_mysqlnd_object_factory__get_connection)(zend_bool persi
 typedef MYSQLND * (*func_mysqlnd_object_factory__clone_connection_object)(MYSQLND * conn);
 typedef MYSQLND_STMT * (*func_mysqlnd_object_factory__get_prepared_statement)(MYSQLND_CONN_DATA * conn);
 typedef MYSQLND_NET * (*func_mysqlnd_object_factory__get_io_channel)(zend_bool persistent, MYSQLND_STATS * stats, MYSQLND_ERROR_INFO * error_info);
-typedef MYSQLND_PROTOCOL * (*func_mysqlnd_object_factory__get_protocol_decoder)(zend_bool persistent);
+typedef MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * (*func_mysqlnd_object_factory__get_protocol_payload_decoder_factory)(zend_bool persistent);
 
 
 struct st_mysqlnd_object_factory_methods
@@ -410,7 +410,7 @@ struct st_mysqlnd_object_factory_methods
        func_mysqlnd_object_factory__clone_connection_object clone_connection_object;
        func_mysqlnd_object_factory__get_prepared_statement get_prepared_statement;
        func_mysqlnd_object_factory__get_io_channel get_io_channel;
-       func_mysqlnd_object_factory__get_protocol_decoder get_protocol_decoder;
+       func_mysqlnd_object_factory__get_protocol_payload_decoder_factory get_protocol_payload_decoder_factory;
 };
 
 
@@ -892,10 +892,10 @@ struct st_mysqlnd_net
 };
 
 
-struct st_mysqlnd_protocol
+struct st_mysqlnd_protocol_payload_decoder_factory
 {
        zend_bool persistent;
-       struct st_mysqlnd_protocol_methods m;
+       struct st_mysqlnd_protocol_payload_decoder_factory_methods m;
 };
 
 
@@ -903,7 +903,7 @@ struct st_mysqlnd_connection_data
 {
 /* Operation related */
        MYSQLND_NET             * net;
-       MYSQLND_PROTOCOL * protocol;
+       MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * payload_decoder_factory;
 
 /* Information related */
        char                    *host;
index 2e8daa4a4a5f430d783a6743f4e3370681c8f514..29d55437d718e2e0096ed26d9d82dd8d34d433af 100644 (file)
@@ -2304,7 +2304,7 @@ mysqlnd_packet_methods packet_methods[PROT_LAST] =
 
 /* {{{ mysqlnd_protocol::get_greet_packet */
 static struct st_mysqlnd_packet_greet *
-MYSQLND_METHOD(mysqlnd_protocol, get_greet_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent)
+MYSQLND_METHOD(mysqlnd_protocol, get_greet_packet)(MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * const factory, zend_bool persistent)
 {
        struct st_mysqlnd_packet_greet * packet = mnd_pecalloc(1, packet_methods[PROT_GREET_PACKET].struct_size, persistent);
        DBG_ENTER("mysqlnd_protocol::get_greet_packet");
@@ -2319,7 +2319,7 @@ MYSQLND_METHOD(mysqlnd_protocol, get_greet_packet)(MYSQLND_PROTOCOL * const prot
 
 /* {{{ mysqlnd_protocol::get_auth_packet */
 static struct st_mysqlnd_packet_auth *
-MYSQLND_METHOD(mysqlnd_protocol, get_auth_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent)
+MYSQLND_METHOD(mysqlnd_protocol, get_auth_packet)(MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * const factory, zend_bool persistent)
 {
        struct st_mysqlnd_packet_auth * packet = mnd_pecalloc(1, packet_methods[PROT_AUTH_PACKET].struct_size, persistent);
        DBG_ENTER("mysqlnd_protocol::get_auth_packet");
@@ -2334,7 +2334,7 @@ MYSQLND_METHOD(mysqlnd_protocol, get_auth_packet)(MYSQLND_PROTOCOL * const proto
 
 /* {{{ mysqlnd_protocol::get_auth_response_packet */
 static struct st_mysqlnd_packet_auth_response *
-MYSQLND_METHOD(mysqlnd_protocol, get_auth_response_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent)
+MYSQLND_METHOD(mysqlnd_protocol, get_auth_response_packet)(MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * const factory, zend_bool persistent)
 {
        struct st_mysqlnd_packet_auth_response * packet = mnd_pecalloc(1, packet_methods[PROT_AUTH_RESP_PACKET].struct_size, persistent);
        DBG_ENTER("mysqlnd_protocol::get_auth_response_packet");
@@ -2349,7 +2349,7 @@ MYSQLND_METHOD(mysqlnd_protocol, get_auth_response_packet)(MYSQLND_PROTOCOL * co
 
 /* {{{ mysqlnd_protocol::get_change_auth_response_packet */
 static struct st_mysqlnd_packet_change_auth_response *
-MYSQLND_METHOD(mysqlnd_protocol, get_change_auth_response_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent)
+MYSQLND_METHOD(mysqlnd_protocol, get_change_auth_response_packet)(MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * const factory, zend_bool persistent)
 {
        struct st_mysqlnd_packet_change_auth_response * packet = mnd_pecalloc(1, packet_methods[PROT_CHANGE_AUTH_RESP_PACKET].struct_size, persistent);
        DBG_ENTER("mysqlnd_protocol::get_change_auth_response_packet");
@@ -2364,7 +2364,7 @@ MYSQLND_METHOD(mysqlnd_protocol, get_change_auth_response_packet)(MYSQLND_PROTOC
 
 /* {{{ mysqlnd_protocol::get_ok_packet */
 static struct st_mysqlnd_packet_ok *
-MYSQLND_METHOD(mysqlnd_protocol, get_ok_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent)
+MYSQLND_METHOD(mysqlnd_protocol, get_ok_packet)(MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * const factory, zend_bool persistent)
 {
        struct st_mysqlnd_packet_ok * packet = mnd_pecalloc(1, packet_methods[PROT_OK_PACKET].struct_size, persistent);
        DBG_ENTER("mysqlnd_protocol::get_ok_packet");
@@ -2379,7 +2379,7 @@ MYSQLND_METHOD(mysqlnd_protocol, get_ok_packet)(MYSQLND_PROTOCOL * const protoco
 
 /* {{{ mysqlnd_protocol::get_eof_packet */
 static struct st_mysqlnd_packet_eof *
-MYSQLND_METHOD(mysqlnd_protocol, get_eof_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent)
+MYSQLND_METHOD(mysqlnd_protocol, get_eof_packet)(MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * const factory, zend_bool persistent)
 {
        struct st_mysqlnd_packet_eof * packet = mnd_pecalloc(1, packet_methods[PROT_EOF_PACKET].struct_size, persistent);
        DBG_ENTER("mysqlnd_protocol::get_eof_packet");
@@ -2394,7 +2394,7 @@ MYSQLND_METHOD(mysqlnd_protocol, get_eof_packet)(MYSQLND_PROTOCOL * const protoc
 
 /* {{{ mysqlnd_protocol::get_command_packet */
 static struct st_mysqlnd_packet_command *
-MYSQLND_METHOD(mysqlnd_protocol, get_command_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent)
+MYSQLND_METHOD(mysqlnd_protocol, get_command_packet)(MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * const factory, zend_bool persistent)
 {
        struct st_mysqlnd_packet_command * packet = mnd_pecalloc(1, packet_methods[PROT_CMD_PACKET].struct_size, persistent);
        DBG_ENTER("mysqlnd_protocol::get_command_packet");
@@ -2409,7 +2409,7 @@ MYSQLND_METHOD(mysqlnd_protocol, get_command_packet)(MYSQLND_PROTOCOL * const pr
 
 /* {{{ mysqlnd_protocol::get_rset_packet */
 static struct st_mysqlnd_packet_rset_header *
-MYSQLND_METHOD(mysqlnd_protocol, get_rset_header_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent)
+MYSQLND_METHOD(mysqlnd_protocol, get_rset_header_packet)(MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * const factory, zend_bool persistent)
 {
        struct st_mysqlnd_packet_rset_header * packet = mnd_pecalloc(1, packet_methods[PROT_RSET_HEADER_PACKET].struct_size, persistent);
        DBG_ENTER("mysqlnd_protocol::get_rset_header_packet");
@@ -2424,7 +2424,7 @@ MYSQLND_METHOD(mysqlnd_protocol, get_rset_header_packet)(MYSQLND_PROTOCOL * cons
 
 /* {{{ mysqlnd_protocol::get_result_field_packet */
 static struct st_mysqlnd_packet_res_field *
-MYSQLND_METHOD(mysqlnd_protocol, get_result_field_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent)
+MYSQLND_METHOD(mysqlnd_protocol, get_result_field_packet)(MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * const factory, zend_bool persistent)
 {
        struct st_mysqlnd_packet_res_field * packet = mnd_pecalloc(1, packet_methods[PROT_RSET_FLD_PACKET].struct_size, persistent);
        DBG_ENTER("mysqlnd_protocol::get_result_field_packet");
@@ -2439,7 +2439,7 @@ MYSQLND_METHOD(mysqlnd_protocol, get_result_field_packet)(MYSQLND_PROTOCOL * con
 
 /* {{{ mysqlnd_protocol::get_row_packet */
 static struct st_mysqlnd_packet_row *
-MYSQLND_METHOD(mysqlnd_protocol, get_row_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent)
+MYSQLND_METHOD(mysqlnd_protocol, get_row_packet)(MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * const factory, zend_bool persistent)
 {
        struct st_mysqlnd_packet_row * packet = mnd_pecalloc(1, packet_methods[PROT_ROW_PACKET].struct_size, persistent);
        DBG_ENTER("mysqlnd_protocol::get_row_packet");
@@ -2454,7 +2454,7 @@ MYSQLND_METHOD(mysqlnd_protocol, get_row_packet)(MYSQLND_PROTOCOL * const protoc
 
 /* {{{ mysqlnd_protocol::get_stats_packet */
 static struct st_mysqlnd_packet_stats *
-MYSQLND_METHOD(mysqlnd_protocol, get_stats_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent)
+MYSQLND_METHOD(mysqlnd_protocol, get_stats_packet)(MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * const factory, zend_bool persistent)
 {
        struct st_mysqlnd_packet_stats * packet = mnd_pecalloc(1, packet_methods[PROT_STATS_PACKET].struct_size, persistent);
        DBG_ENTER("mysqlnd_protocol::get_stats_packet");
@@ -2469,7 +2469,7 @@ MYSQLND_METHOD(mysqlnd_protocol, get_stats_packet)(MYSQLND_PROTOCOL * const prot
 
 /* {{{ mysqlnd_protocol::get_prepare_response_packet */
 static struct st_mysqlnd_packet_prepare_response *
-MYSQLND_METHOD(mysqlnd_protocol, get_prepare_response_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent)
+MYSQLND_METHOD(mysqlnd_protocol, get_prepare_response_packet)(MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * const factory, zend_bool persistent)
 {
        struct st_mysqlnd_packet_prepare_response * packet = mnd_pecalloc(1, packet_methods[PROT_PREPARE_RESP_PACKET].struct_size, persistent);
        DBG_ENTER("mysqlnd_protocol::get_prepare_response_packet");
@@ -2484,7 +2484,7 @@ MYSQLND_METHOD(mysqlnd_protocol, get_prepare_response_packet)(MYSQLND_PROTOCOL *
 
 /* {{{ mysqlnd_protocol::get_change_user_response_packet */
 static struct st_mysqlnd_packet_chg_user_resp*
-MYSQLND_METHOD(mysqlnd_protocol, get_change_user_response_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent)
+MYSQLND_METHOD(mysqlnd_protocol, get_change_user_response_packet)(MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * const factory, zend_bool persistent)
 {
        struct st_mysqlnd_packet_chg_user_resp * packet = mnd_pecalloc(1, packet_methods[PROT_CHG_USER_RESP_PACKET].struct_size, persistent);
        DBG_ENTER("mysqlnd_protocol::get_change_user_response_packet");
@@ -2499,7 +2499,7 @@ MYSQLND_METHOD(mysqlnd_protocol, get_change_user_response_packet)(MYSQLND_PROTOC
 
 /* {{{ mysqlnd_protocol::get_sha256_pk_request_packet */
 static struct st_mysqlnd_packet_sha256_pk_request *
-MYSQLND_METHOD(mysqlnd_protocol, get_sha256_pk_request_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent)
+MYSQLND_METHOD(mysqlnd_protocol, get_sha256_pk_request_packet)(MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * const factory, zend_bool persistent)
 {
        struct st_mysqlnd_packet_sha256_pk_request * packet = mnd_pecalloc(1, packet_methods[PROT_SHA256_PK_REQUEST_PACKET].struct_size, persistent);
        DBG_ENTER("mysqlnd_protocol::get_sha256_pk_request_packet");
@@ -2514,7 +2514,7 @@ MYSQLND_METHOD(mysqlnd_protocol, get_sha256_pk_request_packet)(MYSQLND_PROTOCOL
 
 /* {{{ mysqlnd_protocol::get_sha256_pk_request_response_packet */
 static struct st_mysqlnd_packet_sha256_pk_request_response *
-MYSQLND_METHOD(mysqlnd_protocol, get_sha256_pk_request_response_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent)
+MYSQLND_METHOD(mysqlnd_protocol, get_sha256_pk_request_response_packet)(MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * const factory, zend_bool persistent)
 {
        struct st_mysqlnd_packet_sha256_pk_request_response * packet = mnd_pecalloc(1, packet_methods[PROT_SHA256_PK_REQUEST_RESPONSE_PACKET].struct_size, persistent);
        DBG_ENTER("mysqlnd_protocol::get_sha256_pk_request_response_packet");
@@ -2528,7 +2528,7 @@ MYSQLND_METHOD(mysqlnd_protocol, get_sha256_pk_request_response_packet)(MYSQLND_
 
 
 
-MYSQLND_CLASS_METHODS_START(mysqlnd_protocol)
+MYSQLND_CLASS_METHODS_START(mysqlnd_protocol_payload_decoder_factory)
        MYSQLND_METHOD(mysqlnd_protocol, get_greet_packet),
        MYSQLND_METHOD(mysqlnd_protocol, get_auth_packet),
        MYSQLND_METHOD(mysqlnd_protocol, get_auth_response_packet),
@@ -2547,27 +2547,27 @@ MYSQLND_CLASS_METHODS_START(mysqlnd_protocol)
 MYSQLND_CLASS_METHODS_END;
 
 
-/* {{{ mysqlnd_protocol_init */
-PHPAPI MYSQLND_PROTOCOL *
-mysqlnd_protocol_init(zend_bool persistent)
+/* {{{ mysqlnd_protocol_payload_decoder_factory_init */
+PHPAPI MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY *
+mysqlnd_protocol_payload_decoder_factory_init(zend_bool persistent)
 {
-       MYSQLND_PROTOCOL * ret;
-       DBG_ENTER("mysqlnd_protocol_init");
-       ret = MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_object_factory).get_protocol_decoder(persistent);
+       MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * ret;
+       DBG_ENTER("mysqlnd_protocol_payload_decoder_factory_init");
+       ret = MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_object_factory).get_protocol_payload_decoder_factory(persistent);
        DBG_RETURN(ret);
 }
 /* }}} */
 
 
-/* {{{ mysqlnd_protocol_free */
+/* {{{ mysqlnd_protocol_payload_decoder_factory_free */
 PHPAPI void
-mysqlnd_protocol_free(MYSQLND_PROTOCOL * const protocol)
+mysqlnd_protocol_payload_decoder_factory_free(MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * const factory)
 {
-       DBG_ENTER("mysqlnd_protocol_free");
+       DBG_ENTER("mysqlnd_protocol_payload_decoder_factory_free");
 
-       if (protocol) {
-               zend_bool pers = protocol->persistent;
-               mnd_pefree(protocol, pers);
+       if (factory) {
+               zend_bool pers = factory->persistent;
+               mnd_pefree(factory, pers);
        }
        DBG_VOID_RETURN;
 }
index 26b90c67505e757a991b069c9431335ddcbf029a..f3ed895faa2a1779d3c16634b72262659d53c939 100644 (file)
@@ -320,8 +320,8 @@ enum_func_status php_mysqlnd_rowp_read_text_protocol_c(MYSQLND_MEMORY_POOL_CHUNK
                                                                                 zend_bool as_int_or_float, MYSQLND_STATS * stats);
 
 
-PHPAPI MYSQLND_PROTOCOL * mysqlnd_protocol_init(zend_bool persistent);
-PHPAPI void mysqlnd_protocol_free(MYSQLND_PROTOCOL * const protocol);
+PHPAPI MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * mysqlnd_protocol_payload_decoder_factory_init(zend_bool persistent);
+PHPAPI void mysqlnd_protocol_payload_decoder_factory_free(MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * const payload_decoder_factory);
 
 #endif /* MYSQLND_WIREPROTOCOL_H */