summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Hristov <andrey@php.net>2007-12-28 15:38:23 +0000
committerAndrey Hristov <andrey@php.net>2007-12-28 15:38:23 +0000
commitd265efd570608d5a262687b5c3b04947d9607d21 (patch)
tree573dceecf5bf929628cf24b732eeb94a577285b0
parentd107ebec5845316efb67786db4c283af89c23a66 (diff)
downloadphp-git-d265efd570608d5a262687b5c3b04947d9607d21.tar.gz
Remove RPL functions. They were always experimental and lead to crashes.
The underlying functions will be removed from libmysql as of MySQL 6.0, so it's right time to remove them.
-rw-r--r--ext/mysqli/config.m42
-rw-r--r--ext/mysqli/config.w324
-rw-r--r--ext/mysqli/mysqli_fe.c23
-rw-r--r--ext/mysqli/mysqli_repl.c223
-rw-r--r--ext/mysqli/php_mysqli_structs.h10
-rw-r--r--ext/mysqli/tests/mysqli_disable_rpl_parse.phpt41
-rw-r--r--ext/mysqli/tests/mysqli_enable_rpl_parse.phpt41
-rwxr-xr-xext/mysqli/tests/mysqli_rpl_parse_enabled.phpt46
-rwxr-xr-xext/mysqli/tests/mysqli_rpl_probe.phpt46
-rwxr-xr-xext/mysqli/tests/mysqli_rpl_query_type.phpt50
10 files changed, 1 insertions, 485 deletions
diff --git a/ext/mysqli/config.m4 b/ext/mysqli/config.m4
index df4e1650df..e3e619d93d 100644
--- a/ext/mysqli/config.m4
+++ b/ext/mysqli/config.m4
@@ -61,8 +61,6 @@ elif test "$PHP_MYSQLI" != "no"; then
],[
$MYSQLI_LIBLINE
])
-
- mysqli_extra_sources="$mysqli_extra_sources mysqli_repl.c"
fi
dnl Build extension
diff --git a/ext/mysqli/config.w32 b/ext/mysqli/config.w32
index 0f418f0cba..4e269778e8 100644
--- a/ext/mysqli/config.w32
+++ b/ext/mysqli/config.w32
@@ -26,9 +26,7 @@ if (PHP_MYSQLI != "no") {
CHECK_HEADER_ADD_INCLUDE("mysql.h", "CFLAGS_MYSQLI", PHP_MYSQLI +
"\\include;" + PHP_PHP_BUILD +
"\\include\\mysql;" + PHP_MYSQLI)) {
- // No "mysqli_repl.c" when using "mysqlnd"
- mysqli_extra_sources = "mysqli_repl.c";
- EXTENSION("mysqli", mysqli_source + " " + mysqli_extra_sources);
+ EXTENSION("mysqli", mysqli_source);
AC_DEFINE('HAVE_MYSQLILIB', 1, 'Have MySQLi library');
} else {
WARNING("mysqli not enabled; libraries and headers not found");
diff --git a/ext/mysqli/mysqli_fe.c b/ext/mysqli/mysqli_fe.c
index 19a0412505..6ddc43637b 100644
--- a/ext/mysqli/mysqli_fe.c
+++ b/ext/mysqli/mysqli_fe.c
@@ -65,18 +65,6 @@ const zend_function_entry mysqli_functions[] = {
PHP_FE(mysqli_data_seek, NULL)
PHP_FE(mysqli_dump_debug_info, NULL)
PHP_FE(mysqli_debug, NULL)
-#if !defined(HAVE_MYSQLND)
- PHP_FE(mysqli_disable_reads_from_master, NULL)
- PHP_FE(mysqli_disable_rpl_parse, NULL)
- PHP_FE(mysqli_enable_reads_from_master, NULL)
- PHP_FE(mysqli_enable_rpl_parse, NULL)
- PHP_FE(mysqli_send_query, NULL)
- PHP_FE(mysqli_slave_query, NULL)
- PHP_FE(mysqli_master_query, NULL)
- PHP_FE(mysqli_rpl_parse_enabled, NULL)
- PHP_FE(mysqli_rpl_probe, NULL)
- PHP_FE(mysqli_rpl_query_type, NULL)
-#endif
#if defined(HAVE_EMBEDDED_MYSQLI)
PHP_FE(mysqli_embedded_server_end, NULL)
PHP_FE(mysqli_embedded_server_start, NULL)
@@ -207,17 +195,6 @@ const zend_function_entry mysqli_link_methods[] = {
PHP_FALIAS(connect,mysqli_connect,NULL)
PHP_FALIAS(dump_debug_info,mysqli_dump_debug_info,NULL)
PHP_FALIAS(debug,mysqli_debug,NULL)
-#if !defined(HAVE_MYSQLND)
- PHP_FALIAS(disable_reads_from_master,mysqli_disable_reads_from_master,NULL)
- PHP_FALIAS(disable_rpl_parse,mysqli_disable_rpl_parse,NULL)
- PHP_FALIAS(enable_reads_from_master,mysqli_enable_reads_from_master,NULL)
- PHP_FALIAS(enable_rpl_parse,mysqli_enable_rpl_parse,NULL)
- PHP_FALIAS(rpl_parse_enabled,mysqli_rpl_parse_enabled,NULL)
- PHP_FALIAS(rpl_probe,mysqli_rpl_probe,NULL)
- PHP_FALIAS(rpl_query_type,mysqli_rpl_query_type,NULL)
- PHP_FALIAS(master_query,mysqli_master_query,NULL)
- PHP_FALIAS(slave_query,mysqli_slave_query,NULL)
-#endif
#ifdef HAVE_MYSQLI_GET_CHARSET
PHP_FALIAS(get_charset,mysqli_get_charset,NULL)
#endif
diff --git a/ext/mysqli/mysqli_repl.c b/ext/mysqli/mysqli_repl.c
deleted file mode 100644
index d342ee1452..0000000000
--- a/ext/mysqli/mysqli_repl.c
+++ /dev/null
@@ -1,223 +0,0 @@
-/*
- +----------------------------------------------------------------------+
- | PHP Version 6 |
- +----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 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: Georg Richter <georg@php.net> |
- | Andrey Hristov <andrey@php.net> |
- | Ulf Wendel <uw@php.net> |
- +----------------------------------------------------------------------+
-
- $Id$
-*/
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <signal.h>
-
-#include "php.h"
-#include "php_ini.h"
-#include "ext/standard/info.h"
-#include "php_mysqli_structs.h"
-
-/* {{{ proto void mysqli_disable_reads_from_master(object link)
-*/
-PHP_FUNCTION(mysqli_disable_reads_from_master)
-{
- MYSQL *mysql;
- zval *mysql_link;
-
- if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &mysql_link, mysqli_link_class_entry) == FAILURE) {
- return;
- }
- MYSQLI_FETCH_RESOURCE(mysql, MYSQL *, &mysql_link, "mysqli_link", MYSQLI_STATUS_VALID);
- mysql_disable_reads_from_master(mysql);
- RETURN_TRUE;
-}
-/* }}} */
-
-/* {{{ proto void mysqli_disable_rpl_parse(object link)
-*/
-PHP_FUNCTION(mysqli_disable_rpl_parse)
-{
- MYSQL *mysql;
- zval *mysql_link;
-
- if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &mysql_link, mysqli_link_class_entry) == FAILURE) {
- return;
- }
- MYSQLI_FETCH_RESOURCE(mysql, MYSQL *, &mysql_link, "mysqli_link", MYSQLI_STATUS_VALID);
- mysql_disable_rpl_parse(mysql);
- RETURN_TRUE;
-}
-/* }}} */
-
-/* {{{ proto void mysqli_enable_reads_from_master(object link)
-*/
-PHP_FUNCTION(mysqli_enable_reads_from_master)
-{
- MYSQL *mysql;
- zval *mysql_link;
-
- if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &mysql_link, mysqli_link_class_entry) == FAILURE) {
- return;
- }
- MYSQLI_FETCH_RESOURCE(mysql, MYSQL *, &mysql_link, "mysqli_link", MYSQLI_STATUS_VALID);
-
- mysql_enable_reads_from_master(mysql);
- RETURN_TRUE;
-}
-/* }}} */
-
-/* {{{ proto void mysqli_enable_rpl_parse(object link)
-*/
-PHP_FUNCTION(mysqli_enable_rpl_parse)
-{
- MYSQL *mysql;
- zval *mysql_link;
-
- if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &mysql_link, mysqli_link_class_entry) == FAILURE) {
- return;
- }
- MYSQLI_FETCH_RESOURCE(mysql, MYSQL *, &mysql_link, "mysqli_link", MYSQLI_STATUS_VALID);
-
- mysql_enable_rpl_parse(mysql);
- RETURN_TRUE;
-}
-/* }}} */
-
-/* {{{ proto bool mysqli_master_query(object link, string query)
- Enforce execution of a query on the master in a master/slave setup */
-PHP_FUNCTION(mysqli_master_query) {
- MYSQL *mysql;
- zval *mysql_link;
- char *query = NULL;
- unsigned int query_len;
-
- if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &mysql_link, mysqli_link_class_entry, &query, &query_len) == FAILURE) {
- return;
- }
- MYSQLI_FETCH_RESOURCE(mysql, MYSQL *, &mysql_link, "mysqli_link", MYSQLI_STATUS_VALID);
-
- if (mysql_master_query(mysql, query, query_len)) {
- RETURN_FALSE;
- }
- RETURN_TRUE;
-}
-/* }}} */
-
-/* {{{ proto int mysqli_rpl_parse_enabled(object link)
-*/
-PHP_FUNCTION(mysqli_rpl_parse_enabled)
-{
- MYSQL *mysql;
- zval *mysql_link;
-
- if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &mysql_link, mysqli_link_class_entry) == FAILURE) {
- return;
- }
- MYSQLI_FETCH_RESOURCE(mysql, MYSQL *, &mysql_link, "mysqli_link", MYSQLI_STATUS_VALID);
-
- RETURN_LONG(mysql_rpl_parse_enabled(mysql));
-}
-/* }}} */
-
-/* {{{ proto bool mysqli_rpl_probe(object link)
-*/
-PHP_FUNCTION(mysqli_rpl_probe)
-{
- MYSQL *mysql;
- zval *mysql_link;
-
- if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &mysql_link, mysqli_link_class_entry) == FAILURE) {
- return;
- }
- MYSQLI_FETCH_RESOURCE(mysql, MYSQL *, &mysql_link, "mysqli_link", MYSQLI_STATUS_VALID);
-
-
- if (mysql_rpl_probe(mysql)) {
- RETURN_FALSE;
- }
- RETURN_TRUE;
-}
-/* }}} */
-
-/* {{{ proto int mysqli_rpl_query_type(string query)
-*/
-PHP_FUNCTION(mysqli_rpl_query_type)
-{
- MYSQL *mysql;
- zval *mysql_link;
- char *query;
- int query_len;
-
- if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &mysql_link, mysqli_link_class_entry, &query, &query_len) == FAILURE) {
- return;
- }
- MYSQLI_FETCH_RESOURCE(mysql, MYSQL *, &mysql_link, "mysqli_link", MYSQLI_STATUS_VALID);
-
- RETURN_LONG(mysql_rpl_query_type(query, query_len));
-}
-/* }}} */
-
-/* {{{ proto bool mysqli_send_query(object link, string query)
-*/
-PHP_FUNCTION(mysqli_send_query)
-{
- MYSQL *mysql;
- zval *mysql_link;
- char *query = NULL;
- unsigned int query_len;
-
- if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &mysql_link, mysqli_link_class_entry, &query, &query_len) == FAILURE) {
- return;
- }
- MYSQLI_FETCH_RESOURCE(mysql, MYSQL *, &mysql_link, "mysqli_link", MYSQLI_STATUS_VALID);
-
- if (mysql_send_query(mysql, query, query_len)) {
- RETURN_FALSE;
- }
- RETURN_TRUE;
-}
-/* }}} */
-
-/* {{{ proto bool mysqli_slave_query(object link, string query)
- Enforce execution of a query on a slave in a master/slave setup */
-PHP_FUNCTION(mysqli_slave_query)
-{
- MYSQL *mysql;
- zval *mysql_link;
- char *query = NULL;
- unsigned int query_len;
-
- if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &mysql_link, mysqli_link_class_entry, &query, &query_len) == FAILURE) {
- return;
- }
- MYSQLI_FETCH_RESOURCE(mysql, MYSQL *, &mysql_link, "mysqli_link", MYSQLI_STATUS_VALID);
-
- if (mysql_slave_query(mysql, query, query_len)) {
- RETURN_FALSE;
- }
- RETURN_TRUE;
-}
-/* }}} */
-
-/*
- * 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
- */
diff --git a/ext/mysqli/php_mysqli_structs.h b/ext/mysqli/php_mysqli_structs.h
index f40ffe57ec..2426b3555f 100644
--- a/ext/mysqli/php_mysqli_structs.h
+++ b/ext/mysqli/php_mysqli_structs.h
@@ -413,11 +413,7 @@ PHP_FUNCTION(mysqli_connect_errno);
PHP_FUNCTION(mysqli_connect_error);
PHP_FUNCTION(mysqli_data_seek);
PHP_FUNCTION(mysqli_debug);
-PHP_FUNCTION(mysqli_disable_reads_from_master);
-PHP_FUNCTION(mysqli_disable_rpl_parse);
PHP_FUNCTION(mysqli_dump_debug_info);
-PHP_FUNCTION(mysqli_enable_reads_from_master);
-PHP_FUNCTION(mysqli_enable_rpl_parse);
PHP_FUNCTION(mysqli_errno);
PHP_FUNCTION(mysqli_error);
PHP_FUNCTION(mysqli_fetch_all);
@@ -450,7 +446,6 @@ PHP_FUNCTION(mysqli_init);
PHP_FUNCTION(mysqli_kill);
PHP_FUNCTION(mysqli_set_local_infile_default);
PHP_FUNCTION(mysqli_set_local_infile_handler);
-PHP_FUNCTION(mysqli_master_query);
PHP_FUNCTION(mysqli_more_results);
PHP_FUNCTION(mysqli_multi_query);
PHP_FUNCTION(mysqli_next_result);
@@ -468,9 +463,6 @@ PHP_FUNCTION(mysqli_real_query);
PHP_FUNCTION(mysqli_real_escape_string);
PHP_FUNCTION(mysqli_rollback);
PHP_FUNCTION(mysqli_row_seek);
-PHP_FUNCTION(mysqli_rpl_parse_enabled);
-PHP_FUNCTION(mysqli_rpl_probe);
-PHP_FUNCTION(mysqli_rpl_query_type);
PHP_FUNCTION(mysqli_select_db);
PHP_FUNCTION(mysqli_stmt_attr_get);
PHP_FUNCTION(mysqli_stmt_attr_set);
@@ -483,10 +475,8 @@ PHP_FUNCTION(mysqli_stmt_prepare);
PHP_FUNCTION(mysqli_stmt_fetch);
PHP_FUNCTION(mysqli_stmt_param_count);
PHP_FUNCTION(mysqli_stmt_send_long_data);
-PHP_FUNCTION(mysqli_send_query);
PHP_FUNCTION(mysqli_embedded_server_end);
PHP_FUNCTION(mysqli_embedded_server_start);
-PHP_FUNCTION(mysqli_slave_query);
PHP_FUNCTION(mysqli_sqlstate);
PHP_FUNCTION(mysqli_ssl_set);
PHP_FUNCTION(mysqli_stat);
diff --git a/ext/mysqli/tests/mysqli_disable_rpl_parse.phpt b/ext/mysqli/tests/mysqli_disable_rpl_parse.phpt
deleted file mode 100644
index 2e66a7c121..0000000000
--- a/ext/mysqli/tests/mysqli_disable_rpl_parse.phpt
+++ /dev/null
@@ -1,41 +0,0 @@
---TEST--
-mysqli_disable_rpl_parse()
---SKIPIF--
-<?php
-require_once('skipif.inc');
-require_once('skipifemb.inc');
-require_once('skipifconnectfailure.inc');
-if (!function_exists('mysqli_disable_rpl_parse'))
- die("skip mysqli_disable_rpl_parse() not available");
-?>
---FILE--
-<?php
- include "connect.inc";
-
- $tmp = NULL;
- $link = NULL;
-
- if (NULL !== ($tmp = @mysqli_disable_rpl_parse()))
- printf("[001] Expecting NULL/NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (NULL !== ($tmp = @mysqli_disable_rpl_parse($link)))
- printf("[002] Expecting NULL/NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!$link = mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
- printf("[003] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
- $host, $user, $db, $port, $socket);
- }
-
- if (!is_bool($tmp = mysqli_disable_rpl_parse($link)))
- printf("[004] Expecting boolean/[true|false] value, got %s/%s\n", gettype($tmp), $tmp);
-
- mysqli_close($link);
-
- if (NULL !== ($tmp = mysqli_disable_rpl_parse($link)))
- printf("[005] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- print "done!";
-?>
---EXPECTF--
-Warning: mysqli_disable_rpl_parse(): Couldn't fetch mysqli in %s on line %d
-done! \ No newline at end of file
diff --git a/ext/mysqli/tests/mysqli_enable_rpl_parse.phpt b/ext/mysqli/tests/mysqli_enable_rpl_parse.phpt
deleted file mode 100644
index b2664d93f0..0000000000
--- a/ext/mysqli/tests/mysqli_enable_rpl_parse.phpt
+++ /dev/null
@@ -1,41 +0,0 @@
---TEST--
-mysqli_enable_rpl_parse()
---SKIPIF--
-<?php
-require_once('skipif.inc');
-require_once('skipifemb.inc');
-require_once('skipifconnectfailure.inc');
-if (!function_exists('mysqli_enable_rpl_parse'))
- die("skip mysqli_enable_rpl_parse() not available");
-?>
---FILE--
-<?php
- include "connect.inc";
-
- $tmp = NULL;
- $link = NULL;
-
- if (NULL !== ($tmp = @mysqli_enable_rpl_parse()))
- printf("[001] Expecting NULL/NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (NULL !== ($tmp = @mysqli_enable_rpl_parse($link)))
- printf("[002] Expecting NULL/NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!$link = mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
- printf("[003] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
- $host, $user, $db, $port, $socket);
- }
-
- if (!is_bool($tmp = mysqli_enable_rpl_parse($link)))
- printf("[004] Expecting boolean/[true|false] value, got %s/%s\n", gettype($tmp), $tmp);
-
- mysqli_close($link);
-
- if (NULL !== ($tmp = mysqli_enable_rpl_parse($link)))
- printf("[005] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- print "done!";
-?>
---EXPECTF--
-Warning: mysqli_enable_rpl_parse(): Couldn't fetch mysqli in %s on line %d
-done! \ No newline at end of file
diff --git a/ext/mysqli/tests/mysqli_rpl_parse_enabled.phpt b/ext/mysqli/tests/mysqli_rpl_parse_enabled.phpt
deleted file mode 100755
index 08e612e132..0000000000
--- a/ext/mysqli/tests/mysqli_rpl_parse_enabled.phpt
+++ /dev/null
@@ -1,46 +0,0 @@
---TEST--
-mysqli_rpl_parse_enabled()
---SKIPIF--
-<?php
-require_once('skipif.inc');
-require_once('skipifemb.inc');
-require_once('skipifconnectfailure.inc');
-if (!function_exists('mysqli_rpl_parse_enabled')) {
- die("skip mysqli_rpl_parse_enabled() not available");
-}
-require_once('connect.inc');
-if (!$TEST_EXPERIMENTAL)
- die("skip - experimental (= unsupported) feature");
-?>
---FILE--
-<?php
- /* NOTE: tests is a stub, but function is deprecated, as long as it does not crash when invoking it... */
- include "connect.inc";
-
- $tmp = NULL;
- $link = NULL;
-
- if (NULL !== ($tmp = @mysqli_rpl_parse_enabled()))
- printf("[001] Expecting NULL/NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (NULL !== ($tmp = @mysqli_rpl_parse_enabled($link)))
- printf("[002] Expecting NULL/NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!$link = mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
- printf("[003] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
- $host, $user, $db, $port, $socket);
- }
-
- if (!is_int($tmp = mysqli_rpl_parse_enabled($link)))
- printf("[004] Expecting integer/any value, got %s/%s\n", gettype($tmp), $tmp);
-
- mysqli_close($link);
-
- if (NULL !== ($tmp = mysqli_rpl_parse_enabled($link)))
- printf("[005] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- print "done!";
-?>
---EXPECTF--
-Warning: mysqli_rpl_parse_enabled(): Couldn't fetch mysqli in %s on line %d
-done! \ No newline at end of file
diff --git a/ext/mysqli/tests/mysqli_rpl_probe.phpt b/ext/mysqli/tests/mysqli_rpl_probe.phpt
deleted file mode 100755
index 778df057e5..0000000000
--- a/ext/mysqli/tests/mysqli_rpl_probe.phpt
+++ /dev/null
@@ -1,46 +0,0 @@
---TEST--
-mysqli_rpl_probe()
---SKIPIF--
-<?php
-require_once('skipif.inc');
-require_once('skipifemb.inc');
-require_once('skipifconnectfailure.inc');
-if (!function_exists('mysqli_rpl_probe')) {
- die("skip mysqli_rpl_probe() not available");
-}
-require_once('connect.inc');
-if (!$TEST_EXPERIMENTAL)
- die("skip - experimental (= unsupported) feature");
-?>
---FILE--
-<?php
- /* NOTE: tests is a stub, but function is deprecated, as long as it does not crash when invoking it... */
- include "connect.inc";
-
- $tmp = NULL;
- $link = NULL;
-
- if (NULL !== ($tmp = @mysqli_rpl_probe()))
- printf("[001] Expecting NULL/NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (NULL !== ($tmp = @mysqli_rpl_probe($link)))
- printf("[002] Expecting NULL/NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!$link = mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
- printf("[003] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
- $host, $user, $db, $port, $socket);
- }
-
- if (!is_bool($tmp = mysqli_rpl_probe($link)))
- printf("[004] Expecting boolean/any value, got %s/%s\n", gettype($tmp), $tmp);
-
- mysqli_close($link);
-
- if (NULL !== ($tmp = mysqli_rpl_probe($link)))
- printf("[005] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- print "done!";
-?>
---EXPECTF--
-Warning: mysqli_rpl_probe(): Couldn't fetch mysqli in %s on line %d
-done! \ No newline at end of file
diff --git a/ext/mysqli/tests/mysqli_rpl_query_type.phpt b/ext/mysqli/tests/mysqli_rpl_query_type.phpt
deleted file mode 100755
index 2fd342f261..0000000000
--- a/ext/mysqli/tests/mysqli_rpl_query_type.phpt
+++ /dev/null
@@ -1,50 +0,0 @@
---TEST--
-mysqli_rpl_query_type()
---SKIPIF--
-<?php
-require_once('skipif.inc');
-require_once('skipifemb.inc');
-require_once('skipifconnectfailure.inc');
-if (!function_exists('mysqli_rpl_query_type')) {
- die("skip mysqli_rpl_query_type() not available");
-}
-require_once('connect.inc');
-if (!$TEST_EXPERIMENTAL)
- die("skip - experimental (= unsupported) feature");
-?>
---FILE--
-<?php
- /* NOTE: tests is a stub, but function is deprecated, as long as it does not crash when invoking it... */
- include "connect.inc";
-
- $tmp = NULL;
- $link = NULL;
-
- if (NULL !== ($tmp = @mysqli_rpl_query_type()))
- printf("[001] Expecting NULL/NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (NULL !== ($tmp = @mysqli_rpl_query_type($link)))
- printf("[002] Expecting NULL/NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!$link = mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
- printf("[003] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
- $host, $user, $db, $port, $socket);
- }
-
- $query = array();
- if (NULL !== ($tmp = @mysqli_rpl_query_type($link, $query)))
- printf("[004] Expecting NULL/NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_int($tmp = mysqli_rpl_query_type($link, 'SELECT 1')))
- printf("[005] Expecting integer/any value, got %s/%s\n", gettype($tmp), $tmp);
-
- mysqli_close($link);
-
- if (NULL !== ($tmp = mysqli_rpl_query_type($link, 'SELECT 1')))
- printf("[006] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- print "done!";
-?>
---EXPECTF--
-Warning: mysqli_rpl_query_type(): Couldn't fetch mysqli in %s on line %d
-done! \ No newline at end of file