Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 0 additions & 25 deletions ext/mysqli/mysqli.c
Original file line number Diff line number Diff line change
Expand Up @@ -396,29 +396,6 @@ PHP_MYSQLI_EXPORT(zend_object *) mysqli_objects_new(zend_class_entry *class_type
}
/* }}} */

#include "ext/mysqlnd/mysqlnd_reverse_api.h"
static MYSQLND *mysqli_convert_zv_to_mysqlnd(zval * zv)
{
if (Z_TYPE_P(zv) == IS_OBJECT && instanceof_function(Z_OBJCE_P(zv), mysqli_link_class_entry)) {
MY_MYSQL *mysql;
MYSQLI_RESOURCE *my_res;
mysqli_object *intern = Z_MYSQLI_P(zv);
if (!(my_res = (MYSQLI_RESOURCE *)intern->ptr)) {
/* We know that we have a mysqli object, so this failure should be emitted */
zend_throw_error(NULL, "%s object is already closed", ZSTR_VAL(intern->zo.ce->name));
return NULL;
}
mysql = (MY_MYSQL *)(my_res->ptr);
return mysql ? mysql->mysql : NULL;
}
return NULL;
}

static const MYSQLND_REVERSE_API mysqli_reverse_api = {
&mysqli_module_entry,
mysqli_convert_zv_to_mysqlnd
};

static PHP_INI_MH(OnUpdateDefaultPort)
{
zend_long value = ZEND_ATOL(ZSTR_VAL(new_value));
Expand Down Expand Up @@ -541,8 +518,6 @@ PHP_MINIT_FUNCTION(mysqli)

register_mysqli_symbols(module_number);

mysqlnd_reverse_api_register_api(&mysqli_reverse_api);

return SUCCESS;
}
/* }}} */
Expand Down
1 change: 0 additions & 1 deletion ext/mysqlnd/config.w32
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ if (PHP_MYSQLND != "no") {
"mysqlnd_driver.c " +
"mysqlnd_ext_plugin.c " +
"mysqlnd_loaddata.c " +
"mysqlnd_reverse_api.c " +
"mysqlnd_plugin.c " +
"mysqlnd_protocol_frame_codec.c " +
"mysqlnd_ps.c " +
Expand Down
1 change: 0 additions & 1 deletion ext/mysqlnd/config9.m4
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ if test "$PHP_MYSQLND" != "no" || test "$PHP_MYSQLND_ENABLED" = "yes"; then
mysqlnd_read_buffer.c
mysqlnd_result_meta.c
mysqlnd_result.c
mysqlnd_reverse_api.c
mysqlnd_statistics.c
mysqlnd_vio.c
mysqlnd_wireprotocol.c
Expand Down
4 changes: 0 additions & 4 deletions ext/mysqlnd/mysqlnd_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#include "mysqlnd_priv.h"
#include "mysqlnd_statistics.h"
#include "mysqlnd_debug.h"
#include "mysqlnd_reverse_api.h"
#include "mysqlnd_ext_plugin.h"

static bool mysqlnd_library_initted = FALSE;
Expand Down Expand Up @@ -59,7 +58,6 @@ PHPAPI void mysqlnd_library_end(void)
mysqlnd_stats_end(mysqlnd_global_stats, 1);
mysqlnd_global_stats = NULL;
mysqlnd_library_initted = FALSE;
mysqlnd_reverse_api_end();
}
}
/* }}} */
Expand All @@ -86,8 +84,6 @@ PHPAPI void mysqlnd_library_init(void)
mysqlnd_debug_trace_plugin_register();
mysqlnd_register_builtin_authentication_plugins();

mysqlnd_reverse_api_init();

#if MYSQLND_CHARSETS_SANITY_CHECK == 1
void mysqlnd_charsets_sanity_check(void);
mysqlnd_charsets_sanity_check();
Expand Down
83 changes: 0 additions & 83 deletions ext/mysqlnd/mysqlnd_reverse_api.c

This file was deleted.

36 changes: 0 additions & 36 deletions ext/mysqlnd/mysqlnd_reverse_api.h

This file was deleted.

23 changes: 0 additions & 23 deletions ext/mysqlnd/php_mysqlnd.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#include "mysqlnd_priv.h"
#include "mysqlnd_debug.h"
#include "mysqlnd_statistics.h"
#include "mysqlnd_reverse_api.h"
#include "ext/standard/info.h"
#include "zend_smart_str.h"

Expand Down Expand Up @@ -59,23 +58,6 @@ mysqlnd_minfo_dump_loaded_plugins(zval *el, void * buf)
/* }}} */


/* {{{ mysqlnd_minfo_dump_api_plugins */
static void
mysqlnd_minfo_dump_api_plugins(smart_str * buffer)
{
HashTable *ht = mysqlnd_reverse_api_get_api_list();
MYSQLND_REVERSE_API *ext;

ZEND_HASH_MAP_FOREACH_PTR(ht, ext) {
if (buffer->s) {
smart_str_appendc(buffer, ',');
}
smart_str_appends(buffer, ext->module->name);
} ZEND_HASH_FOREACH_END();
}
/* }}} */


/* {{{ PHP_MINFO_FUNCTION */
PHP_MINFO_FUNCTION(mysqlnd)
{
Expand Down Expand Up @@ -120,11 +102,6 @@ PHP_MINFO_FUNCTION(mysqlnd)
smart_str_0(&tmp_str);
php_info_print_table_row(2, "Loaded plugins", tmp_str.s? ZSTR_VAL(tmp_str.s) : "");
smart_str_free(&tmp_str);

mysqlnd_minfo_dump_api_plugins(&tmp_str);
smart_str_0(&tmp_str);
php_info_print_table_row(2, "API Extensions", tmp_str.s? ZSTR_VAL(tmp_str.s) : "");
smart_str_free(&tmp_str);
}

php_info_print_table_end();
Expand Down
29 changes: 0 additions & 29 deletions ext/pdo_mysql/pdo_mysql.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,31 +59,6 @@ ZEND_DECLARE_MODULE_GLOBALS(pdo_mysql)
# endif
#endif

#ifdef PDO_USE_MYSQLND
#include "ext/mysqlnd/mysqlnd_reverse_api.h"
static MYSQLND * pdo_mysql_convert_zv_to_mysqlnd(zval * zv)
{
if (Z_TYPE_P(zv) == IS_OBJECT && instanceof_function(Z_OBJCE_P(zv), php_pdo_get_dbh_ce())) {
pdo_dbh_t * dbh = Z_PDO_DBH_P(zv);

ZEND_ASSERT(dbh);

if (dbh->driver != &pdo_mysql_driver) {
php_error_docref(NULL, E_WARNING, "Provided PDO instance is not using MySQL but %s", dbh->driver->driver_name);
return NULL;
}

return ((pdo_mysql_db_handle *)dbh->driver_data)->server;
}
return NULL;
}

static const MYSQLND_REVERSE_API pdo_mysql_reverse_api = {
&pdo_mysql_module_entry,
pdo_mysql_convert_zv_to_mysqlnd
};
#endif

/* Returns the number of SQL warnings during the execution of the last statement */
PHP_METHOD(Pdo_Mysql, getWarningCount)
{
Expand Down Expand Up @@ -148,10 +123,6 @@ static PHP_MINIT_FUNCTION(pdo_mysql)
REGISTER_PDO_MYSQL_CLASS_CONST_LONG_DEPRECATED_ALIAS_85("ATTR_LOCAL_INFILE_DIRECTORY", (zend_long)PDO_MYSQL_ATTR_LOCAL_INFILE_DIRECTORY);
#endif

#ifdef PDO_USE_MYSQLND
mysqlnd_reverse_api_register_api(&pdo_mysql_reverse_api);
#endif

pdo_mysql_ce = register_class_Pdo_Mysql(pdo_dbh_ce);
pdo_mysql_ce->create_object = pdo_dbh_new;

Expand Down
Loading