]> granicus.if.org Git - php/commitdiff
MFH:
authorGeorg Richter <georg@php.net>
Sat, 4 Dec 2004 09:01:34 +0000 (09:01 +0000)
committerGeorg Richter <georg@php.net>
Sat, 4 Dec 2004 09:01:34 +0000 (09:01 +0000)
fix for bug #28817 (properties don't work in extended class)
fix for bug #30890 (testsuite)

65 files changed:
ext/mysqli/mysqli.c
ext/mysqli/mysqli_prop.c
ext/mysqli/tests/001.phpt
ext/mysqli/tests/002.phpt
ext/mysqli/tests/003.phpt
ext/mysqli/tests/004.phpt
ext/mysqli/tests/005.phpt
ext/mysqli/tests/006.phpt
ext/mysqli/tests/007.phpt
ext/mysqli/tests/008.phpt
ext/mysqli/tests/009.phpt
ext/mysqli/tests/010.phpt
ext/mysqli/tests/011.phpt
ext/mysqli/tests/012.phpt
ext/mysqli/tests/013.phpt
ext/mysqli/tests/014.phpt
ext/mysqli/tests/015.phpt
ext/mysqli/tests/016.phpt
ext/mysqli/tests/017.phpt
ext/mysqli/tests/018.phpt
ext/mysqli/tests/019.phpt
ext/mysqli/tests/020.phpt
ext/mysqli/tests/021.phpt
ext/mysqli/tests/022.phpt
ext/mysqli/tests/023.phpt
ext/mysqli/tests/024.phpt
ext/mysqli/tests/025.phpt
ext/mysqli/tests/026.phpt
ext/mysqli/tests/027.phpt
ext/mysqli/tests/028.phpt
ext/mysqli/tests/029.phpt
ext/mysqli/tests/030.phpt
ext/mysqli/tests/031.phpt
ext/mysqli/tests/032.phpt
ext/mysqli/tests/033.phpt
ext/mysqli/tests/034.phpt
ext/mysqli/tests/035.phpt
ext/mysqli/tests/036.phpt
ext/mysqli/tests/037.phpt
ext/mysqli/tests/038.phpt
ext/mysqli/tests/039.phpt
ext/mysqli/tests/040.phpt
ext/mysqli/tests/041.phpt
ext/mysqli/tests/042.phpt
ext/mysqli/tests/043.phpt
ext/mysqli/tests/044.phpt
ext/mysqli/tests/045.phpt
ext/mysqli/tests/046.phpt
ext/mysqli/tests/047.phpt
ext/mysqli/tests/048.phpt
ext/mysqli/tests/049.phpt
ext/mysqli/tests/050.phpt
ext/mysqli/tests/051.phpt
ext/mysqli/tests/052.phpt
ext/mysqli/tests/053.phpt
ext/mysqli/tests/054.phpt
ext/mysqli/tests/055.phpt
ext/mysqli/tests/056.phpt
ext/mysqli/tests/057.phpt
ext/mysqli/tests/058.phpt
ext/mysqli/tests/059.phpt
ext/mysqli/tests/060.phpt
ext/mysqli/tests/061.phpt
ext/mysqli/tests/bug29311.phpt
ext/mysqli/tests/bug30967.phpt

index 833d8a5d075c4944afda623be48c7f8e42c5ed70..96a56ae9dc4c5658f14196f9696baa19ba713163 100644 (file)
@@ -179,11 +179,6 @@ zval *mysqli_read_property(zval *object, zval *member, int type TSRMLS_DC)
        ret = FAILURE;
        obj = (mysqli_object *)zend_objects_get_address(object TSRMLS_CC);
 
-       if (!obj->valid) {
-               retval = EG(uninitialized_zval_ptr);
-               return(retval);
-       }
-
        if (member->type != IS_STRING) {
                tmp_member = *member;
                zval_copy_ctor(&tmp_member);
@@ -223,6 +218,7 @@ zval *mysqli_read_property(zval *object, zval *member, int type TSRMLS_DC)
        } else {
                std_hnd = zend_get_std_object_handlers();
                retval = std_hnd->read_property(object, member, type TSRMLS_CC);
+               retval->refcount = 1;
        }
 
        if (member == &tmp_member) {
index 6ad88756801cefd0eba061774332c4dcf08d7916..f883e72de6e0f8f954d0f4ab96396ee038fc349a 100644 (file)
 #include "ext/standard/info.h"
 #include "php_mysqli.h"
 
+#define CHECK_OBJECT() \
+       if (!obj->valid) { \
+               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Property access is not allowed yet. Call the default constructor of the object first"); \
+               ZVAL_NULL(*retval); \
+               return SUCCESS; \
+       } \
+
+
+
 #define MYSQLI_GET_MYSQL() \
 MYSQL *p = (MYSQL *)((MY_MYSQL *)((MYSQLI_RESOURCE *)(obj->ptr))->ptr)->mysql;
 
@@ -41,9 +50,10 @@ MYSQL_STMT *p = (MYSQL_STMT *)((MY_STMT *)((MYSQLI_RESOURCE *)(obj->ptr))->ptr)-
 #define MYSQLI_MAP_PROPERTY_FUNC_LONG( __func, __int_func, __get_type, __ret_type)\
 int __func(mysqli_object *obj, zval **retval TSRMLS_DC) \
 {\
+       ALLOC_ZVAL(*retval); \
+       CHECK_OBJECT(); \
        __ret_type l;\
        __get_type;\
-       ALLOC_ZVAL(*retval);\
        if (!p) {\
                ZVAL_NULL(*retval);\
        } else {\
@@ -63,8 +73,9 @@ int __func(mysqli_object *obj, zval **retval TSRMLS_DC) \
 int __func(mysqli_object *obj, zval **retval TSRMLS_DC)\
 {\
        char *c;\
+       ALLOC_ZVAL(*retval); \
+       CHECK_OBJECT(); \
        __get_type;\
-       ALLOC_ZVAL(*retval);\
        if (!p) {\
                ZVAL_NULL(*retval);\
        } else {\
@@ -96,19 +107,6 @@ int link_client_info_read(mysqli_object *obj, zval **retval TSRMLS_DC)
 }
 /* }}} */
 
-/* {{{ property link_test_read */
-int link_test_read(mysqli_object *obj, zval **retval TSRMLS_DC)
-{
-       long    i;
-       ALLOC_ZVAL(*retval);
-       array_init(*retval);
-
-       for (i=0; i < 10; i++)
-               add_index_long(*retval, i, i + 10);
-       return SUCCESS;
-}
-/*i }}} */
-
 /* {{{ property link_connect_errno_read */
 int link_connect_errno_read(mysqli_object *obj, zval **retval TSRMLS_DC)
 {
@@ -147,9 +145,11 @@ MYSQLI_MAP_PROPERTY_FUNC_LONG(link_warning_count_read, mysql_warning_count, MYSQ
 /* {{{ property result_type_read */
 int result_type_read(mysqli_object *obj, zval **retval TSRMLS_DC)
 {
+       ALLOC_ZVAL(*retval); 
+       CHECK_OBJECT();
+
        MYSQL_RES *p = (MYSQL_RES *)((MYSQLI_RESOURCE *)(obj->ptr))->ptr;
 
-       ALLOC_ZVAL(*retval);
        if (!p) {
                ZVAL_NULL(*retval);
        } else {
@@ -162,6 +162,9 @@ int result_type_read(mysqli_object *obj, zval **retval TSRMLS_DC)
 /* {{{ property result_lengths_read */
 int result_lengths_read(mysqli_object *obj, zval **retval TSRMLS_DC)
 {
+       ALLOC_ZVAL(*retval); 
+       CHECK_OBJECT();
+
        MYSQL_RES *p = (MYSQL_RES *)((MYSQLI_RESOURCE *)(obj->ptr))->ptr;
 
        ALLOC_ZVAL(*retval);
@@ -202,7 +205,6 @@ mysqli_property_entry mysqli_link_property_entries[] = {
        {"affected_rows", link_affected_rows_read, NULL},
        {"client_info", link_client_info_read, NULL},
        {"client_version", link_client_version_read, NULL},
-       {"test", link_test_read, NULL},
        {"connect_errno", link_connect_errno_read, NULL},
        {"connect_error", link_connect_error_read, NULL},
        {"errno", link_errno_read, NULL},
index 5e483aba8db503f28332afa4417866fb427c4c17..880325bb5ae02f8a484051362c78e88198dbe3ab 100644 (file)
@@ -1,49 +1,40 @@
 --TEST--
 mysqli connect
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
 --FILE--
 <?php
+       include "connect.inc";
 
-       $user = "root";
-       $passwd = "";
        $dbname = "test";
        $test = "";
        
-       /*** test mysqli_connect 127.0.0.1 ***/
-       $link = mysqli_connect("127.0.0.1", $user, $passwd);
-       $test .= ($link) ? "1" : "0";
-       mysqli_close($link);
-
-       /*** test mysqli_connect localhost ***/
-       $link = mysqli_connect("localhost", $user, $passwd);
-       $test .= ($link) ? "1" : "0";
-       mysqli_close($link);
-
        /*** test mysqli_connect localhost:port ***/
-       $link = mysqli_connect("localhost", $user, $passwd, "", 3306);
+       $link = mysqli_connect($host, $user, $passwd, "", 3306);
        $test .= ($link) ? "1" : "0";
        mysqli_close($link);
 
        /*** test mysqli_real_connect ***/
        $link = mysqli_init();  
-       $test.= (mysqli_real_connect($link, "localhost", $user, $passwd)) 
+       $test.= (mysqli_real_connect($link, $host, $user, $passwd)) 
                ? "1" : "0";
        mysqli_close($link);
 
        /*** test mysqli_real_connect with db ***/
        $link = mysqli_init();  
-       $test .= (mysqli_real_connect($link, "localhost", $user, $passwd, $dbname)) 
+       $test .= (mysqli_real_connect($link, $host, $user, $passwd, $dbname)) 
                ? "1" : "0";
        mysqli_close($link);
 
        /*** test mysqli_real_connect with port ***/
        $link = mysqli_init();  
-       $test .= (mysqli_real_connect($link, "localhost", $user, $passwd, $dbname, 3306))
+       $test .= (mysqli_real_connect($link, $host, $user, $passwd, $dbname, 3306))
                ? "1":"0";
        mysqli_close($link);
 
        /*** test mysqli_real_connect compressed ***/
        $link = mysqli_init();  
-       $test .= (mysqli_real_connect($link, "localhost", $user, $passwd, $dbname, 0, NULL, MYSQLI_CLIENT_COMPRESS)) 
+       $test .= (mysqli_real_connect($link, $host, $user, $passwd, $dbname, 0, NULL, MYSQLI_CLIENT_COMPRESS)) 
                ? "1" : "0";
        mysqli_close($link);
 
@@ -52,4 +43,4 @@ mysqli connect
        var_dump($test);
 ?>
 --EXPECT--
-string(7) "1111111"
+string(5) "11111"
index 7925f84fa8044f3635f94559394d95d1bdc466ee..fa4e60e185d611e7f7a8b20140d49a3a87763963 100644 (file)
@@ -1,11 +1,13 @@
 --TEST--
 mysqli bind_result 1 
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
 --FILE--
 <?php
        include "connect.inc";
        
        /*** test mysqli_connect 127.0.0.1 ***/
-       $link = mysqli_connect("localhost", $user, $passwd);
+       $link = mysqli_connect($host, $user, $passwd);
 
        mysqli_select_db($link, "test");                
        $rc = mysqli_query($link,"DROP TABLE IF EXISTS test_fetch_null");
index 906bf28dec3f4a636cf9fad2644c0c42ac305d62..d043dc7724f61d1487ea562f9a42fe21696c8de1 100644 (file)
@@ -1,11 +1,13 @@
 --TEST--
 mysqli connect
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
 --FILE--
 <?php
        include "connect.inc";
        
        /*** test mysqli_connect 127.0.0.1 ***/
-       $link = mysqli_connect("localhost", $user, $passwd);
+       $link = mysqli_connect($host, $user, $passwd);
 
        mysqli_select_db($link, "test");
                
index 179c4b64cfd002434c854a0bbcc9b2acb8575bd5..c80c7214e3262cfbb80c296c11da1fa813e58a95 100644 (file)
@@ -1,11 +1,13 @@
 --TEST--
 mysqli fetch char/text 
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
 --FILE--
 <?php
        include ("connect.inc");
 
        /*** test mysqli_connect 127.0.0.1 ***/
-       $link = mysqli_connect("localhost", $user, $passwd);
+       $link = mysqli_connect($host, $user, $passwd);
 
        mysqli_select_db($link, "test");
 
index 982a3950f29ace971dcf7c71a86d692e52500b5b..a9f75cfd7e97616fc56f68dc75d7d233dc34b51e 100644 (file)
@@ -1,11 +1,13 @@
 --TEST--
 mysqli fetch char/text long 
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
 --FILE--
 <?php
        include "connect.inc";
        
        /*** test mysqli_connect 127.0.0.1 ***/
-       $link = mysqli_connect("localhost", $user, $passwd);
+       $link = mysqli_connect($host, $user, $passwd);
 
        mysqli_select_db($link, "test");
 
index d697e1e82f0ff3c18292bf5e0b13ac05aa57dbb7..4b495cc5945129b0a5396d0594a8480444e0a219 100644 (file)
@@ -1,11 +1,13 @@
 --TEST--
 mysqli fetch long values
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
 --FILE--
 <?php
        include "connect.inc";
        
        /*** test mysqli_connect 127.0.0.1 ***/
-       $link = mysqli_connect("localhost", $user, $passwd);
+       $link = mysqli_connect($host, $user, $passwd);
 
        mysqli_select_db($link, "test");
 
index 2470c20e7e2686de0d942c48d7e604745346653f..503863bdc2c05580851200f999e5cbf0481ce593 100644 (file)
@@ -1,11 +1,13 @@
 --TEST--
 mysqli fetch short values
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
 --FILE--
 <?php
        include "connect.inc";
        
        /*** test mysqli_connect 127.0.0.1 ***/
-       $link = mysqli_connect("localhost", $user, $passwd);
+       $link = mysqli_connect($host, $user, $passwd);
 
        mysqli_select_db($link, "test");
 
index c0ee735096159488a89f54ce54723a1bb23ae0ff..12311d621b977644075300eeed05fd438d859b9d 100644 (file)
@@ -1,11 +1,13 @@
 --TEST--
 mysqli fetch tinyint values
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
 --FILE--
 <?php
        include "connect.inc";
        
        /*** test mysqli_connect 127.0.0.1 ***/
-       $link = mysqli_connect("localhost", $user, $passwd);
+       $link = mysqli_connect($host, $user, $passwd);
 
        mysqli_select_db($link, "test");
 
index 042f837849864d0dc4e9ff39f561487ea1ef091f..6b8f57b203bfb3041b8bbd61ce191215359c9e73 100644 (file)
@@ -1,11 +1,13 @@
 --TEST--
 mysqli fetch bigint values
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
 --FILE--
 <?php
        include "connect.inc";
        
        /*** test mysqli_connect 127.0.0.1 ***/
-       $link = mysqli_connect("localhost", $user, $passwd);
+       $link = mysqli_connect($host, $user, $passwd);
 
        mysqli_select_db($link, "test");
 
index 4584e0a91f442ec1359a65438ee526890093ff9e..0d74bed501c7c9e5d6c1e41bc6cd10f42ae5dba5 100644 (file)
@@ -2,12 +2,14 @@
 mysqli fetch float values
 --INI--
 precision=12
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
 --FILE--
 <?php
        include "connect.inc";
        
        /*** test mysqli_connect 127.0.0.1 ***/
-       $link = mysqli_connect("localhost", $user, $passwd);
+       $link = mysqli_connect($host, $user, $passwd);
 
        mysqli_select_db($link, "test");
 
index 987ec1d14a6f18e156271d28b33a4d339e764624..77a157f5641b7265c642987139f509e6063d1112 100644 (file)
@@ -2,12 +2,14 @@
 mysqli fetch mixed values
 --INI--
 precision=12
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
 --FILE--
 <?php
        include "connect.inc";
        
        /*** test mysqli_connect 127.0.0.1 ***/
-       $link = mysqli_connect("localhost", $user, $passwd);
+       $link = mysqli_connect($host, $user, $passwd);
 
        mysqli_select_db($link, "test");
 
index 9af509fefdb0d98d825387702cd8ba9df591927f..9c52f9c3e4cef145fcbf665d1132773cc48aa7c1 100644 (file)
@@ -2,12 +2,14 @@
 mysqli fetch mixed values 2
 --INI--
 precision=12
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
 --FILE--
 <?php
        include "connect.inc";
        
        /*** test mysqli_connect 127.0.0.1 ***/
-       $link = mysqli_connect("localhost", $user, $passwd);
+       $link = mysqli_connect($host, $user, $passwd);
 
        mysqli_select_db($link, "test");
 
index b09541919969285a6e34df0d6621b556cd8edfdf..ff435f94db99b11abb644b2d0841e10e94d1d100 100644 (file)
@@ -1,11 +1,13 @@
 --TEST--
 mysqli fetch mixed / mysql_query 
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
 --FILE--
 <?php
        include "connect.inc";
        
        /*** test mysqli_connect 127.0.0.1 ***/
-       $link = mysqli_connect("localhost", $user, $passwd);
+       $link = mysqli_connect($host, $user, $passwd);
 
        mysqli_select_db($link, "test");
 
index 8a72c42c7fe13c78eec9d4bce5d5f450cfb152f2..69c347b88b4eaf1f562ebcb78bed4f1bc8c4699f 100644 (file)
@@ -3,7 +3,7 @@ mysqli autocommit/commit/rollback
 --SKIPIF--
 <?php  
        include "connect.inc";
-       $link = mysqli_connect("localhost", $user, $passwd);
+       $link = mysqli_connect($host, $user, $passwd);
        $result = mysqli_query($link, "SHOW VARIABLES LIKE 'have_innodb'");
        $row = mysqli_fetch_row($result);
        mysqli_free_result($result);
@@ -13,10 +13,12 @@ mysqli autocommit/commit/rollback
                printf ("skip innodb support is not installed or enabled.");
        }
 ?>
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
 --FILE--
 <?php
        include "connect.inc";
-       $link = mysqli_connect("localhost", $user, $passwd);
+       $link = mysqli_connect($host, $user, $passwd);
 
        mysqli_select_db($link, "test");
 
index 96864e88541d5382931e2b04121b9458df114042..26eb4383c9ebdf3abe308459baf6c3c99d2954fe 100644 (file)
@@ -3,7 +3,7 @@ mysqli autocommit/commit/rollback with myisam
 --SKIPIF--
 <?php  
        include "connect.inc";
-       $link = mysqli_connect("localhost", $user, $passwd);
+       $link = mysqli_connect($host, $user, $passwd);
        $result = mysqli_query($link, "SHOW VARIABLES LIKE 'have_innodb'");
        $row = mysqli_fetch_row($result);
        mysqli_free_result($result);
@@ -13,11 +13,13 @@ mysqli autocommit/commit/rollback with myisam
                printf ("skip innodb support not installed.");
        }
 ?>
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
 --FILE--
 <?php
        include "connect.inc";
        
-       $link = mysqli_connect("localhost", $user, $passwd);
+       $link = mysqli_connect($host, $user, $passwd);
 
        mysqli_select_db($link, "test");
 
index 4d16356a78e726320ac0c951ce28d05eb8c7ad07..c61da29ec19a9a3069518da0e5026dc2418e47f2 100644 (file)
@@ -1,11 +1,13 @@
 --TEST--
 mysqli fetch user variable 
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
 --FILE--
 <?php
        include "connect.inc";
        
        /*** test mysqli_connect 127.0.0.1 ***/
-       $link = mysqli_connect("localhost", $user, $passwd);
+       $link = mysqli_connect($host, $user, $passwd);
 
        mysqli_select_db($link, "test");
 
index 3447614428fc95c17acae3b753f1519151da24a1..7f51ca4b9179144210ee06a423af42331ac1c43c 100644 (file)
@@ -1,11 +1,13 @@
 --TEST--
 mysqli fetch functions 
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
 --FILE--
 <?php
        include "connect.inc";
        
        /*** test mysqli_connect 127.0.0.1 ***/
-       $link = mysqli_connect("localhost", $user, $passwd);
+       $link = mysqli_connect($host, $user, $passwd);
 
        mysqli_select_db($link, "test");
 
@@ -14,7 +16,9 @@ mysqli fetch functions
        mysqli_execute($stmt);
 
        mysqli_fetch($stmt);
-//     mysqli_stmt_close($stmt);
+       mysqli_stmt_close($stmt);
+
+       $c0 = ($c0 == $user . "@" . $host) ? 1 : 0;
 
        $test = array($c0, $c1, $c2);
 
@@ -24,7 +28,7 @@ mysqli fetch functions
 --EXPECT--
 array(3) {
   [0]=>
-  string(14) "root@localhost"
+  int(1)
   [1]=>
   string(4) "test"
   [2]=>
index a0a247611dcba4158b281553954c5a5de4998bd1..4ba199d866541412c1b8366639e98a993ae15e24 100644 (file)
@@ -1,11 +1,13 @@
 --TEST--
 mysqli fetch system variables
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
 --FILE--
 <?php
        include "connect.inc";
        
        /*** test mysqli_connect 127.0.0.1 ***/
-       $link = mysqli_connect("localhost", $user, $passwd);
+       $link = mysqli_connect($host, $user, $passwd);
 
        mysqli_select_db($link, "test");
 
index f7aab7a79958449df866aed62446ca8f1a67b147..41b1ba2cf90fac40d0ff4109c2796b8a035e0e84 100644 (file)
@@ -1,11 +1,13 @@
 --TEST--
 mysqli fetch (bind_param + bind_result) 
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
 --FILE--
 <?php
        include "connect.inc";
        
        /*** test mysqli_connect 127.0.0.1 ***/
-       $link = mysqli_connect("localhost", $user, $passwd);
+       $link = mysqli_connect($host, $user, $passwd);
 
        mysqli_select_db($link, "test");                
        $rc = mysqli_query($link,"DROP TABLE IF EXISTS insert_read");
index d08930fed9ff38addd1f33e29e88264a811dd8d3..85834c52afc03a2b78a96bf0c9cc069b2cc2637b 100644 (file)
@@ -1,11 +1,13 @@
 --TEST--
 mysqli bind_param/bind_result date
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
 --FILE--
 <?php
        include "connect.inc";
        
        /*** test mysqli_connect 127.0.0.1 ***/
-       $link = mysqli_connect("localhost", $user, $passwd);
+       $link = mysqli_connect($host, $user, $passwd);
 
        mysqli_select_db($link, "test");
                
index 614f978aafba929a867e318d390213b281f2162e..6f5bad32053e16124afc16e620556c817c80bb6f 100644 (file)
@@ -1,11 +1,13 @@
 --TEST--
 mysqli bind_param+bind_result char/text 
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
 --FILE--
 <?php
        include "connect.inc";
        
        /*** test mysqli_connect 127.0.0.1 ***/
-       $link = mysqli_connect("localhost", $user, $passwd);
+       $link = mysqli_connect($host, $user, $passwd);
 
        mysqli_select_db($link, "test");
 
index 2fb2bcdb6274dbcff014e33f1c38052440764da8..cce8ed8eb6daab491a4652fc3d6fd592af4752f3 100644 (file)
@@ -1,11 +1,13 @@
 --TEST--
 mysqli bind_param/bind_result char/text long 
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
 --FILE--
 <?php
        include "connect.inc";
        
        /*** test mysqli_connect 127.0.0.1 ***/
-       $link = mysqli_connect("localhost", $user, $passwd);
+       $link = mysqli_connect($host, $user, $passwd);
 
        mysqli_select_db($link, "test");
 
index 258f1852d055237c381b465f2df639637c59ba7b..69e9b20858c3bcd5bf15045fe2571b5b6f641775 100644 (file)
@@ -1,11 +1,13 @@
 --TEST--
 mysqli bind_param/bind_prepare fetch long values
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
 --FILE--
 <?php
        include "connect.inc";
        
        /*** test mysqli_connect 127.0.0.1 ***/
-       $link = mysqli_connect("localhost", $user, $passwd);
+       $link = mysqli_connect($host, $user, $passwd);
 
        mysqli_select_db($link, "test");
 
index de0eead6ed31e4aa32e098c59e48869659226c65..c6d6cd7e70247e987371a340b09cb82b05cc85b9 100644 (file)
@@ -1,11 +1,13 @@
 --TEST--
 mysqli bind_param/bind_result short values
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
 --FILE--
 <?php
        include "connect.inc";
        
        /*** test mysqli_connect 127.0.0.1 ***/
-       $link = mysqli_connect("localhost", $user, $passwd);
+       $link = mysqli_connect($host, $user, $passwd);
 
        mysqli_select_db($link, "test");
 
index 3d643ad8727e0beb0fe9e55502168bbb4bbbacb8..85ff0fa29fe1c3a7b546b7ccb7d9e073f2de0b15 100644 (file)
@@ -1,11 +1,13 @@
 --TEST--
 mysqli bind_param/bind_result tinyint values
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
 --FILE--
 <?php
        include "connect.inc";
        
        /*** test mysqli_connect 127.0.0.1 ***/
-       $link = mysqli_connect("localhost", $user, $passwd);
+       $link = mysqli_connect($host, $user, $passwd);
 
        mysqli_select_db($link, "test");
 
index 2c7f9f02bdce30a6a33e428eee343095607fb5d6..0f9e882608860ee7d96a3c59b4c3f1b886a4c91a 100644 (file)
@@ -1,13 +1,13 @@
 --TEST--
 mysqli bind_param/bind_result with send_long_data 
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
 --FILE--
 <?php
-       $user = "root";
-       $passwd = "";
-
+       include "connect.inc";
        
        /*** test mysqli_connect 127.0.0.1 ***/
-       $link = mysqli_connect("localhost", $user, $passwd);
+       $link = mysqli_connect($host, $user, $passwd);
 
        mysqli_select_db($link, "test");
 
index 347a8513af91e96b647a23b87681b53defbeb332..9f8eadf9ddc345ac31b23c4f6aab0f674ef3cd9a 100644 (file)
@@ -1,13 +1,13 @@
 --TEST--
 function test: mysqli_stat
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
 --FILE--
 <?php
-       $user = "root";
-       $passwd = "";
-
+       include "connect.inc";
        
        /*** test mysqli_connect 127.0.0.1 ***/
-       $link = mysqli_connect("localhost", $user, $passwd);
+       $link = mysqli_connect($host, $user, $passwd);
 
        $status = mysqli_stat($link);
 
index d9e848f2ba098ac5f16b326f6fae0679df6371e9..021804540d01fd48634bd36f069510d5d3cd3fb2 100644 (file)
@@ -1,13 +1,13 @@
 --TEST--
 function test: mysqli_character_set_name
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
 --FILE--
 <?php
-       $user = "root";
-       $passwd = "";
-
+       include "connect.inc";
        
        /*** test mysqli_connect 127.0.0.1 ***/
-       $link = mysqli_connect("localhost", $user, $passwd);
+       $link = mysqli_connect($host, $user, $passwd);
 
        $cset = substr(mysqli_character_set_name($link),0,6);
 
index 7680b228e969ef2e6d018965b5c9b7d9f4ddd983..318e6aeb9ecd99326d3540268c2d0a2101b154ff 100644 (file)
@@ -1,13 +1,13 @@
 --TEST--
 function test: mysqli_affected_rows
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
 --FILE--
 <?php
-       $user = "root";
-       $passwd = "";
-
+       include "connect.inc";
        
        /*** test mysqli_connect 127.0.0.1 ***/
-       $link = mysqli_connect("localhost", $user, $passwd);
+       $link = mysqli_connect($host, $user, $passwd);
 
        mysqli_select_db($link, "test");
 
index da87218627c912462b17f2815c62eb6cc2fa7e18..a3946c3715fedf35aadbe46e2574b55b0bb3fd78 100644 (file)
@@ -1,12 +1,13 @@
 --TEST--
 function test: mysqli_errno
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
 --FILE--
 <?php
-       $user = "root";
-       $passwd = "";
+       include "connect.inc";
 
        /*** test mysqli_connect 127.0.0.1 ***/
-       $link = mysqli_connect("localhost", $user, $passwd);
+       $link = mysqli_connect($host, $user, $passwd);
        $errno = mysqli_errno($link);
        var_dump($errno);
 
index 61bfb5bb3261f69dfe935a261e7995bd058a7e69..743b4b2d0fe58ec33ce6b5567d746e22f0afb59f 100644 (file)
@@ -1,12 +1,13 @@
 --TEST--
 function test: mysqli_error
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
 --FILE--
 <?php
-       $user = "root";
-       $passwd = "";
+       include "connect.inc";
 
        /*** test mysqli_connect 127.0.0.1 ***/
-       $link = mysqli_connect("localhost", $user, $passwd);
+       $link = mysqli_connect($host, $user, $passwd);
        $error = mysqli_error($link);
        var_dump($error);
 
index 02564834d8313dbee55d9efbf77ab0276d235111..18bd756a2305e989cb4b70e8289b83784aeb2617 100644 (file)
@@ -1,13 +1,13 @@
 --TEST--
 function test: mysqli_info
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
 --FILE--
 <?php
-       $user = "root";
-       $passwd = "";
-
+       include "connect.inc";
        
        /*** test mysqli_connect 127.0.0.1 ***/
-       $link = mysqli_connect("localhost", $user, $passwd);
+       $link = mysqli_connect($host, $user, $passwd);
 
        mysqli_select_db($link, "test");
 
index e3d8d159d0c1cfb5bc1297d8d8cb09781c5fdc1e..3a56b5c6788ab307ba88f47a1917444ea19f86c7 100644 (file)
@@ -1,13 +1,13 @@
 --TEST--
 function test: mysqli_get_host_info
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
 --FILE--
 <?php
-       $user = "root";
-       $passwd = "";
-
+       include "connect.inc";
        
        /*** test mysqli_connect 127.0.0.1 ***/
-       $link = mysqli_connect("localhost", $user, $passwd);
+       $link = mysqli_connect($host, $user, $passwd);
 
        $hinfo = mysqli_get_host_info($link);
 
index e347586a36a567123bc673bb4b96ad5efce88bde..47c99f07e5b2dd62150ade8e6a384290f09ad6c5 100644 (file)
@@ -1,13 +1,13 @@
 --TEST--
 function test: mysqli_get_proto_info
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
 --FILE--
 <?php
-       $user = "root";
-       $passwd = "";
-
+       include "connect.inc";
        
        /*** test mysqli_connect 127.0.0.1 ***/
-       $link = mysqli_connect("localhost", $user, $passwd);
+       $link = mysqli_connect($host, $user, $passwd);
 
        $pinfo = mysqli_get_proto_info($link);
 
index a02af059d8feb6fc6a3c5aa67e0fe04d615660fc..ea31222ec73ae4668e9d4395100674ed1979843c 100644 (file)
@@ -1,13 +1,13 @@
 --TEST--
 function test: mysqli_get_server_info
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
 --FILE--
 <?php
-       $user = "root";
-       $passwd = "";
-
+       include "connect.inc";
        
        /*** test mysqli_connect 127.0.0.1 ***/
-       $link = mysqli_connect("localhost", $user, $passwd);
+       $link = mysqli_connect($host, $user, $passwd);
 
        $sinfo = substr(mysqli_get_server_info($link),0,1);
 
index 080c6e32e4eed2560af6640f96d06efcd5962083..58d27b481e504ae87528d4e41ab7deba643fb52e 100644 (file)
@@ -1,12 +1,14 @@
 --TEST--
 function test: mysqli_insert_id()
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
 --FILE--
 <?php
 
        include "connect.inc";
        
        /*** test mysqli_connect 127.0.0.1 ***/
-       $link = mysqli_connect("localhost", $user, $passwd);
+       $link = mysqli_connect($host, $user, $passwd);
 
        mysqli_select_db($link, "test");
 
index f8b8a13f1a2714bf1864e77ab2e84c6bd05c49d7..c9089c19be4fe650593ce18a744a1a7e6652e598 100644 (file)
@@ -1,12 +1,14 @@
 --TEST--
 function test: mysqli_field_count()
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
 --FILE--
 <?php
 
        include "connect.inc";
        
        /*** test mysqli_connect 127.0.0.1 ***/
-       $link = mysqli_connect("localhost", $user, $passwd);
+       $link = mysqli_connect($host, $user, $passwd);
 
        mysqli_select_db($link, "test");
 
index 858b3e3393a7a7b746080677a171b4ca1e225db9..ecd4f908f11204f1661677f8846678dd074226bc 100644 (file)
@@ -1,12 +1,14 @@
 --TEST--
 function test: mysqli_num_fields()
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
 --FILE--
 <?php
 
        include "connect.inc";
        
        /*** test mysqli_connect 127.0.0.1 ***/
-       $link = mysqli_connect("localhost", $user, $passwd);
+       $link = mysqli_connect($host, $user, $passwd);
 
        mysqli_select_db($link, "test");
 
index 6ddb37bc5f7c314f44aec1877eb876d32a3c65b0..1d5ab991062e328046ce385c8e8856ad263360af 100644 (file)
@@ -1,12 +1,14 @@
 --TEST--
 function test: mysqli_num_fields() 2
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
 --FILE--
 <?php
 
        include "connect.inc";
        
        /*** test mysqli_connect 127.0.0.1 ***/
-       $link = mysqli_connect("localhost", $user, $passwd);
+       $link = mysqli_connect($host, $user, $passwd);
 
        mysqli_real_query($link, "SHOW VARIABLES");
 
index 477e2a5274a2bb6ea250fa8c1a9a882c51536136..79bfe0d5fb4859aaacf0f374c73053fc89a85e8f 100644 (file)
@@ -1,12 +1,14 @@
 --TEST--
 function test: mysqli_num_rows()
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
 --FILE--
 <?php
 
        include "connect.inc";
        
        /*** test mysqli_connect 127.0.0.1 ***/
-       $link = mysqli_connect("localhost", $user, $passwd);
+       $link = mysqli_connect($host, $user, $passwd);
 
        mysqli_select_db($link, "test");
 
index 6fb8ee7e3fbdb41e616791c44b727049677ea062..e78c60a9568f6c072517f873c4801149460235f7 100644 (file)
@@ -1,12 +1,14 @@
 --TEST--
 function test: mysqli_warning_count()
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
 --FILE--
 <?php
 
        include "connect.inc";
        
        /*** test mysqli_connect 127.0.0.1 ***/
-       $link = mysqli_connect("localhost", $user, $passwd);
+       $link = mysqli_connect($host, $user, $passwd);
 
        mysqli_select_db($link, "test");
 
index 8db17138c02f287750c96e13bd46bb28e2108861..fe6d23e172afe0441ba44f146effa6be13724262 100644 (file)
@@ -1,11 +1,13 @@
 --TEST--
 mysqli_fetch_object
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
 --FILE--
 <?php
        include "connect.inc";
        
        /*** test mysqli_connect 127.0.0.1 ***/
-       $link = mysqli_connect("localhost", $user, $passwd);
+       $link = mysqli_connect($host, $user, $passwd);
 
        mysqli_select_db($link, "test");
 
index 7aae6df9b4a9649d0bb8a7fed139285ad7d7a1c9..fb0284e06a3929b4cf20481ae0830c46ffa5e443 100644 (file)
@@ -1,11 +1,13 @@
 --TEST--
 mysqli_bind_param (UPDATE)
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
 --FILE--
 <?php
        include "connect.inc";
        
        /*** test mysqli_connect 127.0.0.1 ***/
-       $link = mysqli_connect("localhost", $user, $passwd);
+       $link = mysqli_connect($host, $user, $passwd);
 
        mysqli_select_db($link, "test");
 
index 5f72f65e38ece430237656448dd17295476085e1..28e73a7e0999b68043f61aafab6523920ddf4230 100644 (file)
@@ -1,11 +1,13 @@
 --TEST--
 mysqli_get_server_version
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
 --FILE--
 <?php
        include "connect.inc";
        
        /*** test mysqli_connect 127.0.0.1 ***/
-       $link = mysqli_connect("localhost", $user, $passwd);
+       $link = mysqli_connect($host, $user, $passwd);
 
        $i = mysqli_get_server_version($link);
 
index dc58bcfb089882939f9ae2c6799fb84c0847692f..5a6efeafb726ce081e9f46f8c7bde1ead6c079a6 100644 (file)
@@ -3,7 +3,7 @@ mysqli_bind_result (SHOW)
 --SKIPIF--
 <?php  
        include "connect.inc";
-       $link = mysqli_connect("localhost", $user, $passwd);
+       $link = mysqli_connect($host, $user, $passwd);
 
 
        $stmt = mysqli_prepare($link, "SHOW VARIABLES LIKE 'port'");
@@ -15,12 +15,14 @@ mysqli_bind_result (SHOW)
        $stmt->close();
        mysqli_close($link);
 ?>
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
 --FILE--
 <?php
        include "connect.inc";
        
        /*** test mysqli_connect 127.0.0.1 ***/
-       $link = mysqli_connect("localhost", $user, $passwd);
+       $link = mysqli_connect($host, $user, $passwd);
 
        $stmt = mysqli_prepare($link, "SHOW VARIABLES LIKE 'port'");
        mysqli_execute($stmt);
index bd6bc0efdb0f37faee07bd25fbcbc61a4f3004f3..e88348bfa92599457a7e8d5d145175269948b250 100644 (file)
@@ -1,11 +1,13 @@
 --TEST--
 mysqli_stmt_affected_rows (delete)
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
 --FILE--
 <?php
        include "connect.inc";
        
        /*** test mysqli_connect 127.0.0.1 ***/
-       $link = mysqli_connect("localhost", $user, $passwd);
+       $link = mysqli_connect($host, $user, $passwd);
 
        mysqli_select_db($link, "test");
 
index 7862846dc02d132fd95d2426ed28617c37765284..56acddd6887cde1ae29f717e549a3d4509b0550c 100644 (file)
@@ -1,11 +1,13 @@
 --TEST--
 mysqli_get_metadata
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
 --FILE--
 <?php
        include "connect.inc";
        
        /*** test mysqli_connect 127.0.0.1 ***/
-       $link = mysqli_connect("localhost", $user, $passwd);
+       $link = mysqli_connect($host, $user, $passwd);
 
        mysqli_select_db($link, "test");
 
index 102bcdfc26a59ba57ff8e7fa4ef87a5c39d55795..1cf5b67894b9a81a873d3ddd85b962abf300d1b8 100644 (file)
@@ -1,11 +1,13 @@
 --TEST--
 mysqli bind_result (OO-Style) 
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
 --FILE--
 <?php
        include "connect.inc";
        
        /*** test mysqli_connect 127.0.0.1 ***/
-       $mysql = mysqli_connect("localhost", $user, $passwd);
+       $mysql = mysqli_connect($host, $user, $passwd);
 
        $mysql->select_db("test");              
        $mysql->query("DROP TABLE IF EXISTS test_fetch_null");
index 04e705de6ee66bf485e94004fa3d8000070bdb44..13ea5594c31e276dd13e650161cb8430f5c27f03 100644 (file)
@@ -1,23 +1,23 @@
 --TEST--
 mysql_fetch_row (OO-Style) 
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
 --FILE--
 <?php
        include "connect.inc";
        
        /*** test mysqli_connect 127.0.0.1 ***/
-       $mysql = mysqli_connect("localhost", $user, $passwd);
+       $mysql = mysqli_connect($host, $user, $passwd);
 
        $mysql->select_db("test");              
        $result = $mysql->query("SELECT CURRENT_USER()");
        $row = $result->fetch_row();
        $result->close();
-       
-       var_dump($row);
+
+       $ok = ($row[0] == $user . "@" . $host); 
+       var_dump($ok);
 
        $mysql->close();
 ?>
 --EXPECT--
-array(1) {
-  [0]=>
-  string(14) "root@localhost"
-}
+bool(true)
index 9ab5d346f89b4614f4062fa0b1df40b3a5ece323..5f923ccf34bd910bf7e03045daf5e41f17b93829 100644 (file)
@@ -1,5 +1,7 @@
 --TEST--
 non freed statement test 
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
 --FILE--
 <?php
        include "connect.inc";
@@ -7,7 +9,7 @@ non freed statement test
        /************************
         * non freed stamement
         ************************/
-       $link = mysqli_connect("localhost", $user, $passwd);
+       $link = mysqli_connect($host, $user, $passwd);
 
        $stmt = mysqli_prepare($link, "SELECT CURRENT_USER()");
        mysqli_execute($stmt);
index dde734a1e0190e13e2091f6b74e912e9be691bd9..ef378757f1adf2c5feda7d9cbfc67bce4d15be4b 100644 (file)
@@ -1,5 +1,7 @@
 --TEST--
 free statement after close 
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
 --FILE--
 <?php
        include "connect.inc";
@@ -7,7 +9,7 @@ free statement after close
        /************************
         * free statement after close 
         ************************/
-       $link = mysqli_connect("localhost", $user, $passwd);
+       $link = mysqli_connect($host, $user, $passwd);
 
        $stmt1 = mysqli_prepare($link, "SELECT CURRENT_USER()");
        mysqli_execute($stmt1);
index 4ae9b12c503443ceaded3e14f593c2dedee17c95..3fa5dc8f1702810d41c4ff3e8642510043ce7628 100644 (file)
@@ -1,5 +1,7 @@
 --TEST--
 call statement after close
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
 --FILE--
 <?php
        include "connect.inc";
@@ -7,7 +9,7 @@ call statement after close
        /************************
         * statement call  after close 
         ************************/
-       $link = mysqli_connect("localhost", $user, $passwd);
+       $link = mysqli_connect($host, $user, $passwd);
 
        $stmt2 = mysqli_prepare($link, "SELECT CURRENT_USER()");
 
index f542d0f0994892286751837416b63c4824a727a8..99148c7e80dd1031eade380f2093c284f31b9ff8 100644 (file)
@@ -1,5 +1,7 @@
 --TEST--
 not freed resultset 
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
 --FILE--
 <?php
        include "connect.inc";
@@ -7,7 +9,7 @@ not freed resultset
        /************************
         * non freed resultset 
         ************************/
-       $link = mysqli_connect("localhost", $user, $passwd);
+       $link = mysqli_connect($host, $user, $passwd);
 
        $result = mysqli_query($link, "SELECT CURRENT_USER()");
        mysqli_close($link);
index eab207db4dd9dc2635d6c557ff6cc7d1ce84717c..727b87ef8e99c2f0326cdbe8bb31dff24658848e 100644 (file)
@@ -1,5 +1,7 @@
 --TEST--
 free resultset after close 
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
 --FILE--
 <?php
        include "connect.inc";
@@ -7,7 +9,7 @@ free resultset after close
        /************************
         * free resultset after close 
         ************************/
-       $link = mysqli_connect("localhost", $user, $passwd);
+       $link = mysqli_connect($host, $user, $passwd);
 
        $result1 = mysqli_query($link, "SELECT CURRENT_USER()");
        mysqli_close($link);
index e777bcfc99403146aebe3391ad504b70ae40e25b..e650dbcecdd1e41a75f3905d095e256e476cf920 100644 (file)
@@ -1,5 +1,7 @@
 --TEST--
 free nothing 
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
 --FILE--
 <?php
        include "connect.inc";
@@ -7,7 +9,7 @@ free nothing
        /************************
         * don't free anything 
         ************************/
-       $link = mysqli_connect("localhost", $user, $passwd);
+       $link = mysqli_connect($host, $user, $passwd);
 
        $result2 = mysqli_query($link, "SELECT CURRENT_USER()");
        $stmt2 = mysqli_prepare($link, "SELECT CURRENT_USER()");
index cee7df1e5fbc2bb803f11279ef7649d7636d92a2..cc5c32fc6099c202f1b42cecae6b818835a53ebf 100644 (file)
@@ -1,5 +1,7 @@
 --TEST--
 extend mysqli 
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
 --FILE--
 <?php
        include "connect.inc";
@@ -11,7 +13,7 @@ extend mysqli
        }
 
        $foo = new foobar();
-       $foo->connect("localhost", $user, $passwd);
+       $foo->connect($host, $user, $passwd);
        $foo->close();
        printf("%s\n", $foo->test());
 ?>
index 581201d8efd734334716b4efc8b48d453fc3d572..a987c72381c45b0fd22fd86199032da580b981cc 100644 (file)
@@ -1,11 +1,13 @@
 --TEST--
 mysqli_get_metadata
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
 --FILE--
 <?php
        include "connect.inc";
        
        /*** test mysqli_connect 127.0.0.1 ***/
-       $link = mysqli_connect("localhost", $user, $passwd);
+       $link = mysqli_connect($host, $user, $passwd);
 
        mysqli_select_db($link, "test");
 
index d46e8d65a838b3cf83afb4072f99ad4f7a58e7e0..7554d08f687273b5db650373176e2f26e36c5c87 100644 (file)
@@ -1,11 +1,13 @@
 --TEST--
 multiple binds
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
 --FILE--
 <?php
        include "connect.inc";
        
        /*** test mysqli_connect 127.0.0.1 ***/
-       $link = mysqli_connect("localhost", $user, $passwd);
+       $link = mysqli_connect($host, $user, $passwd);
 
        mysqli_select_db($link, "test");
 
index 80d8a3501245255aadbb8a8f2a800069edbbeb47..0bc8a62bbf1123c414744c41a55670ad37768725 100644 (file)
@@ -1,11 +1,13 @@
 --TEST--
 sqlmode + bind
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
 --FILE--
 <?php
        include "connect.inc";
        
        /*** test mysqli_connect 127.0.0.1 ***/
-       $link = mysqli_connect("localhost", $user, $passwd);
+       $link = mysqli_connect($host, $user, $passwd);
 
        mysqli_select_db($link, "test");
 
index f7afaa7e1a8daf258b36f6f78073b20cffc67cfd..875130dc55507f53210844153e39b7d99f35758c 100644 (file)
@@ -1,5 +1,7 @@
 --TEST--
 mysqli_fetch_object with classes
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
 --FILE--
 <?php
        include "connect.inc";
@@ -11,7 +13,7 @@ mysqli_fetch_object with classes
        }
        
        /*** test mysqli_connect 127.0.0.1 ***/
-       $link = mysqli_connect("localhost", $user, $passwd);
+       $link = mysqli_connect($host, $user, $passwd);
 
        mysqli_select_db($link, "test");
 
index 438f4a203ae42cb3e77d9e56d4f22a2ab8cef9d4..9c278353c62fa7ae261df5e12a229d65a8953a61 100644 (file)
@@ -1,5 +1,7 @@
 --TEST--
 local infile handler
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
 --FILE--
 <?php
        include "connect.inc";
@@ -10,7 +12,7 @@ local infile handler
        }
        
        /*** test mysqli_connect 127.0.0.1 ***/
-       $link = mysqli_connect("localhost", $user, $passwd, "test");
+       $link = mysqli_connect($host, $user, $passwd, "test");
 
        /* create temporary file */
        $fp = fopen("061.csv", "w");
index 82845e16d6d627c01eb9fcbbc434fa1874ce5dbd..b50de178b2236abb2b21bc7b290d483f7ff79962 100644 (file)
@@ -1,5 +1,7 @@
 --TEST--
 constructor test
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
 --FILE--
 <?php
        include "connect.inc";
@@ -7,7 +9,8 @@ constructor test
        /* class 1 calls parent constructor */
        class mysql1 extends mysqli {
                function __construct() {
-                       parent::__construct("localhost", "root", "", "test");
+                       global $host, $user, $passwd;
+                       parent::__construct($host, $user, $passwd, "test");
                }
        }
 
@@ -15,7 +18,8 @@ constructor test
        class mysql2 extends mysqli {
                
                function __construct() {
-                       $this->connect("localhost", "root", "", "test");
+                       global $host, $user, $passwd;
+                       $this->connect($host, $user, $passwd, "test");
                }
        }
 
@@ -26,7 +30,7 @@ constructor test
 
        $foo[0] = new mysql1(); 
        $foo[1] = new mysql2(); 
-       $foo[2] = new mysql3("localhost", "root", "", "test");
+       $foo[2] = new mysql3($host, $user, $passwd, "test");
 
 
        for ($i=0; $i < 3; $i++) {
index f441cf0f190477203755bca23c701d0e13139203..67c1fc22d1a0360b880e3fa205e47102efc73fa9 100644 (file)
@@ -1,5 +1,7 @@
 --TEST--
 Bug #30967 testcase (properties)
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
 --FILE--
 <?php
        include "connect.inc";
@@ -10,7 +12,7 @@ Bug #30967 testcase (properties)
        class mysql2 extends mysql1 {
        }
 
-       $mysql = new mysql2("localhost", "root", "", "test");
+       $mysql = new mysql2($host, "root", "", "test");
 
        $mysql->query("THIS DOES NOT WORK");
        printf("%d\n", $mysql->errno);