summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/mysqli/php_mysqli_structs.h1
-rw-r--r--ext/mysqli/tests/bug63486.phpt55
-rw-r--r--ext/mysqli/tests/connect.inc4
3 files changed, 2 insertions, 58 deletions
diff --git a/ext/mysqli/php_mysqli_structs.h b/ext/mysqli/php_mysqli_structs.h
index ec9ef49e91..055765197d 100644
--- a/ext/mysqli/php_mysqli_structs.h
+++ b/ext/mysqli/php_mysqli_structs.h
@@ -314,7 +314,6 @@ extern PHPAPI zend_class_entry *spl_ce_RuntimeException;
mysqli_object *intern = Z_MYSQLI_P(__id); \
efree(intern->ptr); \
intern->ptr = NULL; \
- ZVAL_NULL(__id); \
}
diff --git a/ext/mysqli/tests/bug63486.phpt b/ext/mysqli/tests/bug63486.phpt
deleted file mode 100644
index 72b8663e43..0000000000
--- a/ext/mysqli/tests/bug63486.phpt
+++ /dev/null
@@ -1,55 +0,0 @@
---TEST--
-mysqli_free_resource() - resets the zval to NULL
---SKIPIF--
-<?php
- require_once('skipif.inc');
- require_once('skipifemb.inc');
- require_once('skipifconnectfailure.inc');
-?>
---FILE--
-<?php
- require('connect.inc');
- if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
- printf("[001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
- die();
- }
-
- if (!($res = mysqli_query($link, "SELECT 1"))) {
- printf("[002] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
- die();
- }
-
- $row = mysqli_fetch_row($res);
- var_dump($row);
- var_dump($res);
-
- mysqli_free_result($res);
-
- var_dump($row);
- var_dump($res);
-?>
---EXPECTF--
-array(1) {
- [0]=>
- string(1) "1"
-}
-object(mysqli_result)#3 (5) {
- ["current_field"]=>
- int(0)
- ["field_count"]=>
- int(1)
- ["lengths"]=>
- array(1) {
- [0]=>
- int(1)
- }
- ["num_rows"]=>
- int(1)
- ["type"]=>
- int(0)
-}
-array(1) {
- [0]=>
- string(1) "1"
-}
-NULL
diff --git a/ext/mysqli/tests/connect.inc b/ext/mysqli/tests/connect.inc
index 4acc20cb91..67ce60a48b 100644
--- a/ext/mysqli/tests/connect.inc
+++ b/ext/mysqli/tests/connect.inc
@@ -8,8 +8,8 @@
$driver = new mysqli_driver;
- $host = getenv("MYSQL_TEST_HOST") ? getenv("MYSQL_TEST_HOST") : "localhost";
- $port = getenv("MYSQL_TEST_PORT") ? getenv("MYSQL_TEST_PORT") : 3306;
+ $host = getenv("MYSQL_TEST_HOST") ? getenv("MYSQL_TEST_HOST") : "127.0.0.1";
+ $port = getenv("MYSQL_TEST_PORT") ? getenv("MYSQL_TEST_PORT") : 3308;
$user = getenv("MYSQL_TEST_USER") ? getenv("MYSQL_TEST_USER") : "root";
$passwd = getenv("MYSQL_TEST_PASSWD") ? getenv("MYSQL_TEST_PASSWD") : "";
$db = getenv("MYSQL_TEST_DB") ? getenv("MYSQL_TEST_DB") : "test";