mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
MNDR:
- move the command factory to own file - mysqlnd_commands.c
This commit is contained in:
parent
3f0a542d04
commit
4248240648
9 changed files with 1518 additions and 1456 deletions
|
@ -11,6 +11,7 @@ if (PHP_MYSQLND != "no") {
|
||||||
"mysqlnd_auth.c " +
|
"mysqlnd_auth.c " +
|
||||||
"mysqlnd_block_alloc.c " +
|
"mysqlnd_block_alloc.c " +
|
||||||
"mysqlnd_charset.c " +
|
"mysqlnd_charset.c " +
|
||||||
|
"mysqlnd_commands.c " +
|
||||||
"mysqlnd_debug.c " +
|
"mysqlnd_debug.c " +
|
||||||
"mysqlnd_driver.c " +
|
"mysqlnd_driver.c " +
|
||||||
"mysqlnd_ext_plugin.c " +
|
"mysqlnd_ext_plugin.c " +
|
||||||
|
|
|
@ -21,7 +21,7 @@ if test "$PHP_MYSQLND" != "no" || test "$PHP_MYSQLND_ENABLED" = "yes"; then
|
||||||
mysqlnd_base_sources="mysqlnd.c mysqlnd_alloc.c mysqlnd_charset.c mysqlnd_wireprotocol.c \
|
mysqlnd_base_sources="mysqlnd.c mysqlnd_alloc.c mysqlnd_charset.c mysqlnd_wireprotocol.c \
|
||||||
mysqlnd_loaddata.c mysqlnd_reverse_api.c mysqlnd_vio.c mysqlnd_protocol_frame_codec.c \
|
mysqlnd_loaddata.c mysqlnd_reverse_api.c mysqlnd_vio.c mysqlnd_protocol_frame_codec.c \
|
||||||
mysqlnd_statistics.c mysqlnd_driver.c mysqlnd_ext_plugin.c mysqlnd_auth.c \
|
mysqlnd_statistics.c mysqlnd_driver.c mysqlnd_ext_plugin.c mysqlnd_auth.c \
|
||||||
mysqlnd_result.c mysqlnd_result_meta.c mysqlnd_debug.c\
|
mysqlnd_result.c mysqlnd_result_meta.c mysqlnd_debug.c mysqlnd_commands.c \
|
||||||
mysqlnd_block_alloc.c mysqlnd_plugin.c php_mysqlnd.c"
|
mysqlnd_block_alloc.c mysqlnd_plugin.c php_mysqlnd.c"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1010,8 +1010,7 @@ MYSQLND_METHOD(mysqlnd_conn, connect)(MYSQLND * conn_handle,
|
||||||
const MYSQLND_CSTRING database,
|
const MYSQLND_CSTRING database,
|
||||||
unsigned int port,
|
unsigned int port,
|
||||||
const MYSQLND_CSTRING socket_or_pipe,
|
const MYSQLND_CSTRING socket_or_pipe,
|
||||||
unsigned int mysql_flags
|
unsigned int mysql_flags)
|
||||||
)
|
|
||||||
{
|
{
|
||||||
const size_t this_func = STRUCT_OFFSET(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_conn_data), connect);
|
const size_t this_func = STRUCT_OFFSET(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_conn_data), connect);
|
||||||
enum_func_status ret = FAIL;
|
enum_func_status ret = FAIL;
|
||||||
|
|
1471
ext/mysqlnd/mysqlnd_commands.c
Normal file
1471
ext/mysqlnd/mysqlnd_commands.c
Normal file
File diff suppressed because it is too large
Load diff
34
ext/mysqlnd/mysqlnd_commands.h
Normal file
34
ext/mysqlnd/mysqlnd_commands.h
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
/*
|
||||||
|
+----------------------------------------------------------------------+
|
||||||
|
| PHP Version 7 |
|
||||||
|
+----------------------------------------------------------------------+
|
||||||
|
| Copyright (c) 2006-2015 The PHP Group |
|
||||||
|
+----------------------------------------------------------------------+
|
||||||
|
| 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. |
|
||||||
|
+----------------------------------------------------------------------+
|
||||||
|
| Authors: Andrey Hristov <andrey@mysql.com> |
|
||||||
|
| Ulf Wendel <uwendel@mysql.com> |
|
||||||
|
+----------------------------------------------------------------------+
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef MYSQLND_COMMANDS_H
|
||||||
|
#define MYSQLND_COMMANDS_H
|
||||||
|
|
||||||
|
extern func_mysqlnd__command_factory mysqlnd_command_factory;
|
||||||
|
|
||||||
|
#endif /* MYSQLND_COMMANDS_H */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 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
|
||||||
|
*/
|
|
@ -21,6 +21,7 @@
|
||||||
#include "mysqlnd_priv.h"
|
#include "mysqlnd_priv.h"
|
||||||
#include "mysqlnd_result.h"
|
#include "mysqlnd_result.h"
|
||||||
#include "mysqlnd_debug.h"
|
#include "mysqlnd_debug.h"
|
||||||
|
#include "mysqlnd_commands.h"
|
||||||
#include "mysqlnd_ext_plugin.h"
|
#include "mysqlnd_ext_plugin.h"
|
||||||
|
|
||||||
static struct st_mysqlnd_conn_methods * mysqlnd_conn_methods;
|
static struct st_mysqlnd_conn_methods * mysqlnd_conn_methods;
|
||||||
|
|
|
@ -214,23 +214,6 @@ mysqlnd_auth_change_user(MYSQLND_CONN_DATA * const conn,
|
||||||
size_t * switch_to_auth_protocol_data_len
|
size_t * switch_to_auth_protocol_data_len
|
||||||
);
|
);
|
||||||
|
|
||||||
extern func_mysqlnd__command_factory mysqlnd_command_factory;
|
|
||||||
|
|
||||||
|
|
||||||
enum_func_status
|
|
||||||
send_command_handle_response(
|
|
||||||
const enum mysqlnd_packet_type ok_packet,
|
|
||||||
const zend_bool silent,
|
|
||||||
const enum php_mysqlnd_server_command command,
|
|
||||||
const zend_bool ignore_upsert_status,
|
|
||||||
|
|
||||||
MYSQLND_ERROR_INFO * error_info,
|
|
||||||
MYSQLND_UPSERT_STATUS * upsert_status,
|
|
||||||
MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * payload_decoder_factory,
|
|
||||||
MYSQLND_STRING * last_message,
|
|
||||||
zend_bool last_message_persistent
|
|
||||||
);
|
|
||||||
|
|
||||||
enum_func_status
|
enum_func_status
|
||||||
mysqlnd_connect_run_authentication(
|
mysqlnd_connect_run_authentication(
|
||||||
MYSQLND_CONN_DATA * conn,
|
MYSQLND_CONN_DATA * conn,
|
||||||
|
|
|
@ -536,3 +536,12 @@ mysqlnd_pfc_free(MYSQLND_PFC * const pfc, MYSQLND_STATS * stats, MYSQLND_ERROR_I
|
||||||
}
|
}
|
||||||
/* }}} */
|
/* }}} */
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 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
|
||||||
|
*/
|
||||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue