diff options
| author | Andrey Hristov <andrey@php.net> | 2015-11-16 15:37:11 +0100 |
|---|---|---|
| committer | Andrey Hristov <andrey@php.net> | 2015-11-16 15:37:11 +0100 |
| commit | 4fed8a28d0778459a4adfb774d7d73334b19a1c1 (patch) | |
| tree | ef581055ec618bab6f15dd4cd5b6a28719291530 /ext/mysqlnd/mysqlnd_vio.c | |
| parent | 24cb185cb3f7f8326c646c0df5bfb88d241ae121 (diff) | |
| download | php-git-4fed8a28d0778459a4adfb774d7d73334b19a1c1.tar.gz | |
mysqlnd refactoring :
- move the command buffer out of the networking code to the protocol frame
codec.
Diffstat (limited to 'ext/mysqlnd/mysqlnd_vio.c')
| -rw-r--r-- | ext/mysqlnd/mysqlnd_vio.c | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/ext/mysqlnd/mysqlnd_vio.c b/ext/mysqlnd/mysqlnd_vio.c index 1fb8dcd178..1d9b00c337 100644 --- a/ext/mysqlnd/mysqlnd_vio.c +++ b/ext/mysqlnd/mysqlnd_vio.c @@ -337,19 +337,6 @@ MYSQLND_METHOD(mysqlnd_vio, set_client_option)(MYSQLND_VIO * const net, enum_mys DBG_ENTER("mysqlnd_vio::set_client_option"); DBG_INF_FMT("option=%u", option); switch (option) { - case MYSQLND_OPT_NET_CMD_BUFFER_SIZE: - DBG_INF("MYSQLND_OPT_NET_CMD_BUFFER_SIZE"); - if (*(unsigned int*) value < MYSQLND_NET_CMD_BUFFER_MIN_SIZE) { - DBG_RETURN(FAIL); - } - net->cmd_buffer.length = *(unsigned int*) value; - DBG_INF_FMT("new_length="MYSQLND_SZ_T_SPEC, net->cmd_buffer.length); - if (!net->cmd_buffer.buffer) { - net->cmd_buffer.buffer = mnd_pemalloc(net->cmd_buffer.length, net->persistent); - } else { - net->cmd_buffer.buffer = mnd_perealloc(net->cmd_buffer.buffer, net->cmd_buffer.length, net->persistent); - } - break; case MYSQLND_OPT_NET_READ_BUFFER_SIZE: DBG_INF("MYSQLND_OPT_NET_READ_BUFFER_SIZE"); net->data->options.net_read_buffer_size = *(unsigned int*) value; @@ -704,9 +691,6 @@ MYSQLND_METHOD(mysqlnd_vio, init)(MYSQLND_VIO * const net, MYSQLND_STATS * const unsigned int buf_size; DBG_ENTER("mysqlnd_vio::init"); - buf_size = MYSQLND_G(net_cmd_buffer_size); /* this is long, cast to unsigned int*/ - net->data->m.set_client_option(net, MYSQLND_OPT_NET_CMD_BUFFER_SIZE, (char *) &buf_size); - buf_size = MYSQLND_G(net_read_buffer_size); /* this is long, cast to unsigned int*/ net->data->m.set_client_option(net, MYSQLND_OPT_NET_READ_BUFFER_SIZE, (char *)&buf_size); @@ -727,12 +711,6 @@ MYSQLND_METHOD(mysqlnd_vio, dtor)(MYSQLND_VIO * const vio, MYSQLND_STATS * const vio->data->m.free_contents(vio); vio->data->m.close_stream(vio, stats, error_info); - if (vio->cmd_buffer.buffer) { - DBG_INF("Freeing cmd buffer"); - mnd_pefree(vio->cmd_buffer.buffer, vio->persistent); - vio->cmd_buffer.buffer = NULL; - } - mnd_pefree(vio->data, vio->data->persistent); mnd_pefree(vio, vio->persistent); } |
