2011-10-21 23:29:43 +08:00
|
|
|
|
/*
|
|
|
|
|
+----------------------------------------------------------------------+
|
2014-09-20 00:33:14 +08:00
|
|
|
|
| PHP Version 7 |
|
2011-10-21 23:29:43 +08:00
|
|
|
|
+----------------------------------------------------------------------+
|
2018-01-02 12:55:14 +08:00
|
|
|
|
| Copyright (c) 2006-2018 The PHP Group |
|
2011-10-21 23:29:43 +08: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: |
|
|
|
|
|
| http://www.php.net/license/3_01.txt |
|
|
|
|
|
| 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 17:24:52 +08:00
|
|
|
|
| Authors: Andrey Hristov <andrey@php.net> |
|
2016-03-16 17:47:27 +08:00
|
|
|
|
| Johannes Schl<EFBFBD>ter <johannes@php.net> |
|
2016-03-16 17:24:52 +08:00
|
|
|
|
| Ulf Wendel <uw@php.net> |
|
2011-10-21 23:29:43 +08:00
|
|
|
|
+----------------------------------------------------------------------+
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include "php.h"
|
|
|
|
|
#include "mysqlnd.h"
|
|
|
|
|
#include "mysqlnd_priv.h"
|
|
|
|
|
#include "mysqlnd_result.h"
|
|
|
|
|
#include "mysqlnd_debug.h"
|
2015-11-10 20:14:39 +08:00
|
|
|
|
#include "mysqlnd_commands.h"
|
2015-10-13 02:11:10 +08:00
|
|
|
|
#include "mysqlnd_ext_plugin.h"
|
2011-10-21 23:29:43 +08:00
|
|
|
|
|
|
|
|
|
static struct st_mysqlnd_conn_methods * mysqlnd_conn_methods;
|
2011-10-31 22:33:56 +08:00
|
|
|
|
static struct st_mysqlnd_conn_data_methods * mysqlnd_conn_data_methods;
|
2011-10-21 23:29:43 +08:00
|
|
|
|
static struct st_mysqlnd_stmt_methods * mysqlnd_stmt_methods;
|
|
|
|
|
|
2015-10-13 02:11:10 +08:00
|
|
|
|
/* {{{ mysqlnd_plugin__get_plugin_connection_data */
|
|
|
|
|
static void **
|
2015-11-17 21:49:18 +08:00
|
|
|
|
mysqlnd_plugin__get_plugin_connection_data(const MYSQLND * conn, const unsigned int plugin_id)
|
2011-10-21 23:29:43 +08:00
|
|
|
|
{
|
2015-10-13 02:11:10 +08:00
|
|
|
|
DBG_ENTER("mysqlnd_plugin__get_plugin_connection_data");
|
2011-10-21 23:29:43 +08: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-13 02:11:10 +08:00
|
|
|
|
/* {{{ mysqlnd_plugin__get_plugin_connection_data_data */
|
|
|
|
|
static void **
|
2015-11-17 21:49:18 +08:00
|
|
|
|
mysqlnd_plugin__get_plugin_connection_data_data(const MYSQLND_CONN_DATA * conn, const unsigned int plugin_id)
|
2011-10-31 19:46:24 +08:00
|
|
|
|
{
|
2015-10-13 02:11:10 +08:00
|
|
|
|
DBG_ENTER("mysqlnd_plugin__get_plugin_connection_data_data");
|
2011-10-31 19:46:24 +08: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-13 02:11:10 +08:00
|
|
|
|
/* {{{ mysqlnd_plugin__get_plugin_result_data */
|
|
|
|
|
static void **
|
2015-11-17 21:49:18 +08:00
|
|
|
|
mysqlnd_plugin__get_plugin_result_data(const MYSQLND_RES * result, const unsigned int plugin_id)
|
2011-10-21 23:29:43 +08:00
|
|
|
|
{
|
2015-10-13 02:11:10 +08:00
|
|
|
|
DBG_ENTER("mysqlnd_plugin__get_plugin_result_data");
|
2011-10-21 23:29:43 +08: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-13 02:11:10 +08:00
|
|
|
|
/* {{{ _mysqlnd_plugin__get_plugin_result_unbuffered_data */
|
|
|
|
|
static void **
|
2015-11-17 21:49:18 +08:00
|
|
|
|
mysqlnd_plugin__get_plugin_result_unbuffered_data(const MYSQLND_RES_UNBUFFERED * result, const unsigned int plugin_id)
|
2014-03-05 22:22:23 +08:00
|
|
|
|
{
|
2015-10-13 02:11:10 +08:00
|
|
|
|
DBG_ENTER("mysqlnd_plugin__get_plugin_result_data");
|
2014-03-05 22:22:23 +08: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-13 02:11:10 +08:00
|
|
|
|
/* {{{ _mysqlnd_plugin__get_plugin_result_buffered_data */
|
|
|
|
|
static void **
|
2015-11-17 21:49:18 +08:00
|
|
|
|
mysqlnd_plugin__get_plugin_result_buffered_data_zval(const MYSQLND_RES_BUFFERED_ZVAL * result, const unsigned int plugin_id)
|
2014-03-05 22:22:23 +08:00
|
|
|
|
{
|
2015-10-13 02:11:10 +08:00
|
|
|
|
DBG_ENTER("_mysqlnd_plugin__get_plugin_result_data");
|
2014-03-05 22:22:23 +08:00
|
|
|
|
DBG_INF_FMT("plugin_id=%u", plugin_id);
|
|
|
|
|
if (!result || plugin_id >= mysqlnd_plugin_count()) {
|
|
|
|
|
return NULL;
|
|
|
|
|
}
|
2014-04-10 21:44:54 +08:00
|
|
|
|
DBG_RETURN((void *)((char *)result + sizeof(MYSQLND_RES_BUFFERED_ZVAL) + plugin_id * sizeof(void *)));
|
|
|
|
|
}
|
|
|
|
|
/* }}} */
|
|
|
|
|
|
2015-10-13 02:11:10 +08:00
|
|
|
|
/* {{{ mysqlnd_plugin__get_plugin_result_buffered_data */
|
|
|
|
|
static void **
|
2015-11-17 21:49:18 +08:00
|
|
|
|
mysqlnd_plugin__get_plugin_result_buffered_data_c(const MYSQLND_RES_BUFFERED_C * result, const unsigned int plugin_id)
|
2014-04-10 21:44:54 +08:00
|
|
|
|
{
|
2015-10-13 02:11:10 +08:00
|
|
|
|
DBG_ENTER("mysqlnd_plugin__get_plugin_result_data");
|
2014-04-10 21:44:54 +08: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_BUFFERED_C) + plugin_id * sizeof(void *)));
|
2014-03-05 22:22:23 +08:00
|
|
|
|
}
|
|
|
|
|
/* }}} */
|
|
|
|
|
|
|
|
|
|
|
2015-10-13 02:11:10 +08:00
|
|
|
|
/* {{{ mysqlnd_plugin__get_plugin_protocol_data */
|
|
|
|
|
static void **
|
2015-11-17 21:49:18 +08:00
|
|
|
|
mysqlnd_plugin__get_plugin_protocol_data(const MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * factory, const unsigned int plugin_id)
|
2011-10-21 23:29:43 +08:00
|
|
|
|
{
|
2015-10-13 02:11:10 +08:00
|
|
|
|
DBG_ENTER("mysqlnd_plugin__get_plugin_protocol_data");
|
2011-10-21 23:29:43 +08:00
|
|
|
|
DBG_INF_FMT("plugin_id=%u", plugin_id);
|
2015-10-02 21:30:53 +08:00
|
|
|
|
if (!factory || plugin_id >= mysqlnd_plugin_count()) {
|
2011-10-21 23:29:43 +08:00
|
|
|
|
return NULL;
|
|
|
|
|
}
|
2015-10-02 21:30:53 +08:00
|
|
|
|
DBG_RETURN((void *)((char *)factory + sizeof(MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY) + plugin_id * sizeof(void *)));
|
2011-10-21 23:29:43 +08:00
|
|
|
|
}
|
|
|
|
|
/* }}} */
|
|
|
|
|
|
|
|
|
|
|
2015-10-13 02:11:10 +08:00
|
|
|
|
/* {{{ mysqlnd_plugin__get_plugin_stmt_data */
|
|
|
|
|
static void **
|
2015-11-17 21:49:18 +08:00
|
|
|
|
mysqlnd_plugin__get_plugin_stmt_data(const MYSQLND_STMT * stmt, const unsigned int plugin_id)
|
2011-10-21 23:29:43 +08:00
|
|
|
|
{
|
2015-10-13 02:11:10 +08:00
|
|
|
|
DBG_ENTER("mysqlnd_plugin__get_plugin_stmt_data");
|
2011-10-21 23:29:43 +08: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 21:40:03 +08:00
|
|
|
|
/* {{{ mysqlnd_plugin__get_plugin_pfc_data */
|
2015-10-13 02:11:10 +08:00
|
|
|
|
static void **
|
2015-11-17 21:49:18 +08:00
|
|
|
|
mysqlnd_plugin__get_plugin_pfc_data(const MYSQLND_PFC * pfc, const unsigned int plugin_id)
|
2011-10-21 23:29:43 +08:00
|
|
|
|
{
|
2015-11-17 21:40:03 +08:00
|
|
|
|
DBG_ENTER("mysqlnd_plugin__get_plugin_pfc_data");
|
2011-10-21 23:29:43 +08:00
|
|
|
|
DBG_INF_FMT("plugin_id=%u", plugin_id);
|
2015-11-17 21:40:03 +08:00
|
|
|
|
if (!pfc || plugin_id >= mysqlnd_plugin_count()) {
|
2011-10-21 23:29:43 +08:00
|
|
|
|
return NULL;
|
|
|
|
|
}
|
2015-11-17 21:40:03 +08:00
|
|
|
|
DBG_RETURN((void *)((char *)pfc + sizeof(MYSQLND_PFC) + plugin_id * sizeof(void *)));
|
2015-11-10 18:02:33 +08:00
|
|
|
|
}
|
|
|
|
|
/* }}} */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* {{{ _mysqlnd_plugin__get_plugin_vio_data */
|
|
|
|
|
static void **
|
2015-11-17 21:49:18 +08:00
|
|
|
|
mysqlnd_plugin__get_plugin_vio_data(const MYSQLND_VIO * vio, const unsigned int plugin_id)
|
2015-11-10 18:02:33 +08: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 23:29:43 +08:00
|
|
|
|
}
|
|
|
|
|
/* }}} */
|
|
|
|
|
|
2015-10-13 02:11:10 +08: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_plugin__get_plugin_result_buffered_data_zval,
|
|
|
|
|
mysqlnd_plugin__get_plugin_result_buffered_data_c,
|
|
|
|
|
mysqlnd_plugin__get_plugin_stmt_data,
|
|
|
|
|
mysqlnd_plugin__get_plugin_protocol_data,
|
2015-11-17 21:40:03 +08:00
|
|
|
|
mysqlnd_plugin__get_plugin_pfc_data,
|
2015-11-10 18:02:33 +08:00
|
|
|
|
mysqlnd_plugin__get_plugin_vio_data,
|
2015-10-13 02:11:10 +08:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* {{{ _mysqlnd_object_factory_get_methods */
|
2015-10-30 20:20:53 +08:00
|
|
|
|
static MYSQLND_CLASS_METHODS_TYPE(mysqlnd_object_factory) *
|
2015-10-13 02:11:10 +08:00
|
|
|
|
_mysqlnd_object_factory_get_methods()
|
2015-10-12 20:57:48 +08:00
|
|
|
|
{
|
|
|
|
|
return &MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_object_factory);
|
|
|
|
|
}
|
|
|
|
|
/* }}} */
|
|
|
|
|
|
|
|
|
|
/* {{{ mysqlnd_conn_set_methods */
|
2015-10-13 02:11:10 +08:00
|
|
|
|
static void
|
2015-10-30 20:20:53 +08:00
|
|
|
|
_mysqlnd_object_factory_set_methods(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_object_factory) *methods)
|
2015-10-12 20:57:48 +08:00
|
|
|
|
{
|
|
|
|
|
MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_object_factory) = *methods;
|
|
|
|
|
}
|
|
|
|
|
/* }}} */
|
|
|
|
|
|
2011-10-21 23:29:43 +08:00
|
|
|
|
|
2015-10-13 02:11:10 +08:00
|
|
|
|
/* {{{ _mysqlnd_conn_get_methods */
|
2015-10-30 20:20:53 +08:00
|
|
|
|
static MYSQLND_CLASS_METHODS_TYPE(mysqlnd_conn) *
|
2015-10-13 02:11:10 +08:00
|
|
|
|
_mysqlnd_conn_get_methods()
|
2011-10-21 23:29:43 +08:00
|
|
|
|
{
|
|
|
|
|
return mysqlnd_conn_methods;
|
|
|
|
|
}
|
|
|
|
|
/* }}} */
|
|
|
|
|
|
2015-10-13 02:11:10 +08:00
|
|
|
|
/* {{{ _mysqlnd_conn_set_methods */
|
|
|
|
|
static void
|
2015-10-30 20:20:53 +08:00
|
|
|
|
_mysqlnd_conn_set_methods(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_conn) *methods)
|
2011-10-21 23:29:43 +08:00
|
|
|
|
{
|
|
|
|
|
mysqlnd_conn_methods = methods;
|
|
|
|
|
}
|
|
|
|
|
/* }}} */
|
|
|
|
|
|
|
|
|
|
|
2015-10-13 02:11:10 +08:00
|
|
|
|
/* {{{ _mysqlnd_conn_data_get_methods */
|
2015-10-30 20:20:53 +08:00
|
|
|
|
static MYSQLND_CLASS_METHODS_TYPE(mysqlnd_conn_data) *
|
2015-10-13 02:11:10 +08:00
|
|
|
|
_mysqlnd_conn_data_get_methods()
|
2011-10-31 22:33:56 +08:00
|
|
|
|
{
|
|
|
|
|
return mysqlnd_conn_data_methods;
|
|
|
|
|
}
|
|
|
|
|
/* }}} */
|
|
|
|
|
|
2015-10-13 02:11:10 +08:00
|
|
|
|
/* {{{ _mysqlnd_conn_data_set_methods */
|
|
|
|
|
static void
|
2015-10-30 20:20:53 +08:00
|
|
|
|
_mysqlnd_conn_data_set_methods(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_conn_data) * methods)
|
2011-10-31 22:33:56 +08:00
|
|
|
|
{
|
|
|
|
|
mysqlnd_conn_data_methods = methods;
|
|
|
|
|
}
|
|
|
|
|
/* }}} */
|
|
|
|
|
|
|
|
|
|
|
2015-10-13 02:11:10 +08:00
|
|
|
|
/* {{{ _mysqlnd_result_get_methods */
|
2015-10-30 20:20:53 +08:00
|
|
|
|
static MYSQLND_CLASS_METHODS_TYPE(mysqlnd_res) *
|
2015-10-13 02:11:10 +08:00
|
|
|
|
_mysqlnd_result_get_methods()
|
2011-10-21 23:29:43 +08:00
|
|
|
|
{
|
|
|
|
|
return &MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_res);
|
|
|
|
|
}
|
|
|
|
|
/* }}} */
|
|
|
|
|
|
|
|
|
|
|
2015-10-13 02:11:10 +08:00
|
|
|
|
/* {{{ _mysqlnd_result_set_methods */
|
|
|
|
|
static void
|
2015-10-30 20:20:53 +08:00
|
|
|
|
_mysqlnd_result_set_methods(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_res) * methods)
|
2011-10-21 23:29:43 +08:00
|
|
|
|
{
|
|
|
|
|
MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_res) = *methods;
|
|
|
|
|
}
|
|
|
|
|
/* }}} */
|
|
|
|
|
|
|
|
|
|
|
2015-10-13 02:11:10 +08:00
|
|
|
|
/* {{{ _mysqlnd_result_unbuffered_get_methods */
|
2015-10-30 20:20:53 +08:00
|
|
|
|
static MYSQLND_CLASS_METHODS_TYPE(mysqlnd_result_unbuffered) *
|
2015-10-13 02:11:10 +08:00
|
|
|
|
_mysqlnd_result_unbuffered_get_methods()
|
2014-03-05 22:22:23 +08:00
|
|
|
|
{
|
|
|
|
|
return &MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_result_unbuffered);
|
|
|
|
|
}
|
|
|
|
|
/* }}} */
|
|
|
|
|
|
|
|
|
|
|
2015-10-13 02:11:10 +08:00
|
|
|
|
/* {{{ _mysqlnd_result_unbuffered_set_methods */
|
|
|
|
|
static void
|
2015-10-30 20:20:53 +08:00
|
|
|
|
_mysqlnd_result_unbuffered_set_methods(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_result_unbuffered) * methods)
|
2014-03-05 22:22:23 +08:00
|
|
|
|
{
|
|
|
|
|
MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_result_unbuffered) = *methods;
|
|
|
|
|
}
|
|
|
|
|
/* }}} */
|
|
|
|
|
|
|
|
|
|
|
2015-10-13 02:11:10 +08:00
|
|
|
|
/* {{{ _mysqlnd_result_buffered_get_methods */
|
2015-10-30 20:20:53 +08:00
|
|
|
|
static MYSQLND_CLASS_METHODS_TYPE(mysqlnd_result_buffered) *
|
2015-10-13 02:11:10 +08:00
|
|
|
|
_mysqlnd_result_buffered_get_methods()
|
2014-03-05 22:22:23 +08:00
|
|
|
|
{
|
|
|
|
|
return &MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_result_buffered);
|
|
|
|
|
}
|
|
|
|
|
/* }}} */
|
|
|
|
|
|
|
|
|
|
|
2015-10-13 02:11:10 +08:00
|
|
|
|
/* {{{ _mysqlnd_result_buffered_set_methods */
|
|
|
|
|
static void
|
2015-10-30 20:20:53 +08:00
|
|
|
|
_mysqlnd_result_buffered_set_methods(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_result_buffered) * methods)
|
2014-03-05 22:22:23 +08:00
|
|
|
|
{
|
|
|
|
|
MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_result_buffered) = *methods;
|
|
|
|
|
}
|
|
|
|
|
/* }}} */
|
|
|
|
|
|
|
|
|
|
|
2015-10-13 02:11:10 +08:00
|
|
|
|
/* {{{ _mysqlnd_stmt_get_methods */
|
2015-10-30 20:20:53 +08:00
|
|
|
|
static MYSQLND_CLASS_METHODS_TYPE(mysqlnd_stmt) *
|
2015-10-13 02:11:10 +08:00
|
|
|
|
_mysqlnd_stmt_get_methods()
|
2011-10-21 23:29:43 +08:00
|
|
|
|
{
|
|
|
|
|
return mysqlnd_stmt_methods;
|
|
|
|
|
}
|
|
|
|
|
/* }}} */
|
|
|
|
|
|
|
|
|
|
|
2015-10-13 02:11:10 +08:00
|
|
|
|
/* {{{ _mysqlnd_stmt_set_methods */
|
|
|
|
|
static void
|
2015-10-30 20:20:53 +08:00
|
|
|
|
_mysqlnd_stmt_set_methods(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_stmt) *methods)
|
2011-10-21 23:29:43 +08:00
|
|
|
|
{
|
|
|
|
|
mysqlnd_stmt_methods = methods;
|
|
|
|
|
}
|
|
|
|
|
/* }}} */
|
|
|
|
|
|
|
|
|
|
|
2015-10-13 02:11:10 +08:00
|
|
|
|
/* {{{ _mysqlnd_protocol_payload_decoder_factory_get_methods */
|
2015-10-30 20:20:53 +08:00
|
|
|
|
static MYSQLND_CLASS_METHODS_TYPE(mysqlnd_protocol_payload_decoder_factory) *
|
2015-10-13 02:11:10 +08:00
|
|
|
|
_mysqlnd_protocol_payload_decoder_factory_get_methods()
|
2011-10-21 23:29:43 +08:00
|
|
|
|
{
|
2015-10-02 21:30:53 +08:00
|
|
|
|
return &MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_protocol_payload_decoder_factory);
|
2011-10-21 23:29:43 +08:00
|
|
|
|
}
|
|
|
|
|
/* }}} */
|
|
|
|
|
|
|
|
|
|
|
2015-10-13 02:11:10 +08:00
|
|
|
|
/* {{{ _mysqlnd_protocol_payload_decoder_factory_set_methods */
|
|
|
|
|
static void
|
2015-10-30 20:20:53 +08:00
|
|
|
|
_mysqlnd_protocol_payload_decoder_factory_set_methods(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_protocol_payload_decoder_factory) * methods)
|
2011-10-21 23:29:43 +08:00
|
|
|
|
{
|
2015-10-02 21:30:53 +08:00
|
|
|
|
MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_protocol_payload_decoder_factory) = *methods;
|
2011-10-21 23:29:43 +08:00
|
|
|
|
}
|
|
|
|
|
/* }}} */
|
|
|
|
|
|
|
|
|
|
|
2015-11-10 18:53:19 +08:00
|
|
|
|
/* {{{ _mysqlnd_pfc_get_methods */
|
2015-11-17 20:28:47 +08:00
|
|
|
|
static MYSQLND_CLASS_METHODS_TYPE(mysqlnd_protocol_packet_frame_codec) *
|
2015-11-10 18:53:19 +08:00
|
|
|
|
_mysqlnd_pfc_get_methods()
|
2011-10-21 23:29:43 +08:00
|
|
|
|
{
|
2015-11-17 20:28:47 +08:00
|
|
|
|
return &MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_protocol_packet_frame_codec);
|
2011-10-21 23:29:43 +08:00
|
|
|
|
}
|
|
|
|
|
/* }}} */
|
|
|
|
|
|
|
|
|
|
|
2015-11-10 18:53:19 +08:00
|
|
|
|
/* {{{ _mysqlnd_pfc_set_methods */
|
2015-10-13 02:11:10 +08:00
|
|
|
|
static void
|
2015-11-17 20:28:47 +08:00
|
|
|
|
_mysqlnd_pfc_set_methods(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_protocol_packet_frame_codec) * methods)
|
2011-10-21 23:29:43 +08:00
|
|
|
|
{
|
2015-11-17 20:28:47 +08:00
|
|
|
|
MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_protocol_packet_frame_codec) = *methods;
|
2011-10-21 23:29:43 +08:00
|
|
|
|
}
|
|
|
|
|
/* }}} */
|
|
|
|
|
|
|
|
|
|
|
2015-11-09 21:56:16 +08:00
|
|
|
|
/* {{{ _mysqlnd_vio_get_methods */
|
|
|
|
|
static MYSQLND_CLASS_METHODS_TYPE(mysqlnd_vio) *
|
|
|
|
|
_mysqlnd_vio_get_methods()
|
|
|
|
|
{
|
|
|
|
|
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-20 00:20:28 +08:00
|
|
|
|
/* {{{ mysqlnd_command_factory_get */
|
|
|
|
|
static func_mysqlnd__command_factory
|
|
|
|
|
_mysqlnd_command_factory_get()
|
|
|
|
|
{
|
|
|
|
|
return mysqlnd_command_factory;
|
|
|
|
|
}
|
|
|
|
|
/* }}} */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* {{{ mysqlnd_command_factory_set */
|
|
|
|
|
static void
|
|
|
|
|
_mysqlnd_command_factory_set(func_mysqlnd__command_factory factory)
|
|
|
|
|
{
|
|
|
|
|
mysqlnd_command_factory = factory;
|
|
|
|
|
}
|
|
|
|
|
/* }}} */
|
|
|
|
|
|
|
|
|
|
|
2015-10-30 20:20:53 +08:00
|
|
|
|
/* {{{ _mysqlnd_error_info_get_methods */
|
|
|
|
|
static MYSQLND_CLASS_METHODS_TYPE(mysqlnd_error_info) *
|
|
|
|
|
_mysqlnd_error_info_get_methods()
|
|
|
|
|
{
|
|
|
|
|
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-20 00:20:28 +08:00
|
|
|
|
|
2015-10-13 02:11:10 +08: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 18:53:19 +08:00
|
|
|
|
_mysqlnd_pfc_get_methods,
|
|
|
|
|
_mysqlnd_pfc_set_methods,
|
2015-10-20 00:20:28 +08:00
|
|
|
|
},
|
2015-11-09 21:56:16 +08:00
|
|
|
|
{
|
|
|
|
|
_mysqlnd_vio_get_methods,
|
|
|
|
|
_mysqlnd_vio_set_methods,
|
|
|
|
|
},
|
2015-10-30 20:20:53 +08:00
|
|
|
|
{
|
|
|
|
|
_mysqlnd_error_info_get_methods,
|
|
|
|
|
_mysqlnd_error_info_set_methods,
|
|
|
|
|
},
|
2015-10-20 00:20:28 +08:00
|
|
|
|
{
|
|
|
|
|
_mysqlnd_command_factory_get,
|
|
|
|
|
_mysqlnd_command_factory_set,
|
2015-10-13 02:11:10 +08:00
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
|
2011-10-21 23:29:43 +08:00
|
|
|
|
/*
|
|
|
|
|
* Local variables:
|
|
|
|
|
* tab-width: 4
|
|
|
|
|
* c-basic-offset: 4
|
|
|
|
|
* End:
|
|
|
|
|
* vim600: noet sw=4 ts=4 fdm=marker
|
|
|
|
|
* vim<600: noet sw=4 ts=4
|
|
|
|
|
*/
|