mirror of
https://github.com/php/php-src.git
synced 2025-08-16 22:18:50 +02:00
MNDR:
- Move transport string generation to own function, which can be overloaded or sniffed
This commit is contained in:
parent
51085dac1a
commit
e81ecc80ca
3 changed files with 78 additions and 55 deletions
|
@ -695,6 +695,7 @@ MYSQLND_METHOD(mysqlnd_conn_data, get_updated_connect_flags)(MYSQLND_CONN_DATA *
|
||||||
/* {{{ mysqlnd_conn_data::connect_handshake */
|
/* {{{ mysqlnd_conn_data::connect_handshake */
|
||||||
static enum_func_status
|
static enum_func_status
|
||||||
MYSQLND_METHOD(mysqlnd_conn_data, connect_handshake)(MYSQLND_CONN_DATA * conn,
|
MYSQLND_METHOD(mysqlnd_conn_data, connect_handshake)(MYSQLND_CONN_DATA * conn,
|
||||||
|
const MYSQLND_CSTRING * const scheme,
|
||||||
const MYSQLND_CSTRING * const username,
|
const MYSQLND_CSTRING * const username,
|
||||||
const MYSQLND_CSTRING * const password,
|
const MYSQLND_CSTRING * const password,
|
||||||
const MYSQLND_CSTRING * const database,
|
const MYSQLND_CSTRING * const database,
|
||||||
|
@ -704,7 +705,7 @@ MYSQLND_METHOD(mysqlnd_conn_data, connect_handshake)(MYSQLND_CONN_DATA * conn,
|
||||||
size_t client_flags = mysql_flags;
|
size_t client_flags = mysql_flags;
|
||||||
DBG_ENTER("mysqlnd_conn_data::connect_handshake");
|
DBG_ENTER("mysqlnd_conn_data::connect_handshake");
|
||||||
|
|
||||||
if (FAIL == conn->net->data->m.connect_ex(conn->net, conn->scheme, conn->persistent, conn->stats, conn->error_info)) {
|
if (FAIL == conn->net->data->m.connect_ex(conn->net, *scheme, conn->persistent, conn->stats, conn->error_info)) {
|
||||||
DBG_RETURN(FAIL);
|
DBG_RETURN(FAIL);
|
||||||
} else {
|
} else {
|
||||||
struct st_mysqlnd_protocol_command * command = conn->command_factory(COM_HANDSHAKE, conn, username, password, database, client_flags);
|
struct st_mysqlnd_protocol_command * command = conn->command_factory(COM_HANDSHAKE, conn, username, password, database, client_flags);
|
||||||
|
@ -717,6 +718,42 @@ MYSQLND_METHOD(mysqlnd_conn_data, connect_handshake)(MYSQLND_CONN_DATA * conn,
|
||||||
}
|
}
|
||||||
/* }}} */
|
/* }}} */
|
||||||
|
|
||||||
|
/* {{{ mysqlnd_conn_data::connect */
|
||||||
|
static MYSQLND_STRING
|
||||||
|
MYSQLND_METHOD(mysqlnd_conn_data, get_scheme)(MYSQLND_CONN_DATA * conn, MYSQLND_CSTRING hostname, MYSQLND_CSTRING socket_or_pipe, unsigned int port, zend_bool * unix_socket, zend_bool * named_pipe)
|
||||||
|
{
|
||||||
|
MYSQLND_STRING transport;
|
||||||
|
DBG_ENTER("mysqlnd_conn_data::get_scheme");
|
||||||
|
#ifndef PHP_WIN32
|
||||||
|
if (hostname.l == sizeof("localhost") - 1 && !strncasecmp(hostname.s, "localhost", hostname.l)) {
|
||||||
|
DBG_INF_FMT("socket=%s", socket_or_pipe.s? socket_or_pipe.s:"n/a");
|
||||||
|
if (!socket_or_pipe.s) {
|
||||||
|
socket_or_pipe.s = "/tmp/mysql.sock";
|
||||||
|
socket_or_pipe.l = strlen(socket_or_pipe.s);
|
||||||
|
}
|
||||||
|
transport.l = mnd_sprintf(&transport.s, 0, "unix://%s", socket_or_pipe.s);
|
||||||
|
*unix_socket = TRUE;
|
||||||
|
#else
|
||||||
|
if (hostname.l == sizeof(".") - 1 && hostname.s[0] == '.') {
|
||||||
|
/* named pipe in socket */
|
||||||
|
if (!socket_or_pipe.s) {
|
||||||
|
socket_or_pipe.s = "\\\\.\\pipe\\MySQL";
|
||||||
|
socket_or_pipe.l = strlen(socket_or_pipe.s);
|
||||||
|
}
|
||||||
|
transport.l = mnd_sprintf(&transport.s, 0, "pipe://%s", socket_or_pipe.s);
|
||||||
|
*named_pipe = TRUE;
|
||||||
|
#endif
|
||||||
|
} else {
|
||||||
|
if (!port) {
|
||||||
|
port = 3306;
|
||||||
|
}
|
||||||
|
transport.l = mnd_sprintf(&transport.s, 0, "tcp://%s:%u", hostname.s, port);
|
||||||
|
}
|
||||||
|
DBG_INF_FMT("transport=%s", transport.s? transport.s:"OOM");
|
||||||
|
DBG_RETURN(transport);
|
||||||
|
}
|
||||||
|
/* }}} */
|
||||||
|
|
||||||
|
|
||||||
/* {{{ mysqlnd_conn_data::connect */
|
/* {{{ mysqlnd_conn_data::connect */
|
||||||
static enum_func_status
|
static enum_func_status
|
||||||
|
@ -737,6 +774,9 @@ MYSQLND_METHOD(mysqlnd_conn_data, connect)(MYSQLND_CONN_DATA * conn,
|
||||||
zend_bool saved_compression = FALSE;
|
zend_bool saved_compression = FALSE;
|
||||||
zend_bool local_tx_started = FALSE;
|
zend_bool local_tx_started = FALSE;
|
||||||
MYSQLND_NET * net = conn->net;
|
MYSQLND_NET * net = conn->net;
|
||||||
|
MYSQLND_STRING transport = { NULL, 0 };
|
||||||
|
// char * transport = NULL;
|
||||||
|
// int transport_len;
|
||||||
|
|
||||||
DBG_ENTER("mysqlnd_conn_data::connect");
|
DBG_ENTER("mysqlnd_conn_data::connect");
|
||||||
DBG_INF_FMT("conn=%p", conn);
|
DBG_INF_FMT("conn=%p", conn);
|
||||||
|
@ -803,53 +843,13 @@ MYSQLND_METHOD(mysqlnd_conn_data, connect)(MYSQLND_CONN_DATA * conn,
|
||||||
mysql_flags |= CLIENT_CONNECT_WITH_DB;
|
mysql_flags |= CLIENT_CONNECT_WITH_DB;
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
transport = conn->m->get_scheme(conn, hostname, socket_or_pipe, port, &unix_socket, &named_pipe);
|
||||||
char * transport = NULL;
|
|
||||||
int transport_len;
|
|
||||||
#ifndef PHP_WIN32
|
|
||||||
if (hostname.l == sizeof("localhost") - 1 && !strncasecmp(hostname.s, "localhost", hostname.l)) {
|
|
||||||
DBG_INF_FMT("socket=%s", socket_or_pipe.s? socket_or_pipe.s:"n/a");
|
|
||||||
if (!socket_or_pipe.s) {
|
|
||||||
socket_or_pipe.s = "/tmp/mysql.sock";
|
|
||||||
socket_or_pipe.l = strlen(socket_or_pipe.s);
|
|
||||||
}
|
|
||||||
transport_len = mnd_sprintf(&transport, 0, "unix://%s", socket_or_pipe.s);
|
|
||||||
unix_socket = TRUE;
|
|
||||||
#else
|
|
||||||
if (hostname.l == sizeof(".") - 1 && hostname.s[0] == '.') {
|
|
||||||
/* named pipe in socket */
|
|
||||||
if (!socket_or_pipe.s) {
|
|
||||||
socket_or_pipe.s = "\\\\.\\pipe\\MySQL";
|
|
||||||
socket_or_pipe.l = strlen(socket_or_pipe.s);
|
|
||||||
}
|
|
||||||
transport_len = mnd_sprintf(&transport, 0, "pipe://%s", socket_or_pipe.s);
|
|
||||||
named_pipe = TRUE;
|
|
||||||
#endif
|
|
||||||
} else {
|
|
||||||
if (!port) {
|
|
||||||
port = 3306;
|
|
||||||
}
|
|
||||||
transport_len = mnd_sprintf(&transport, 0, "tcp://%s:%u", hostname.s, port);
|
|
||||||
}
|
|
||||||
if (!transport) {
|
|
||||||
SET_OOM_ERROR(conn->error_info);
|
|
||||||
goto err; /* OOM */
|
|
||||||
}
|
|
||||||
DBG_INF_FMT("transport=%s conn->scheme=%s", transport, conn->scheme.s);
|
|
||||||
conn->scheme.s = mnd_pestrndup(transport, transport_len, conn->persistent);
|
|
||||||
conn->scheme.l = transport_len;
|
|
||||||
mnd_sprintf_free(transport);
|
|
||||||
transport = NULL;
|
|
||||||
if (!conn->scheme.s) {
|
|
||||||
goto err; /* OOM */
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
mysql_flags = conn->m->get_updated_connect_flags(conn, mysql_flags);
|
mysql_flags = conn->m->get_updated_connect_flags(conn, mysql_flags);
|
||||||
|
|
||||||
{
|
{
|
||||||
|
const MYSQLND_CSTRING scheme = { transport.s, transport.l };
|
||||||
if (FAIL == conn->m->connect_handshake(conn, &username, &password, &database, mysql_flags)) {
|
if (FAIL == conn->m->connect_handshake(conn, &scheme, &username, &password, &database, mysql_flags)) {
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -867,6 +867,18 @@ MYSQLND_METHOD(mysqlnd_conn_data, connect)(MYSQLND_CONN_DATA * conn,
|
||||||
*/
|
*/
|
||||||
net->data->compressed = mysql_flags & CLIENT_COMPRESS? TRUE:FALSE;
|
net->data->compressed = mysql_flags & CLIENT_COMPRESS? TRUE:FALSE;
|
||||||
|
|
||||||
|
|
||||||
|
conn->scheme.s = mnd_pestrndup(transport.s, transport.l, conn->persistent);
|
||||||
|
conn->scheme.l = transport.l;
|
||||||
|
if (transport.s) {
|
||||||
|
mnd_sprintf_free(transport.s);
|
||||||
|
transport.s = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!conn->scheme.s) {
|
||||||
|
goto err; /* OOM */
|
||||||
|
}
|
||||||
|
|
||||||
conn->user_len = username.l;
|
conn->user_len = username.l;
|
||||||
conn->user = mnd_pestrndup(username.s, conn->user_len, conn->persistent);
|
conn->user = mnd_pestrndup(username.s, conn->user_len, conn->persistent);
|
||||||
conn->passwd = mnd_pestrndup(password.s, password.l, conn->persistent);
|
conn->passwd = mnd_pestrndup(password.s, password.l, conn->persistent);
|
||||||
|
@ -952,6 +964,10 @@ MYSQLND_METHOD(mysqlnd_conn_data, connect)(MYSQLND_CONN_DATA * conn,
|
||||||
DBG_RETURN(PASS);
|
DBG_RETURN(PASS);
|
||||||
}
|
}
|
||||||
err:
|
err:
|
||||||
|
if (transport.s) {
|
||||||
|
mnd_sprintf_free(transport.s);
|
||||||
|
transport.s = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
DBG_ERR_FMT("[%u] %.128s (trying to connect via %s)", conn->error_info->error_no, conn->error_info->error, conn->scheme.s);
|
DBG_ERR_FMT("[%u] %.128s (trying to connect via %s)", conn->error_info->error_no, conn->error_info->error, conn->scheme.s);
|
||||||
if (!conn->error_info->error_no) {
|
if (!conn->error_info->error_no) {
|
||||||
|
@ -2810,7 +2826,9 @@ MYSQLND_CLASS_METHODS_START(mysqlnd_conn_data)
|
||||||
MYSQLND_METHOD(mysqlnd_conn_data, set_client_option_2d),
|
MYSQLND_METHOD(mysqlnd_conn_data, set_client_option_2d),
|
||||||
|
|
||||||
MYSQLND_METHOD(mysqlnd_conn_data, negotiate_client_api_capabilities),
|
MYSQLND_METHOD(mysqlnd_conn_data, negotiate_client_api_capabilities),
|
||||||
MYSQLND_METHOD(mysqlnd_conn_data, get_client_api_capabilities)
|
MYSQLND_METHOD(mysqlnd_conn_data, get_client_api_capabilities),
|
||||||
|
|
||||||
|
MYSQLND_METHOD(mysqlnd_conn_data, get_scheme)
|
||||||
MYSQLND_CLASS_METHODS_END;
|
MYSQLND_CLASS_METHODS_END;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -129,7 +129,7 @@ MYSQLND_METHOD(mysqlnd_net, network_write_ex)(MYSQLND_NET * const net, const zen
|
||||||
|
|
||||||
/* {{{ mysqlnd_net::open_pipe */
|
/* {{{ mysqlnd_net::open_pipe */
|
||||||
static php_stream *
|
static php_stream *
|
||||||
MYSQLND_METHOD(mysqlnd_net, open_pipe)(MYSQLND_NET * const net, const MYSQLND_STRING scheme, const zend_bool persistent,
|
MYSQLND_METHOD(mysqlnd_net, open_pipe)(MYSQLND_NET * const net, const MYSQLND_CSTRING scheme, const zend_bool persistent,
|
||||||
MYSQLND_STATS * const conn_stats, MYSQLND_ERROR_INFO * const error_info)
|
MYSQLND_STATS * const conn_stats, MYSQLND_ERROR_INFO * const error_info)
|
||||||
{
|
{
|
||||||
#if PHP_API_VERSION < 20100412
|
#if PHP_API_VERSION < 20100412
|
||||||
|
@ -168,7 +168,7 @@ MYSQLND_METHOD(mysqlnd_net, open_pipe)(MYSQLND_NET * const net, const MYSQLND_ST
|
||||||
|
|
||||||
/* {{{ mysqlnd_net::open_tcp_or_unix */
|
/* {{{ mysqlnd_net::open_tcp_or_unix */
|
||||||
static php_stream *
|
static php_stream *
|
||||||
MYSQLND_METHOD(mysqlnd_net, open_tcp_or_unix)(MYSQLND_NET * const net, const MYSQLND_STRING scheme, const zend_bool persistent,
|
MYSQLND_METHOD(mysqlnd_net, open_tcp_or_unix)(MYSQLND_NET * const net, const MYSQLND_CSTRING scheme, const zend_bool persistent,
|
||||||
MYSQLND_STATS * const conn_stats, MYSQLND_ERROR_INFO * const error_info)
|
MYSQLND_STATS * const conn_stats, MYSQLND_ERROR_INFO * const error_info)
|
||||||
{
|
{
|
||||||
#if PHP_API_VERSION < 20100412
|
#if PHP_API_VERSION < 20100412
|
||||||
|
@ -263,7 +263,7 @@ MYSQLND_METHOD(mysqlnd_net, open_tcp_or_unix)(MYSQLND_NET * const net, const MYS
|
||||||
|
|
||||||
/* {{{ mysqlnd_net::post_connect_set_opt */
|
/* {{{ mysqlnd_net::post_connect_set_opt */
|
||||||
static void
|
static void
|
||||||
MYSQLND_METHOD(mysqlnd_net, post_connect_set_opt)(MYSQLND_NET * const net, const MYSQLND_STRING scheme,
|
MYSQLND_METHOD(mysqlnd_net, post_connect_set_opt)(MYSQLND_NET * const net, const MYSQLND_CSTRING scheme,
|
||||||
MYSQLND_STATS * const conn_stats, MYSQLND_ERROR_INFO * const error_info)
|
MYSQLND_STATS * const conn_stats, MYSQLND_ERROR_INFO * const error_info)
|
||||||
{
|
{
|
||||||
php_stream * net_stream = net->data->m.get_stream(net);
|
php_stream * net_stream = net->data->m.get_stream(net);
|
||||||
|
@ -292,7 +292,7 @@ MYSQLND_METHOD(mysqlnd_net, post_connect_set_opt)(MYSQLND_NET * const net, const
|
||||||
|
|
||||||
/* {{{ mysqlnd_net::get_open_stream */
|
/* {{{ mysqlnd_net::get_open_stream */
|
||||||
static func_mysqlnd_net__open_stream
|
static func_mysqlnd_net__open_stream
|
||||||
MYSQLND_METHOD(mysqlnd_net, get_open_stream)(MYSQLND_NET * const net, const MYSQLND_STRING scheme,
|
MYSQLND_METHOD(mysqlnd_net, get_open_stream)(MYSQLND_NET * const net, const MYSQLND_CSTRING scheme,
|
||||||
MYSQLND_ERROR_INFO * const error_info)
|
MYSQLND_ERROR_INFO * const error_info)
|
||||||
{
|
{
|
||||||
func_mysqlnd_net__open_stream ret = NULL;
|
func_mysqlnd_net__open_stream ret = NULL;
|
||||||
|
@ -317,7 +317,7 @@ MYSQLND_METHOD(mysqlnd_net, get_open_stream)(MYSQLND_NET * const net, const MYSQ
|
||||||
|
|
||||||
/* {{{ mysqlnd_net::connect_ex */
|
/* {{{ mysqlnd_net::connect_ex */
|
||||||
static enum_func_status
|
static enum_func_status
|
||||||
MYSQLND_METHOD(mysqlnd_net, connect_ex)(MYSQLND_NET * const net, const MYSQLND_STRING scheme, const zend_bool persistent,
|
MYSQLND_METHOD(mysqlnd_net, connect_ex)(MYSQLND_NET * const net, const MYSQLND_CSTRING scheme, const zend_bool persistent,
|
||||||
MYSQLND_STATS * const conn_stats, MYSQLND_ERROR_INFO * const error_info)
|
MYSQLND_STATS * const conn_stats, MYSQLND_ERROR_INFO * const error_info)
|
||||||
{
|
{
|
||||||
enum_func_status ret = FAIL;
|
enum_func_status ret = FAIL;
|
||||||
|
|
|
@ -338,13 +338,13 @@ typedef size_t (*func_mysqlnd_net__send_ex)(MYSQLND_NET * const net, zend_uch
|
||||||
typedef enum_func_status (*func_mysqlnd_net__receive_ex)(MYSQLND_NET * const net, zend_uchar * const buffer, const size_t count, MYSQLND_STATS * const conn_stats, MYSQLND_ERROR_INFO * const error_info);
|
typedef enum_func_status (*func_mysqlnd_net__receive_ex)(MYSQLND_NET * const net, zend_uchar * const buffer, const size_t count, MYSQLND_STATS * const conn_stats, MYSQLND_ERROR_INFO * const error_info);
|
||||||
typedef enum_func_status (*func_mysqlnd_net__init)(MYSQLND_NET * const net, MYSQLND_STATS * const stats, MYSQLND_ERROR_INFO * const error_info);
|
typedef enum_func_status (*func_mysqlnd_net__init)(MYSQLND_NET * const net, MYSQLND_STATS * const stats, MYSQLND_ERROR_INFO * const error_info);
|
||||||
typedef void (*func_mysqlnd_net__dtor)(MYSQLND_NET * const net, MYSQLND_STATS * const conn_stats, MYSQLND_ERROR_INFO * const error_info);
|
typedef void (*func_mysqlnd_net__dtor)(MYSQLND_NET * const net, MYSQLND_STATS * const conn_stats, MYSQLND_ERROR_INFO * const error_info);
|
||||||
typedef enum_func_status (*func_mysqlnd_net__connect_ex)(MYSQLND_NET * const net, const MYSQLND_STRING scheme, const zend_bool persistent, MYSQLND_STATS * const conn_stats, MYSQLND_ERROR_INFO * const error_info);
|
typedef enum_func_status (*func_mysqlnd_net__connect_ex)(MYSQLND_NET * const net, const MYSQLND_CSTRING scheme, const zend_bool persistent, MYSQLND_STATS * const conn_stats, MYSQLND_ERROR_INFO * const error_info);
|
||||||
typedef void (*func_mysqlnd_net__close_stream)(MYSQLND_NET * const net, MYSQLND_STATS * const conn_stats, MYSQLND_ERROR_INFO * const error_info);
|
typedef void (*func_mysqlnd_net__close_stream)(MYSQLND_NET * const net, MYSQLND_STATS * const conn_stats, MYSQLND_ERROR_INFO * const error_info);
|
||||||
typedef php_stream * (*func_mysqlnd_net__open_stream)(MYSQLND_NET * const net, const MYSQLND_STRING scheme, const zend_bool persistent, MYSQLND_STATS * const conn_stats, MYSQLND_ERROR_INFO * const error_info);
|
typedef php_stream * (*func_mysqlnd_net__open_stream)(MYSQLND_NET * const net, const MYSQLND_CSTRING scheme, const zend_bool persistent, MYSQLND_STATS * const conn_stats, MYSQLND_ERROR_INFO * const error_info);
|
||||||
typedef php_stream * (*func_mysqlnd_net__get_stream)(const MYSQLND_NET * const net);
|
typedef php_stream * (*func_mysqlnd_net__get_stream)(const MYSQLND_NET * const net);
|
||||||
typedef php_stream * (*func_mysqlnd_net__set_stream)(MYSQLND_NET * const net, php_stream * net_stream);
|
typedef php_stream * (*func_mysqlnd_net__set_stream)(MYSQLND_NET * const net, php_stream * net_stream);
|
||||||
typedef func_mysqlnd_net__open_stream (*func_mysqlnd_net__get_open_stream)(MYSQLND_NET * const net, const MYSQLND_STRING scheme, MYSQLND_ERROR_INFO * const error_info);
|
typedef func_mysqlnd_net__open_stream (*func_mysqlnd_net__get_open_stream)(MYSQLND_NET * const net, const MYSQLND_CSTRING scheme, MYSQLND_ERROR_INFO * const error_info);
|
||||||
typedef void (*func_mysqlnd_net__post_connect_set_opt)(MYSQLND_NET * const net, const MYSQLND_STRING scheme, MYSQLND_STATS * const conn_stats, MYSQLND_ERROR_INFO * const error_info);
|
typedef void (*func_mysqlnd_net__post_connect_set_opt)(MYSQLND_NET * const net, const MYSQLND_CSTRING scheme, MYSQLND_STATS * const conn_stats, MYSQLND_ERROR_INFO * const error_info);
|
||||||
typedef enum_func_status (*func_mysqlnd_net__read_compressed_packet_from_stream_and_fill_read_buffer)(MYSQLND_NET * net, size_t net_payload_size, MYSQLND_STATS * conn_stats, MYSQLND_ERROR_INFO * error_info);
|
typedef enum_func_status (*func_mysqlnd_net__read_compressed_packet_from_stream_and_fill_read_buffer)(MYSQLND_NET * net, size_t net_payload_size, MYSQLND_STATS * conn_stats, MYSQLND_ERROR_INFO * error_info);
|
||||||
|
|
||||||
MYSQLND_CLASS_METHODS_TYPE(mysqlnd_net)
|
MYSQLND_CLASS_METHODS_TYPE(mysqlnd_net)
|
||||||
|
@ -539,7 +539,7 @@ typedef enum_func_status (*func_mysqlnd_conn_data__local_tx_start)(MYSQLND_CONN_
|
||||||
typedef enum_func_status (*func_mysqlnd_conn_data__local_tx_end)(MYSQLND_CONN_DATA * conn, size_t this_func, enum_func_status status);
|
typedef enum_func_status (*func_mysqlnd_conn_data__local_tx_end)(MYSQLND_CONN_DATA * conn, size_t this_func, enum_func_status status);
|
||||||
typedef enum_func_status (*func_mysqlnd_conn_data__execute_init_commands)(MYSQLND_CONN_DATA * conn);
|
typedef enum_func_status (*func_mysqlnd_conn_data__execute_init_commands)(MYSQLND_CONN_DATA * conn);
|
||||||
typedef unsigned int (*func_mysqlnd_conn_data__get_updated_connect_flags)(MYSQLND_CONN_DATA * conn, unsigned int mysql_flags);
|
typedef unsigned int (*func_mysqlnd_conn_data__get_updated_connect_flags)(MYSQLND_CONN_DATA * conn, unsigned int mysql_flags);
|
||||||
typedef enum_func_status (*func_mysqlnd_conn_data__connect_handshake)(MYSQLND_CONN_DATA * conn, const MYSQLND_CSTRING * const username, const MYSQLND_CSTRING * const password, const MYSQLND_CSTRING * const database, const unsigned int mysql_flags);
|
typedef enum_func_status (*func_mysqlnd_conn_data__connect_handshake)(MYSQLND_CONN_DATA * conn, const MYSQLND_CSTRING * const scheme, const MYSQLND_CSTRING * const username, const MYSQLND_CSTRING * const password, const MYSQLND_CSTRING * const database, const unsigned int mysql_flags);
|
||||||
typedef struct st_mysqlnd_authentication_plugin * (*func_mysqlnd_conn_data__fetch_auth_plugin_by_name)(const char * const requested_protocol);
|
typedef struct st_mysqlnd_authentication_plugin * (*func_mysqlnd_conn_data__fetch_auth_plugin_by_name)(const char * const requested_protocol);
|
||||||
|
|
||||||
typedef enum_func_status (*func_mysqlnd_conn_data__set_client_option_2d)(MYSQLND_CONN_DATA * const conn, enum_mysqlnd_client_option option, const char * const key, const char * const value);
|
typedef enum_func_status (*func_mysqlnd_conn_data__set_client_option_2d)(MYSQLND_CONN_DATA * const conn, enum_mysqlnd_client_option option, const char * const key, const char * const value);
|
||||||
|
@ -548,6 +548,9 @@ typedef enum_func_status (*func_mysqlnd_conn_data__set_client_option_2d)(MYSQLND
|
||||||
typedef unsigned int (*func_mysqlnd_conn_data__negotiate_client_api_capabilities)(MYSQLND_CONN_DATA * const conn, const unsigned int flags);
|
typedef unsigned int (*func_mysqlnd_conn_data__negotiate_client_api_capabilities)(MYSQLND_CONN_DATA * const conn, const unsigned int flags);
|
||||||
typedef unsigned int (*func_mysqlnd_conn_data__get_client_api_capabilities)(const MYSQLND_CONN_DATA * const conn);
|
typedef unsigned int (*func_mysqlnd_conn_data__get_client_api_capabilities)(const MYSQLND_CONN_DATA * const conn);
|
||||||
|
|
||||||
|
typedef MYSQLND_STRING (*func_mysqlnd_conn_data__get_scheme)(MYSQLND_CONN_DATA * conn, MYSQLND_CSTRING hostname, MYSQLND_CSTRING socket_or_pipe, unsigned int port, zend_bool * unix_socket, zend_bool * named_pipe);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
MYSQLND_CLASS_METHODS_TYPE(mysqlnd_conn_data)
|
MYSQLND_CLASS_METHODS_TYPE(mysqlnd_conn_data)
|
||||||
{
|
{
|
||||||
|
@ -637,6 +640,8 @@ MYSQLND_CLASS_METHODS_TYPE(mysqlnd_conn_data)
|
||||||
|
|
||||||
func_mysqlnd_conn_data__negotiate_client_api_capabilities negotiate_client_api_capabilities;
|
func_mysqlnd_conn_data__negotiate_client_api_capabilities negotiate_client_api_capabilities;
|
||||||
func_mysqlnd_conn_data__get_client_api_capabilities get_client_api_capabilities;
|
func_mysqlnd_conn_data__get_client_api_capabilities get_client_api_capabilities;
|
||||||
|
|
||||||
|
func_mysqlnd_conn_data__get_scheme get_scheme;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue