mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
MNDR
- Rename simple_command* to send_command
This commit is contained in:
parent
0f38d479e1
commit
6051a47776
5 changed files with 49 additions and 49 deletions
|
@ -209,15 +209,15 @@ MYSQLND_METHOD_PRIVATE(mysqlnd_conn_data, dtor)(MYSQLND_CONN_DATA * conn)
|
|||
/* }}} */
|
||||
|
||||
|
||||
/* {{{ mysqlnd_conn_data::simple_command_handle_response */
|
||||
/* {{{ mysqlnd_conn_data::send_command_handle_response */
|
||||
static enum_func_status
|
||||
MYSQLND_METHOD(mysqlnd_conn_data, simple_command_handle_response)(MYSQLND_CONN_DATA * conn, enum mysqlnd_packet_type ok_packet,
|
||||
MYSQLND_METHOD(mysqlnd_conn_data, send_command_handle_response)(MYSQLND_CONN_DATA * conn, enum mysqlnd_packet_type ok_packet,
|
||||
zend_bool silent, enum php_mysqlnd_server_command command,
|
||||
zend_bool ignore_upsert_status)
|
||||
{
|
||||
enum_func_status ret = FAIL;
|
||||
|
||||
DBG_ENTER("mysqlnd_conn_data::simple_command_handle_response");
|
||||
DBG_ENTER("mysqlnd_conn_data::send_command_handle_response");
|
||||
DBG_INF_FMT("silent=%u packet=%u command=%s", silent, ok_packet, mysqlnd_command_to_text[command]);
|
||||
|
||||
switch (ok_packet) {
|
||||
|
@ -311,13 +311,13 @@ MYSQLND_METHOD(mysqlnd_conn_data, simple_command_handle_response)(MYSQLND_CONN_D
|
|||
|
||||
/* {{{ mysqlnd_conn_data::simple_command_send_request */
|
||||
static enum_func_status
|
||||
MYSQLND_METHOD(mysqlnd_conn_data, simple_command_send_request)(MYSQLND_CONN_DATA * conn, enum php_mysqlnd_server_command command,
|
||||
MYSQLND_METHOD(mysqlnd_conn_data, send_command_do_request)(MYSQLND_CONN_DATA * conn, enum php_mysqlnd_server_command command,
|
||||
const zend_uchar * const arg, size_t arg_len, zend_bool silent, zend_bool ignore_upsert_status)
|
||||
{
|
||||
enum_func_status ret = PASS;
|
||||
MYSQLND_PACKET_COMMAND * cmd_packet;
|
||||
|
||||
DBG_ENTER("mysqlnd_conn_data::simple_command_send_request");
|
||||
DBG_ENTER("mysqlnd_conn_data::send_command_do_request");
|
||||
DBG_INF_FMT("command=%s silent=%u", mysqlnd_command_to_text[command], silent);
|
||||
DBG_INF_FMT("conn->server_status=%u", conn->upsert_status->server_status);
|
||||
DBG_INF_FMT("sending %u bytes", arg_len + 1); /* + 1 is for the command */
|
||||
|
@ -370,16 +370,16 @@ MYSQLND_METHOD(mysqlnd_conn_data, simple_command_send_request)(MYSQLND_CONN_DATA
|
|||
|
||||
/* {{{ mysqlnd_conn_data::simple_command */
|
||||
static enum_func_status
|
||||
MYSQLND_METHOD(mysqlnd_conn_data, simple_command)(MYSQLND_CONN_DATA * conn, enum php_mysqlnd_server_command command,
|
||||
MYSQLND_METHOD(mysqlnd_conn_data, send_command)(MYSQLND_CONN_DATA * conn, enum php_mysqlnd_server_command command,
|
||||
const zend_uchar * const arg, size_t arg_len, enum mysqlnd_packet_type ok_packet, zend_bool silent,
|
||||
zend_bool ignore_upsert_status)
|
||||
{
|
||||
enum_func_status ret;
|
||||
DBG_ENTER("mysqlnd_conn_data::simple_command");
|
||||
DBG_ENTER("mysqlnd_conn_data::send_command");
|
||||
|
||||
ret = conn->m->simple_command_send_request(conn, command, arg, arg_len, silent, ignore_upsert_status);
|
||||
ret = conn->m->send_command_do_request(conn, command, arg, arg_len, silent, ignore_upsert_status);
|
||||
if (PASS == ret && ok_packet != PROT_LAST) {
|
||||
ret = conn->m->simple_command_handle_response(conn, ok_packet, silent, command, ignore_upsert_status);
|
||||
ret = conn->m->send_command_handle_response(conn, ok_packet, silent, command, ignore_upsert_status);
|
||||
}
|
||||
|
||||
DBG_INF(ret == PASS ? "PASS":"FAIL");
|
||||
|
@ -399,7 +399,7 @@ MYSQLND_METHOD(mysqlnd_conn_data, set_server_option)(MYSQLND_CONN_DATA * const c
|
|||
if (PASS == conn->m->local_tx_start(conn, this_func)) {
|
||||
|
||||
int2store(buffer, (unsigned int) option);
|
||||
ret = conn->m->simple_command(conn, COM_SET_OPTION, buffer, sizeof(buffer), PROT_EOF_PACKET, FALSE, TRUE);
|
||||
ret = conn->m->send_command(conn, COM_SET_OPTION, buffer, sizeof(buffer), PROT_EOF_PACKET, FALSE, TRUE);
|
||||
|
||||
conn->m->local_tx_end(conn, this_func, ret);
|
||||
}
|
||||
|
@ -1230,7 +1230,7 @@ MYSQLND_METHOD(mysqlnd_conn_data, send_query)(MYSQLND_CONN_DATA * conn, const ch
|
|||
DBG_INF_FMT("conn->server_status=%u", conn->upsert_status->server_status);
|
||||
|
||||
if (PASS == conn->m->local_tx_start(conn, this_func)) {
|
||||
ret = conn->m->simple_command(conn, COM_QUERY, (zend_uchar *) query, query_len,
|
||||
ret = conn->m->send_command(conn, COM_QUERY, (zend_uchar *) query, query_len,
|
||||
PROT_LAST /* we will handle the OK packet*/,
|
||||
FALSE, FALSE);
|
||||
if (PASS == ret) {
|
||||
|
@ -1497,7 +1497,7 @@ MYSQLND_METHOD(mysqlnd_conn_data, list_fields)(MYSQLND_CONN_DATA * conn, const c
|
|||
*p++ = '\0';
|
||||
}
|
||||
|
||||
if (PASS != conn->m->simple_command(conn, COM_FIELD_LIST, buff, p - buff,
|
||||
if (PASS != conn->m->send_command(conn, COM_FIELD_LIST, buff, p - buff,
|
||||
PROT_LAST /* we will handle the OK packet*/,
|
||||
FALSE, TRUE)) {
|
||||
conn->m->local_tx_end(conn, 0, FAIL);
|
||||
|
@ -1672,7 +1672,7 @@ MYSQLND_METHOD(mysqlnd_conn_data, dump_debug_info)(MYSQLND_CONN_DATA * const con
|
|||
DBG_ENTER("mysqlnd_conn_data::dump_debug_info");
|
||||
DBG_INF_FMT("conn=%llu", conn->thread_id);
|
||||
if (PASS == conn->m->local_tx_start(conn, this_func)) {
|
||||
ret = conn->m->simple_command(conn, COM_DEBUG, NULL, 0, PROT_EOF_PACKET, FALSE, TRUE);
|
||||
ret = conn->m->send_command(conn, COM_DEBUG, NULL, 0, PROT_EOF_PACKET, FALSE, TRUE);
|
||||
|
||||
conn->m->local_tx_end(conn, this_func, ret);
|
||||
}
|
||||
|
@ -1693,7 +1693,7 @@ MYSQLND_METHOD(mysqlnd_conn_data, select_db)(MYSQLND_CONN_DATA * const conn, con
|
|||
DBG_INF_FMT("conn=%llu db=%s", conn->thread_id, db);
|
||||
|
||||
if (PASS == conn->m->local_tx_start(conn, this_func)) {
|
||||
ret = conn->m->simple_command(conn, COM_INIT_DB, (zend_uchar*) db, db_len, PROT_OK_PACKET, FALSE, TRUE);
|
||||
ret = conn->m->send_command(conn, COM_INIT_DB, (zend_uchar*) db, db_len, PROT_OK_PACKET, FALSE, TRUE);
|
||||
/*
|
||||
The server sends 0 but libmysql doesn't read it and has established
|
||||
a protocol of giving back -1. Thus we have to follow it :(
|
||||
|
@ -1729,7 +1729,7 @@ MYSQLND_METHOD(mysqlnd_conn_data, ping)(MYSQLND_CONN_DATA * const conn)
|
|||
DBG_INF_FMT("conn=%llu", conn->thread_id);
|
||||
|
||||
if (PASS == conn->m->local_tx_start(conn, this_func)) {
|
||||
ret = conn->m->simple_command(conn, COM_PING, NULL, 0, PROT_OK_PACKET, TRUE, TRUE);
|
||||
ret = conn->m->send_command(conn, COM_PING, NULL, 0, PROT_OK_PACKET, TRUE, TRUE);
|
||||
/*
|
||||
The server sends 0 but libmysql doesn't read it and has established
|
||||
a protocol of giving back -1. Thus we have to follow it :(
|
||||
|
@ -1757,7 +1757,7 @@ MYSQLND_METHOD(mysqlnd_conn_data, statistic)(MYSQLND_CONN_DATA * conn, zend_stri
|
|||
|
||||
if (PASS == conn->m->local_tx_start(conn, this_func)) {
|
||||
do {
|
||||
ret = conn->m->simple_command(conn, COM_STATISTICS, NULL, 0, PROT_LAST, FALSE, TRUE);
|
||||
ret = conn->m->send_command(conn, COM_STATISTICS, NULL, 0, PROT_LAST, FALSE, TRUE);
|
||||
if (FAIL == ret) {
|
||||
break;
|
||||
}
|
||||
|
@ -1798,13 +1798,13 @@ MYSQLND_METHOD(mysqlnd_conn_data, kill)(MYSQLND_CONN_DATA * conn, unsigned int p
|
|||
|
||||
/* If we kill ourselves don't expect OK packet, PROT_LAST will skip it */
|
||||
if (pid != conn->thread_id) {
|
||||
ret = conn->m->simple_command(conn, COM_PROCESS_KILL, buff, 4, PROT_OK_PACKET, FALSE, TRUE);
|
||||
ret = conn->m->send_command(conn, COM_PROCESS_KILL, buff, 4, PROT_OK_PACKET, FALSE, TRUE);
|
||||
/*
|
||||
The server sends 0 but libmysql doesn't read it and has established
|
||||
a protocol of giving back -1. Thus we have to follow it :(
|
||||
*/
|
||||
SET_ERROR_AFF_ROWS(conn);
|
||||
} else if (PASS == (ret = conn->m->simple_command(conn, COM_PROCESS_KILL, buff, 4, PROT_LAST, FALSE, TRUE))) {
|
||||
} else if (PASS == (ret = conn->m->send_command(conn, COM_PROCESS_KILL, buff, 4, PROT_LAST, FALSE, TRUE))) {
|
||||
CONN_SET_STATE(conn, CONN_QUIT_SENT);
|
||||
conn->m->send_close(conn);
|
||||
}
|
||||
|
@ -1868,7 +1868,7 @@ MYSQLND_METHOD(mysqlnd_conn_data, refresh)(MYSQLND_CONN_DATA * const conn, uint8
|
|||
if (PASS == conn->m->local_tx_start(conn, this_func)) {
|
||||
int1store(bits, options);
|
||||
|
||||
ret = conn->m->simple_command(conn, COM_REFRESH, bits, 1, PROT_OK_PACKET, FALSE, TRUE);
|
||||
ret = conn->m->send_command(conn, COM_REFRESH, bits, 1, PROT_OK_PACKET, FALSE, TRUE);
|
||||
|
||||
conn->m->local_tx_end(conn, this_func, ret);
|
||||
}
|
||||
|
@ -1890,7 +1890,7 @@ MYSQLND_METHOD(mysqlnd_conn_data, shutdown)(MYSQLND_CONN_DATA * const conn, uint
|
|||
if (PASS == conn->m->local_tx_start(conn, this_func)) {
|
||||
int1store(bits, level);
|
||||
|
||||
ret = conn->m->simple_command(conn, COM_SHUTDOWN, bits, 1, PROT_OK_PACKET, FALSE, TRUE);
|
||||
ret = conn->m->send_command(conn, COM_SHUTDOWN, bits, 1, PROT_OK_PACKET, FALSE, TRUE);
|
||||
|
||||
conn->m->local_tx_end(conn, this_func, ret);
|
||||
}
|
||||
|
@ -1923,7 +1923,7 @@ MYSQLND_METHOD(mysqlnd_conn_data, send_close)(MYSQLND_CONN_DATA * const conn)
|
|||
case CONN_READY:
|
||||
DBG_INF("Connection clean, sending COM_QUIT");
|
||||
if (net_stream) {
|
||||
ret = conn->m->simple_command(conn, COM_QUIT, NULL, 0, PROT_LAST, TRUE, TRUE);
|
||||
ret = conn->m->send_command(conn, COM_QUIT, NULL, 0, PROT_LAST, TRUE, TRUE);
|
||||
net->data->m.close_stream(net, conn->stats, conn->error_info);
|
||||
}
|
||||
CONN_SET_STATE(conn, CONN_QUIT_SENT);
|
||||
|
@ -3056,8 +3056,8 @@ MYSQLND_CLASS_METHODS_START(mysqlnd_conn_data)
|
|||
MYSQLND_METHOD_PRIVATE(mysqlnd_conn_data, get_state),
|
||||
MYSQLND_METHOD_PRIVATE(mysqlnd_conn_data, set_state),
|
||||
|
||||
MYSQLND_METHOD(mysqlnd_conn_data, simple_command),
|
||||
MYSQLND_METHOD(mysqlnd_conn_data, simple_command_handle_response),
|
||||
MYSQLND_METHOD(mysqlnd_conn_data, send_command),
|
||||
MYSQLND_METHOD(mysqlnd_conn_data, send_command_handle_response),
|
||||
MYSQLND_METHOD(mysqlnd_conn_data, restart_psession),
|
||||
MYSQLND_METHOD(mysqlnd_conn_data, end_psession),
|
||||
MYSQLND_METHOD(mysqlnd_conn_data, send_close),
|
||||
|
@ -3078,7 +3078,7 @@ MYSQLND_CLASS_METHODS_START(mysqlnd_conn_data)
|
|||
MYSQLND_METHOD(mysqlnd_conn_data, execute_init_commands),
|
||||
MYSQLND_METHOD(mysqlnd_conn_data, get_updated_connect_flags),
|
||||
MYSQLND_METHOD(mysqlnd_conn_data, connect_handshake),
|
||||
MYSQLND_METHOD(mysqlnd_conn_data, simple_command_send_request),
|
||||
MYSQLND_METHOD(mysqlnd_conn_data, send_command_do_request),
|
||||
MYSQLND_METHOD(mysqlnd_conn_data, fetch_auth_plugin_by_name),
|
||||
|
||||
MYSQLND_METHOD(mysqlnd_conn_data, set_client_option_2d),
|
||||
|
|
|
@ -212,7 +212,7 @@ mysqlnd_handle_local_infile(MYSQLND_CONN_DATA * conn, const char * filename, zen
|
|||
|
||||
infile_error:
|
||||
/* get response from server and update upsert values */
|
||||
if (FAIL == conn->m->simple_command_handle_response(conn, PROT_OK_PACKET, FALSE, COM_QUERY, FALSE)) {
|
||||
if (FAIL == conn->m->send_command_handle_response(conn, PROT_OK_PACKET, FALSE, COM_QUERY, FALSE)) {
|
||||
result = FAIL;
|
||||
}
|
||||
|
||||
|
|
|
@ -417,7 +417,7 @@ MYSQLND_METHOD(mysqlnd_stmt, prepare)(MYSQLND_STMT * const s, const char * const
|
|||
stmt_to_prepare = s_to_prepare->data;
|
||||
}
|
||||
|
||||
if (FAIL == stmt_to_prepare->conn->m->simple_command(stmt_to_prepare->conn, COM_STMT_PREPARE, (const zend_uchar *) query, query_len, PROT_LAST, FALSE, TRUE) ||
|
||||
if (FAIL == stmt_to_prepare->conn->m->send_command(stmt_to_prepare->conn, COM_STMT_PREPARE, (const zend_uchar *) query, query_len, PROT_LAST, FALSE, TRUE) ||
|
||||
FAIL == mysqlnd_stmt_read_prepare_response(s_to_prepare))
|
||||
{
|
||||
goto fail;
|
||||
|
@ -723,9 +723,9 @@ MYSQLND_METHOD(mysqlnd_stmt, send_execute)(MYSQLND_STMT * const s, enum_mysqlnd_
|
|||
ret = s->m->generate_execute_request(s, &request, &request_len, &free_request);
|
||||
if (ret == PASS) {
|
||||
/* support for buffer types should be added here ! */
|
||||
ret = stmt->conn->m->simple_command(stmt->conn, COM_STMT_EXECUTE, request, request_len,
|
||||
PROT_LAST /* we will handle the response packet*/,
|
||||
FALSE, FALSE);
|
||||
ret = stmt->conn->m->send_command(stmt->conn, COM_STMT_EXECUTE, request, request_len,
|
||||
PROT_LAST /* we will handle the response packet*/,
|
||||
FALSE, FALSE);
|
||||
} else {
|
||||
SET_STMT_ERROR(stmt, CR_UNKNOWN_ERROR, UNKNOWN_SQLSTATE, "Couldn't generate the request. Possibly OOM.");
|
||||
}
|
||||
|
@ -1057,9 +1057,9 @@ mysqlnd_fetch_stmt_row_cursor(MYSQLND_RES * result, void * param, unsigned int f
|
|||
int4store(buf, stmt->stmt_id);
|
||||
int4store(buf + STMT_ID_LENGTH, 1); /* for now fetch only one row */
|
||||
|
||||
if (FAIL == stmt->conn->m->simple_command(stmt->conn, COM_STMT_FETCH, buf, sizeof(buf),
|
||||
PROT_LAST /* we will handle the response packet*/,
|
||||
FALSE, TRUE)) {
|
||||
if (FAIL == stmt->conn->m->send_command(stmt->conn, COM_STMT_FETCH, buf, sizeof(buf),
|
||||
PROT_LAST /* we will handle the response packet*/,
|
||||
FALSE, TRUE)) {
|
||||
COPY_CLIENT_ERROR(*stmt->error_info, *stmt->conn->error_info);
|
||||
DBG_RETURN(FAIL);
|
||||
}
|
||||
|
@ -1264,9 +1264,9 @@ MYSQLND_METHOD(mysqlnd_stmt, reset)(MYSQLND_STMT * const s)
|
|||
|
||||
int4store(cmd_buf, stmt->stmt_id);
|
||||
if (CONN_GET_STATE(conn) == CONN_READY &&
|
||||
FAIL == (ret = conn->m->simple_command(conn, COM_STMT_RESET, cmd_buf,
|
||||
sizeof(cmd_buf), PROT_OK_PACKET,
|
||||
FALSE, TRUE))) {
|
||||
FAIL == (ret = conn->m->send_command(conn, COM_STMT_RESET, cmd_buf,
|
||||
sizeof(cmd_buf), PROT_OK_PACKET,
|
||||
FALSE, TRUE))) {
|
||||
COPY_CLIENT_ERROR(*stmt->error_info, *conn->error_info);
|
||||
}
|
||||
*stmt->upsert_status = *conn->upsert_status;
|
||||
|
@ -1362,7 +1362,7 @@ MYSQLND_METHOD(mysqlnd_stmt, send_long_data)(MYSQLND_STMT * const s, unsigned in
|
|||
XXX: Unfortunately we have to allocate additional buffer to be able the
|
||||
additional data, which is like a header inside the payload.
|
||||
This should be optimised, but it will be a pervasive change, so
|
||||
conn->m->simple_command() will accept not a buffer, but actually MYSQLND_STRING*
|
||||
conn->m->send_command() will accept not a buffer, but actually MYSQLND_STRING*
|
||||
terminated by NULL, to send. If the strings are not big, we can collapse them
|
||||
on the buffer every connection has, but otherwise we will just send them
|
||||
one by one to the wire.
|
||||
|
@ -1379,7 +1379,7 @@ MYSQLND_METHOD(mysqlnd_stmt, send_long_data)(MYSQLND_STMT * const s, unsigned in
|
|||
memcpy(cmd_buf + STMT_ID_LENGTH + 2, data, length);
|
||||
|
||||
/* COM_STMT_SEND_LONG_DATA doesn't send an OK packet*/
|
||||
ret = conn->m->simple_command(conn, cmd, cmd_buf, packet_len, PROT_LAST , FALSE, TRUE);
|
||||
ret = conn->m->send_command(conn, cmd, cmd_buf, packet_len, PROT_LAST , FALSE, TRUE);
|
||||
mnd_efree(cmd_buf);
|
||||
if (FAIL == ret) {
|
||||
COPY_CLIENT_ERROR(*stmt->error_info, *conn->error_info);
|
||||
|
@ -2199,9 +2199,9 @@ MYSQLND_METHOD_PRIVATE(mysqlnd_stmt, net_close)(MYSQLND_STMT * const s, zend_boo
|
|||
|
||||
int4store(cmd_buf, stmt->stmt_id);
|
||||
if (CONN_GET_STATE(conn) == CONN_READY &&
|
||||
FAIL == conn->m->simple_command(conn, COM_STMT_CLOSE, cmd_buf, sizeof(cmd_buf),
|
||||
PROT_LAST /* COM_STMT_CLOSE doesn't send an OK packet*/,
|
||||
FALSE, TRUE)) {
|
||||
FAIL == conn->m->send_command(conn, COM_STMT_CLOSE, cmd_buf, sizeof(cmd_buf),
|
||||
PROT_LAST /* COM_STMT_CLOSE doesn't send an OK packet*/,
|
||||
FALSE, TRUE)) {
|
||||
COPY_CLIENT_ERROR(*stmt->error_info, *conn->error_info);
|
||||
DBG_RETURN(FAIL);
|
||||
}
|
||||
|
|
|
@ -473,8 +473,8 @@ typedef enum_func_status (*func_mysqlnd_conn_data__free_reference)(MYSQLND_CONN_
|
|||
typedef enum mysqlnd_connection_state (*func_mysqlnd_conn_data__get_state)(const MYSQLND_CONN_DATA * const conn);
|
||||
typedef void (*func_mysqlnd_conn_data__set_state)(MYSQLND_CONN_DATA * const conn, enum mysqlnd_connection_state new_state);
|
||||
|
||||
typedef enum_func_status (*func_mysqlnd_conn_data__simple_command)(MYSQLND_CONN_DATA * conn, enum php_mysqlnd_server_command command, const zend_uchar * const arg, size_t arg_len, enum mysqlnd_packet_type ok_packet, zend_bool silent, zend_bool ignore_upsert_status);
|
||||
typedef enum_func_status (*func_mysqlnd_conn_data__simple_command_handle_response)(MYSQLND_CONN_DATA * conn, enum mysqlnd_packet_type ok_packet, zend_bool silent, enum php_mysqlnd_server_command command, zend_bool ignore_upsert_status);
|
||||
typedef enum_func_status (*func_mysqlnd_conn_data__send_command)(MYSQLND_CONN_DATA * conn, enum php_mysqlnd_server_command command, const zend_uchar * const arg, size_t arg_len, enum mysqlnd_packet_type ok_packet, zend_bool silent, zend_bool ignore_upsert_status);
|
||||
typedef enum_func_status (*func_mysqlnd_conn_data__send_command_handle_response)(MYSQLND_CONN_DATA * conn, enum mysqlnd_packet_type ok_packet, zend_bool silent, enum php_mysqlnd_server_command command, zend_bool ignore_upsert_status);
|
||||
|
||||
typedef enum_func_status (*func_mysqlnd_conn_data__restart_psession)(MYSQLND_CONN_DATA * conn);
|
||||
typedef enum_func_status (*func_mysqlnd_conn_data__end_psession)(MYSQLND_CONN_DATA * conn);
|
||||
|
@ -498,7 +498,7 @@ typedef enum_func_status (*func_mysqlnd_conn_data__local_tx_end)(MYSQLND_CONN_DA
|
|||
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 enum_func_status (*func_mysqlnd_conn_data__connect_handshake)(MYSQLND_CONN_DATA * conn, const char * const host, const char * const user, const char * const passwd, const unsigned int passwd_len, const char * const db, const unsigned int db_len, const unsigned int mysql_flags);
|
||||
typedef enum_func_status (*func_mysqlnd_conn_data__simple_command_send_request)(MYSQLND_CONN_DATA * conn, enum php_mysqlnd_server_command command, const zend_uchar * const arg, size_t arg_len, zend_bool silent, zend_bool ignore_upsert_status);
|
||||
typedef enum_func_status (*func_mysqlnd_conn_data__send_command_do_request)(MYSQLND_CONN_DATA * conn, enum php_mysqlnd_server_command command, const zend_uchar * const arg, size_t arg_len, zend_bool silent, zend_bool ignore_upsert_status);
|
||||
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_option option, const char * const key, const char * const value);
|
||||
|
@ -570,8 +570,8 @@ struct st_mysqlnd_conn_data_methods
|
|||
func_mysqlnd_conn_data__get_state get_state;
|
||||
func_mysqlnd_conn_data__set_state set_state;
|
||||
|
||||
func_mysqlnd_conn_data__simple_command simple_command;
|
||||
func_mysqlnd_conn_data__simple_command_handle_response simple_command_handle_response;
|
||||
func_mysqlnd_conn_data__send_command send_command;
|
||||
func_mysqlnd_conn_data__send_command_handle_response send_command_handle_response;
|
||||
|
||||
func_mysqlnd_conn_data__restart_psession restart_psession;
|
||||
func_mysqlnd_conn_data__end_psession end_psession;
|
||||
|
@ -595,7 +595,7 @@ struct st_mysqlnd_conn_data_methods
|
|||
func_mysqlnd_conn_data__execute_init_commands execute_init_commands;
|
||||
func_mysqlnd_conn_data__get_updated_connect_flags get_updated_connect_flags;
|
||||
func_mysqlnd_conn_data__connect_handshake connect_handshake;
|
||||
func_mysqlnd_conn_data__simple_command_send_request simple_command_send_request;
|
||||
func_mysqlnd_conn_data__send_command_do_request send_command_do_request;
|
||||
func_mysqlnd_conn_data__fetch_auth_plugin_by_name fetch_auth_plugin_by_name;
|
||||
|
||||
func_mysqlnd_conn_data__set_client_option_2d set_client_option_2d;
|
||||
|
|
|
@ -643,9 +643,9 @@ size_t php_mysqlnd_auth_write(void * _packet, MYSQLND_CONN_DATA * conn)
|
|||
}
|
||||
}
|
||||
if (packet->is_change_user_packet) {
|
||||
if (PASS != conn->m->simple_command(conn, COM_CHANGE_USER, buffer + MYSQLND_HEADER_SIZE, p - buffer - MYSQLND_HEADER_SIZE,
|
||||
PROT_LAST /* the caller will handle the OK packet */,
|
||||
packet->silent, TRUE)) {
|
||||
if (PASS != conn->m->send_command(conn, COM_CHANGE_USER, buffer + MYSQLND_HEADER_SIZE, p - buffer - MYSQLND_HEADER_SIZE,
|
||||
PROT_LAST /* the caller will handle the OK packet */,
|
||||
packet->silent, TRUE)) {
|
||||
DBG_RETURN(0);
|
||||
}
|
||||
DBG_RETURN(p - buffer - MYSQLND_HEADER_SIZE);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue