2011-10-21 15:29:43 +00:00
|
|
|
/*
|
|
|
|
+----------------------------------------------------------------------+
|
2019-02-03 21:47:49 +00:00
|
|
|
| Copyright (c) The PHP Group |
|
2011-10-21 15:29:43 +00:00
|
|
|
+----------------------------------------------------------------------+
|
|
|
|
| This source file is subject to version 3.01 of the PHP license, |
|
|
|
|
| that is bundled with this package in the file LICENSE, and is |
|
|
|
|
| available through the world-wide-web at the following url: |
|
2021-05-06 10:16:35 +00:00
|
|
|
| https://www.php.net/license/3_01.txt |
|
2011-10-21 15:29:43 +00:00
|
|
|
| If you did not receive a copy of the PHP license and are unable to |
|
|
|
|
| obtain it through the world-wide-web, please send a note to |
|
|
|
|
| license@php.net so we can mail you a copy immediately. |
|
|
|
|
+----------------------------------------------------------------------+
|
2016-03-16 09:24:52 +00:00
|
|
|
| Authors: Andrey Hristov <andrey@php.net> |
|
2017-10-14 20:18:25 +00:00
|
|
|
| Johannes Schlüter <johannes@php.net> |
|
2016-03-16 09:24:52 +00:00
|
|
|
| Ulf Wendel <uw@php.net> |
|
2011-10-21 15:29:43 +00:00
|
|
|
+----------------------------------------------------------------------+
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "php.h"
|
|
|
|
#include "mysqlnd.h"
|
|
|
|
#include "mysqlnd_priv.h"
|
|
|
|
#include "mysqlnd_result.h"
|
|
|
|
#include "mysqlnd_debug.h"
|
2015-11-10 12:14:39 +00:00
|
|
|
#include "mysqlnd_commands.h"
|
2015-10-12 18:11:10 +00:00
|
|
|
#include "mysqlnd_ext_plugin.h"
|
2011-10-21 15:29:43 +00:00
|
|
|
|
|
|
|
static struct st_mysqlnd_conn_methods * mysqlnd_conn_methods;
|
2011-10-31 14:33:56 +00:00
|
|
|
static struct st_mysqlnd_conn_data_methods * mysqlnd_conn_data_methods;
|
2011-10-21 15:29:43 +00:00
|
|
|
static struct st_mysqlnd_stmt_methods * mysqlnd_stmt_methods;
|
|
|
|
|
2015-10-12 18:11:10 +00:00
|
|
|
/* {{{ mysqlnd_plugin__get_plugin_connection_data */
|
|
|
|
static void **
|
2015-11-17 13:49:18 +00:00
|
|
|
mysqlnd_plugin__get_plugin_connection_data(const MYSQLND * conn, const unsigned int plugin_id)
|
2011-10-21 15:29:43 +00:00
|
|
|
{
|
2015-10-12 18:11:10 +00:00
|
|
|
DBG_ENTER("mysqlnd_plugin__get_plugin_connection_data");
|
2011-10-21 15:29:43 +00:00
|
|
|
DBG_INF_FMT("plugin_id=%u", plugin_id);
|
|
|
|
if (!conn || plugin_id >= mysqlnd_plugin_count()) {
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
DBG_RETURN((void *)((char *)conn + sizeof(MYSQLND) + plugin_id * sizeof(void *)));
|
|
|
|
}
|
|
|
|
/* }}} */
|
|
|
|
|
|
|
|
|
2015-10-12 18:11:10 +00:00
|
|
|
/* {{{ mysqlnd_plugin__get_plugin_connection_data_data */
|
|
|
|
static void **
|
2015-11-17 13:49:18 +00:00
|
|
|
mysqlnd_plugin__get_plugin_connection_data_data(const MYSQLND_CONN_DATA * conn, const unsigned int plugin_id)
|
2011-10-31 11:46:24 +00:00
|
|
|
{
|
2015-10-12 18:11:10 +00:00
|
|
|
DBG_ENTER("mysqlnd_plugin__get_plugin_connection_data_data");
|
2011-10-31 11:46:24 +00:00
|
|
|
DBG_INF_FMT("plugin_id=%u", plugin_id);
|
|
|
|
if (!conn || plugin_id >= mysqlnd_plugin_count()) {
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
DBG_RETURN((void *)((char *)conn + sizeof(MYSQLND_CONN_DATA) + plugin_id * sizeof(void *)));
|
|
|
|
}
|
|
|
|
/* }}} */
|
|
|
|
|
|
|
|
|
2015-10-12 18:11:10 +00:00
|
|
|
/* {{{ mysqlnd_plugin__get_plugin_result_data */
|
|
|
|
static void **
|
2015-11-17 13:49:18 +00:00
|
|
|
mysqlnd_plugin__get_plugin_result_data(const MYSQLND_RES * result, const unsigned int plugin_id)
|
2011-10-21 15:29:43 +00:00
|
|
|
{
|
2015-10-12 18:11:10 +00:00
|
|
|
DBG_ENTER("mysqlnd_plugin__get_plugin_result_data");
|
2011-10-21 15:29:43 +00:00
|
|
|
DBG_INF_FMT("plugin_id=%u", plugin_id);
|
|
|
|
if (!result || plugin_id >= mysqlnd_plugin_count()) {
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
DBG_RETURN((void *)((char *)result + sizeof(MYSQLND_RES) + plugin_id * sizeof(void *)));
|
|
|
|
}
|
|
|
|
/* }}} */
|
|
|
|
|
|
|
|
|
2015-10-12 18:11:10 +00:00
|
|
|
/* {{{ _mysqlnd_plugin__get_plugin_result_unbuffered_data */
|
|
|
|
static void **
|
2015-11-17 13:49:18 +00:00
|
|
|
mysqlnd_plugin__get_plugin_result_unbuffered_data(const MYSQLND_RES_UNBUFFERED * result, const unsigned int plugin_id)
|
2014-03-05 14:22:23 +00:00
|
|
|
{
|
2015-10-12 18:11:10 +00:00
|
|
|
DBG_ENTER("mysqlnd_plugin__get_plugin_result_data");
|
2014-03-05 14:22:23 +00:00
|
|
|
DBG_INF_FMT("plugin_id=%u", plugin_id);
|
|
|
|
if (!result || plugin_id >= mysqlnd_plugin_count()) {
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
DBG_RETURN((void *)((char *)result + sizeof(MYSQLND_RES_UNBUFFERED) + plugin_id * sizeof(void *)));
|
|
|
|
}
|
|
|
|
/* }}} */
|
|
|
|
|
2015-10-12 18:11:10 +00:00
|
|
|
/* {{{ mysqlnd_plugin__get_plugin_result_buffered_data */
|
|
|
|
static void **
|
MySQLnd: Clean up and optimize mysqlnd result set handling
This is a larger overhaul of the mysqlnd result set infrastructure:
* Drop support for two different types of buffered results sets
("c" and "zval"). Possibly these made sense at some earlier
time, but now (with minor adjustments) one option is strictly
worse than the other. Buffered result sets already buffer the
full row packets, from which zvals can be decoded. The "zval"
style additionally also buffered the decoded zvals. As result
sets, even buffered ones, are generally only traversed once,
this just ends up wasting memory. Now, a potentially useful
variation here would be to buffer the decoded zvals instead of
the row packets, but that's not what the code was doing.
* To make it really strictly better, pre-allocate the zval row
buffer and reuse it for all rows. Previously the "c" style always
allocated a new buffer for each row.
* The fetch_row API now provides a populated zval[]. The task of
populating an array is deferred to fetch_row_into, which also
avoids duplicating this code in multiple places. The fetch_row_c
API is also implemented on top of fetch_row now, rather than
duplicating large parts of the code.
* The row fetching code for prepared statements and normal result
sets has been mostly merged. These already used the same
infrastructure, but prepared statements used separate row
fetching functions that were nearly the same as the normal ones.
This requires passing the stmt into the result set, rather than
just a flag. The only part that remains separate is reading of
unbuffered results in the presence of PS cursors.
2020-12-14 14:05:23 +00:00
|
|
|
mysqlnd_plugin__get_plugin_result_buffered_data(const MYSQLND_RES_BUFFERED * result, const unsigned int plugin_id)
|
2014-04-10 13:44:54 +00:00
|
|
|
{
|
2015-10-12 18:11:10 +00:00
|
|
|
DBG_ENTER("mysqlnd_plugin__get_plugin_result_data");
|
2014-04-10 13:44:54 +00:00
|
|
|
DBG_INF_FMT("plugin_id=%u", plugin_id);
|
|
|
|
if (!result || plugin_id >= mysqlnd_plugin_count()) {
|
|
|
|
return NULL;
|
|
|
|
}
|
MySQLnd: Clean up and optimize mysqlnd result set handling
This is a larger overhaul of the mysqlnd result set infrastructure:
* Drop support for two different types of buffered results sets
("c" and "zval"). Possibly these made sense at some earlier
time, but now (with minor adjustments) one option is strictly
worse than the other. Buffered result sets already buffer the
full row packets, from which zvals can be decoded. The "zval"
style additionally also buffered the decoded zvals. As result
sets, even buffered ones, are generally only traversed once,
this just ends up wasting memory. Now, a potentially useful
variation here would be to buffer the decoded zvals instead of
the row packets, but that's not what the code was doing.
* To make it really strictly better, pre-allocate the zval row
buffer and reuse it for all rows. Previously the "c" style always
allocated a new buffer for each row.
* The fetch_row API now provides a populated zval[]. The task of
populating an array is deferred to fetch_row_into, which also
avoids duplicating this code in multiple places. The fetch_row_c
API is also implemented on top of fetch_row now, rather than
duplicating large parts of the code.
* The row fetching code for prepared statements and normal result
sets has been mostly merged. These already used the same
infrastructure, but prepared statements used separate row
fetching functions that were nearly the same as the normal ones.
This requires passing the stmt into the result set, rather than
just a flag. The only part that remains separate is reading of
unbuffered results in the presence of PS cursors.
2020-12-14 14:05:23 +00:00
|
|
|
DBG_RETURN((void *)((char *)result + sizeof(MYSQLND_RES_BUFFERED) + plugin_id * sizeof(void *)));
|
2014-03-05 14:22:23 +00:00
|
|
|
}
|
|
|
|
/* }}} */
|
|
|
|
|
|
|
|
|
2015-10-12 18:11:10 +00:00
|
|
|
/* {{{ mysqlnd_plugin__get_plugin_protocol_data */
|
|
|
|
static void **
|
2015-11-17 13:49:18 +00:00
|
|
|
mysqlnd_plugin__get_plugin_protocol_data(const MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * factory, const unsigned int plugin_id)
|
2011-10-21 15:29:43 +00:00
|
|
|
{
|
2015-10-12 18:11:10 +00:00
|
|
|
DBG_ENTER("mysqlnd_plugin__get_plugin_protocol_data");
|
2011-10-21 15:29:43 +00:00
|
|
|
DBG_INF_FMT("plugin_id=%u", plugin_id);
|
2015-10-02 13:30:53 +00:00
|
|
|
if (!factory || plugin_id >= mysqlnd_plugin_count()) {
|
2011-10-21 15:29:43 +00:00
|
|
|
return NULL;
|
|
|
|
}
|
2015-10-02 13:30:53 +00:00
|
|
|
DBG_RETURN((void *)((char *)factory + sizeof(MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY) + plugin_id * sizeof(void *)));
|
2011-10-21 15:29:43 +00:00
|
|
|
}
|
|
|
|
/* }}} */
|
|
|
|
|
|
|
|
|
2015-10-12 18:11:10 +00:00
|
|
|
/* {{{ mysqlnd_plugin__get_plugin_stmt_data */
|
|
|
|
static void **
|
2015-11-17 13:49:18 +00:00
|
|
|
mysqlnd_plugin__get_plugin_stmt_data(const MYSQLND_STMT * stmt, const unsigned int plugin_id)
|
2011-10-21 15:29:43 +00:00
|
|
|
{
|
2015-10-12 18:11:10 +00:00
|
|
|
DBG_ENTER("mysqlnd_plugin__get_plugin_stmt_data");
|
2011-10-21 15:29:43 +00:00
|
|
|
DBG_INF_FMT("plugin_id=%u", plugin_id);
|
|
|
|
if (!stmt || plugin_id >= mysqlnd_plugin_count()) {
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
DBG_RETURN((void *)((char *)stmt + sizeof(MYSQLND_STMT) + plugin_id * sizeof(void *)));
|
|
|
|
}
|
|
|
|
/* }}} */
|
|
|
|
|
|
|
|
|
2015-11-17 13:40:03 +00:00
|
|
|
/* {{{ mysqlnd_plugin__get_plugin_pfc_data */
|
2015-10-12 18:11:10 +00:00
|
|
|
static void **
|
2015-11-17 13:49:18 +00:00
|
|
|
mysqlnd_plugin__get_plugin_pfc_data(const MYSQLND_PFC * pfc, const unsigned int plugin_id)
|
2011-10-21 15:29:43 +00:00
|
|
|
{
|
2015-11-17 13:40:03 +00:00
|
|
|
DBG_ENTER("mysqlnd_plugin__get_plugin_pfc_data");
|
2011-10-21 15:29:43 +00:00
|
|
|
DBG_INF_FMT("plugin_id=%u", plugin_id);
|
2015-11-17 13:40:03 +00:00
|
|
|
if (!pfc || plugin_id >= mysqlnd_plugin_count()) {
|
2011-10-21 15:29:43 +00:00
|
|
|
return NULL;
|
|
|
|
}
|
2015-11-17 13:40:03 +00:00
|
|
|
DBG_RETURN((void *)((char *)pfc + sizeof(MYSQLND_PFC) + plugin_id * sizeof(void *)));
|
2015-11-10 10:02:33 +00:00
|
|
|
}
|
|
|
|
/* }}} */
|
|
|
|
|
|
|
|
|
|
|
|
/* {{{ _mysqlnd_plugin__get_plugin_vio_data */
|
|
|
|
static void **
|
2015-11-17 13:49:18 +00:00
|
|
|
mysqlnd_plugin__get_plugin_vio_data(const MYSQLND_VIO * vio, const unsigned int plugin_id)
|
2015-11-10 10:02:33 +00:00
|
|
|
{
|
|
|
|
DBG_ENTER("_mysqlnd_plugin__get_plugin_vio_data");
|
|
|
|
DBG_INF_FMT("plugin_id=%u", plugin_id);
|
|
|
|
if (!vio || plugin_id >= mysqlnd_plugin_count()) {
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
DBG_RETURN((void *)((char *)vio + sizeof(MYSQLND_VIO) + plugin_id * sizeof(void *)));
|
2011-10-21 15:29:43 +00:00
|
|
|
}
|
|
|
|
/* }}} */
|
|
|
|
|
2015-10-12 18:11:10 +00:00
|
|
|
struct st_mysqlnd_plugin__plugin_area_getters mysqlnd_plugin_area_getters =
|
|
|
|
{
|
|
|
|
mysqlnd_plugin__get_plugin_connection_data,
|
|
|
|
mysqlnd_plugin__get_plugin_connection_data_data,
|
|
|
|
mysqlnd_plugin__get_plugin_result_data,
|
|
|
|
mysqlnd_plugin__get_plugin_result_unbuffered_data,
|
MySQLnd: Clean up and optimize mysqlnd result set handling
This is a larger overhaul of the mysqlnd result set infrastructure:
* Drop support for two different types of buffered results sets
("c" and "zval"). Possibly these made sense at some earlier
time, but now (with minor adjustments) one option is strictly
worse than the other. Buffered result sets already buffer the
full row packets, from which zvals can be decoded. The "zval"
style additionally also buffered the decoded zvals. As result
sets, even buffered ones, are generally only traversed once,
this just ends up wasting memory. Now, a potentially useful
variation here would be to buffer the decoded zvals instead of
the row packets, but that's not what the code was doing.
* To make it really strictly better, pre-allocate the zval row
buffer and reuse it for all rows. Previously the "c" style always
allocated a new buffer for each row.
* The fetch_row API now provides a populated zval[]. The task of
populating an array is deferred to fetch_row_into, which also
avoids duplicating this code in multiple places. The fetch_row_c
API is also implemented on top of fetch_row now, rather than
duplicating large parts of the code.
* The row fetching code for prepared statements and normal result
sets has been mostly merged. These already used the same
infrastructure, but prepared statements used separate row
fetching functions that were nearly the same as the normal ones.
This requires passing the stmt into the result set, rather than
just a flag. The only part that remains separate is reading of
unbuffered results in the presence of PS cursors.
2020-12-14 14:05:23 +00:00
|
|
|
mysqlnd_plugin__get_plugin_result_buffered_data,
|
2015-10-12 18:11:10 +00:00
|
|
|
mysqlnd_plugin__get_plugin_stmt_data,
|
|
|
|
mysqlnd_plugin__get_plugin_protocol_data,
|
2015-11-17 13:40:03 +00:00
|
|
|
mysqlnd_plugin__get_plugin_pfc_data,
|
2015-11-10 10:02:33 +00:00
|
|
|
mysqlnd_plugin__get_plugin_vio_data,
|
2015-10-12 18:11:10 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* {{{ _mysqlnd_object_factory_get_methods */
|
2015-10-30 12:20:53 +00:00
|
|
|
static MYSQLND_CLASS_METHODS_TYPE(mysqlnd_object_factory) *
|
2021-05-12 13:55:23 +00:00
|
|
|
_mysqlnd_object_factory_get_methods(void)
|
2015-10-12 12:57:48 +00:00
|
|
|
{
|
|
|
|
return &MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_object_factory);
|
|
|
|
}
|
|
|
|
/* }}} */
|
|
|
|
|
|
|
|
/* {{{ mysqlnd_conn_set_methods */
|
2015-10-12 18:11:10 +00:00
|
|
|
static void
|
2015-10-30 12:20:53 +00:00
|
|
|
_mysqlnd_object_factory_set_methods(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_object_factory) *methods)
|
2015-10-12 12:57:48 +00:00
|
|
|
{
|
|
|
|
MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_object_factory) = *methods;
|
|
|
|
}
|
|
|
|
/* }}} */
|
|
|
|
|
2011-10-21 15:29:43 +00:00
|
|
|
|
2015-10-12 18:11:10 +00:00
|
|
|
/* {{{ _mysqlnd_conn_get_methods */
|
2015-10-30 12:20:53 +00:00
|
|
|
static MYSQLND_CLASS_METHODS_TYPE(mysqlnd_conn) *
|
2021-05-12 13:55:23 +00:00
|
|
|
_mysqlnd_conn_get_methods(void)
|
2011-10-21 15:29:43 +00:00
|
|
|
{
|
|
|
|
return mysqlnd_conn_methods;
|
|
|
|
}
|
|
|
|
/* }}} */
|
|
|
|
|
2015-10-12 18:11:10 +00:00
|
|
|
/* {{{ _mysqlnd_conn_set_methods */
|
|
|
|
static void
|
2015-10-30 12:20:53 +00:00
|
|
|
_mysqlnd_conn_set_methods(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_conn) *methods)
|
2011-10-21 15:29:43 +00:00
|
|
|
{
|
|
|
|
mysqlnd_conn_methods = methods;
|
|
|
|
}
|
|
|
|
/* }}} */
|
|
|
|
|
|
|
|
|
2015-10-12 18:11:10 +00:00
|
|
|
/* {{{ _mysqlnd_conn_data_get_methods */
|
2015-10-30 12:20:53 +00:00
|
|
|
static MYSQLND_CLASS_METHODS_TYPE(mysqlnd_conn_data) *
|
2021-05-12 13:55:23 +00:00
|
|
|
_mysqlnd_conn_data_get_methods(void)
|
2011-10-31 14:33:56 +00:00
|
|
|
{
|
|
|
|
return mysqlnd_conn_data_methods;
|
|
|
|
}
|
|
|
|
/* }}} */
|
|
|
|
|
2015-10-12 18:11:10 +00:00
|
|
|
/* {{{ _mysqlnd_conn_data_set_methods */
|
|
|
|
static void
|
2015-10-30 12:20:53 +00:00
|
|
|
_mysqlnd_conn_data_set_methods(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_conn_data) * methods)
|
2011-10-31 14:33:56 +00:00
|
|
|
{
|
|
|
|
mysqlnd_conn_data_methods = methods;
|
|
|
|
}
|
|
|
|
/* }}} */
|
|
|
|
|
|
|
|
|
2015-10-12 18:11:10 +00:00
|
|
|
/* {{{ _mysqlnd_result_get_methods */
|
2015-10-30 12:20:53 +00:00
|
|
|
static MYSQLND_CLASS_METHODS_TYPE(mysqlnd_res) *
|
2021-05-12 13:55:23 +00:00
|
|
|
_mysqlnd_result_get_methods(void)
|
2011-10-21 15:29:43 +00:00
|
|
|
{
|
|
|
|
return &MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_res);
|
|
|
|
}
|
|
|
|
/* }}} */
|
|
|
|
|
|
|
|
|
2015-10-12 18:11:10 +00:00
|
|
|
/* {{{ _mysqlnd_result_set_methods */
|
|
|
|
static void
|
2015-10-30 12:20:53 +00:00
|
|
|
_mysqlnd_result_set_methods(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_res) * methods)
|
2011-10-21 15:29:43 +00:00
|
|
|
{
|
|
|
|
MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_res) = *methods;
|
|
|
|
}
|
|
|
|
/* }}} */
|
|
|
|
|
|
|
|
|
2015-10-12 18:11:10 +00:00
|
|
|
/* {{{ _mysqlnd_result_unbuffered_get_methods */
|
2015-10-30 12:20:53 +00:00
|
|
|
static MYSQLND_CLASS_METHODS_TYPE(mysqlnd_result_unbuffered) *
|
2021-05-12 13:55:23 +00:00
|
|
|
_mysqlnd_result_unbuffered_get_methods(void)
|
2014-03-05 14:22:23 +00:00
|
|
|
{
|
|
|
|
return &MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_result_unbuffered);
|
|
|
|
}
|
|
|
|
/* }}} */
|
|
|
|
|
|
|
|
|
2015-10-12 18:11:10 +00:00
|
|
|
/* {{{ _mysqlnd_result_unbuffered_set_methods */
|
|
|
|
static void
|
2015-10-30 12:20:53 +00:00
|
|
|
_mysqlnd_result_unbuffered_set_methods(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_result_unbuffered) * methods)
|
2014-03-05 14:22:23 +00:00
|
|
|
{
|
|
|
|
MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_result_unbuffered) = *methods;
|
|
|
|
}
|
|
|
|
/* }}} */
|
|
|
|
|
|
|
|
|
2015-10-12 18:11:10 +00:00
|
|
|
/* {{{ _mysqlnd_result_buffered_get_methods */
|
2015-10-30 12:20:53 +00:00
|
|
|
static MYSQLND_CLASS_METHODS_TYPE(mysqlnd_result_buffered) *
|
2021-05-12 13:55:23 +00:00
|
|
|
_mysqlnd_result_buffered_get_methods(void)
|
2014-03-05 14:22:23 +00:00
|
|
|
{
|
|
|
|
return &MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_result_buffered);
|
|
|
|
}
|
|
|
|
/* }}} */
|
|
|
|
|
|
|
|
|
2015-10-12 18:11:10 +00:00
|
|
|
/* {{{ _mysqlnd_result_buffered_set_methods */
|
|
|
|
static void
|
2015-10-30 12:20:53 +00:00
|
|
|
_mysqlnd_result_buffered_set_methods(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_result_buffered) * methods)
|
2014-03-05 14:22:23 +00:00
|
|
|
{
|
|
|
|
MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_result_buffered) = *methods;
|
|
|
|
}
|
|
|
|
/* }}} */
|
|
|
|
|
|
|
|
|
2015-10-12 18:11:10 +00:00
|
|
|
/* {{{ _mysqlnd_stmt_get_methods */
|
2015-10-30 12:20:53 +00:00
|
|
|
static MYSQLND_CLASS_METHODS_TYPE(mysqlnd_stmt) *
|
2021-05-12 13:55:23 +00:00
|
|
|
_mysqlnd_stmt_get_methods(void)
|
2011-10-21 15:29:43 +00:00
|
|
|
{
|
|
|
|
return mysqlnd_stmt_methods;
|
|
|
|
}
|
|
|
|
/* }}} */
|
|
|
|
|
|
|
|
|
2015-10-12 18:11:10 +00:00
|
|
|
/* {{{ _mysqlnd_stmt_set_methods */
|
|
|
|
static void
|
2015-10-30 12:20:53 +00:00
|
|
|
_mysqlnd_stmt_set_methods(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_stmt) *methods)
|
2011-10-21 15:29:43 +00:00
|
|
|
{
|
|
|
|
mysqlnd_stmt_methods = methods;
|
|
|
|
}
|
|
|
|
/* }}} */
|
|
|
|
|
|
|
|
|
2015-10-12 18:11:10 +00:00
|
|
|
/* {{{ _mysqlnd_protocol_payload_decoder_factory_get_methods */
|
2015-10-30 12:20:53 +00:00
|
|
|
static MYSQLND_CLASS_METHODS_TYPE(mysqlnd_protocol_payload_decoder_factory) *
|
2021-05-12 13:55:23 +00:00
|
|
|
_mysqlnd_protocol_payload_decoder_factory_get_methods(void)
|
2011-10-21 15:29:43 +00:00
|
|
|
{
|
2015-10-02 13:30:53 +00:00
|
|
|
return &MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_protocol_payload_decoder_factory);
|
2011-10-21 15:29:43 +00:00
|
|
|
}
|
|
|
|
/* }}} */
|
|
|
|
|
|
|
|
|
2015-10-12 18:11:10 +00:00
|
|
|
/* {{{ _mysqlnd_protocol_payload_decoder_factory_set_methods */
|
|
|
|
static void
|
2015-10-30 12:20:53 +00:00
|
|
|
_mysqlnd_protocol_payload_decoder_factory_set_methods(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_protocol_payload_decoder_factory) * methods)
|
2011-10-21 15:29:43 +00:00
|
|
|
{
|
2015-10-02 13:30:53 +00:00
|
|
|
MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_protocol_payload_decoder_factory) = *methods;
|
2011-10-21 15:29:43 +00:00
|
|
|
}
|
|
|
|
/* }}} */
|
|
|
|
|
|
|
|
|
2015-11-10 10:53:19 +00:00
|
|
|
/* {{{ _mysqlnd_pfc_get_methods */
|
2015-11-17 12:28:47 +00:00
|
|
|
static MYSQLND_CLASS_METHODS_TYPE(mysqlnd_protocol_packet_frame_codec) *
|
2021-05-12 13:55:23 +00:00
|
|
|
_mysqlnd_pfc_get_methods(void)
|
2011-10-21 15:29:43 +00:00
|
|
|
{
|
2015-11-17 12:28:47 +00:00
|
|
|
return &MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_protocol_packet_frame_codec);
|
2011-10-21 15:29:43 +00:00
|
|
|
}
|
|
|
|
/* }}} */
|
|
|
|
|
|
|
|
|
2015-11-10 10:53:19 +00:00
|
|
|
/* {{{ _mysqlnd_pfc_set_methods */
|
2015-10-12 18:11:10 +00:00
|
|
|
static void
|
2015-11-17 12:28:47 +00:00
|
|
|
_mysqlnd_pfc_set_methods(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_protocol_packet_frame_codec) * methods)
|
2011-10-21 15:29:43 +00:00
|
|
|
{
|
2015-11-17 12:28:47 +00:00
|
|
|
MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_protocol_packet_frame_codec) = *methods;
|
2011-10-21 15:29:43 +00:00
|
|
|
}
|
|
|
|
/* }}} */
|
|
|
|
|
|
|
|
|
2015-11-09 13:56:16 +00:00
|
|
|
/* {{{ _mysqlnd_vio_get_methods */
|
|
|
|
static MYSQLND_CLASS_METHODS_TYPE(mysqlnd_vio) *
|
2021-05-12 13:55:23 +00:00
|
|
|
_mysqlnd_vio_get_methods(void)
|
2015-11-09 13:56:16 +00:00
|
|
|
{
|
|
|
|
return &MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_vio);
|
|
|
|
}
|
|
|
|
/* }}} */
|
|
|
|
|
|
|
|
|
|
|
|
/* {{{ _mysqlnd_vio_set_methods */
|
|
|
|
static void
|
|
|
|
_mysqlnd_vio_set_methods(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_vio) * methods)
|
|
|
|
{
|
|
|
|
MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_vio) = *methods;
|
|
|
|
}
|
|
|
|
/* }}} */
|
|
|
|
|
|
|
|
|
2015-10-19 16:20:28 +00:00
|
|
|
/* {{{ mysqlnd_command_factory_get */
|
2019-01-07 16:45:33 +00:00
|
|
|
static MYSQLND_CLASS_METHODS_TYPE(mysqlnd_command) *
|
2021-05-12 13:55:23 +00:00
|
|
|
_mysqlnd_command_factory_get(void)
|
2015-10-19 16:20:28 +00:00
|
|
|
{
|
2019-01-07 16:45:33 +00:00
|
|
|
return &MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_command);
|
2015-10-19 16:20:28 +00:00
|
|
|
}
|
|
|
|
/* }}} */
|
|
|
|
|
|
|
|
|
|
|
|
/* {{{ mysqlnd_command_factory_set */
|
|
|
|
static void
|
2019-01-07 16:45:33 +00:00
|
|
|
_mysqlnd_command_factory_set(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_command) * methods)
|
2015-10-19 16:20:28 +00:00
|
|
|
{
|
2019-01-07 16:45:33 +00:00
|
|
|
MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_command) = *methods;
|
2015-10-19 16:20:28 +00:00
|
|
|
}
|
|
|
|
/* }}} */
|
|
|
|
|
|
|
|
|
2015-10-30 12:20:53 +00:00
|
|
|
/* {{{ _mysqlnd_error_info_get_methods */
|
|
|
|
static MYSQLND_CLASS_METHODS_TYPE(mysqlnd_error_info) *
|
2021-05-12 13:55:23 +00:00
|
|
|
_mysqlnd_error_info_get_methods(void)
|
2015-10-30 12:20:53 +00:00
|
|
|
{
|
|
|
|
return &MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_error_info);
|
|
|
|
}
|
|
|
|
/* }}} */
|
|
|
|
|
|
|
|
|
|
|
|
/* {{{ _mysqlnd_error_info_set_methods */
|
|
|
|
static void
|
|
|
|
_mysqlnd_error_info_set_methods(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_error_info) *methods)
|
|
|
|
{
|
|
|
|
MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_error_info) = *methods;
|
|
|
|
}
|
|
|
|
/* }}} */
|
|
|
|
|
2015-10-19 16:20:28 +00:00
|
|
|
|
2015-10-12 18:11:10 +00:00
|
|
|
struct st_mysqlnd_plugin_methods_xetters mysqlnd_plugin_methods_xetters =
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_mysqlnd_object_factory_get_methods,
|
|
|
|
_mysqlnd_object_factory_set_methods
|
|
|
|
},
|
|
|
|
{
|
|
|
|
_mysqlnd_conn_get_methods,
|
|
|
|
_mysqlnd_conn_set_methods,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
_mysqlnd_conn_data_get_methods,
|
|
|
|
_mysqlnd_conn_data_set_methods,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
_mysqlnd_result_get_methods,
|
|
|
|
_mysqlnd_result_set_methods,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
_mysqlnd_result_unbuffered_get_methods,
|
|
|
|
_mysqlnd_result_unbuffered_set_methods,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
_mysqlnd_result_buffered_get_methods,
|
|
|
|
_mysqlnd_result_buffered_set_methods,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
_mysqlnd_stmt_get_methods,
|
|
|
|
_mysqlnd_stmt_set_methods,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
_mysqlnd_protocol_payload_decoder_factory_get_methods,
|
|
|
|
_mysqlnd_protocol_payload_decoder_factory_set_methods,
|
|
|
|
},
|
|
|
|
{
|
2015-11-10 10:53:19 +00:00
|
|
|
_mysqlnd_pfc_get_methods,
|
|
|
|
_mysqlnd_pfc_set_methods,
|
2015-10-19 16:20:28 +00:00
|
|
|
},
|
2015-11-09 13:56:16 +00:00
|
|
|
{
|
|
|
|
_mysqlnd_vio_get_methods,
|
|
|
|
_mysqlnd_vio_set_methods,
|
|
|
|
},
|
2015-10-30 12:20:53 +00:00
|
|
|
{
|
|
|
|
_mysqlnd_error_info_get_methods,
|
|
|
|
_mysqlnd_error_info_set_methods,
|
|
|
|
},
|
2015-10-19 16:20:28 +00:00
|
|
|
{
|
|
|
|
_mysqlnd_command_factory_get,
|
|
|
|
_mysqlnd_command_factory_set,
|
2015-10-12 18:11:10 +00:00
|
|
|
},
|
|
|
|
};
|