uw Wed Oct 10 10:10:59 2007 UTC
Modified files: (Branch: PHP_5_3)
/php-src/ext/mysqli/tests bug28817.phpt bug29311.phpt bug30967.phpt
bug31141.phpt bug31668.phpt bug32405.phpt
bug33090.phpt bug33263.phpt bug33491.phpt
bug34785.phpt bug34810.phpt bug35103.phpt
bug35517.phpt bug35759.phpt bug36420.phpt
bug36745.phpt bug36802.phpt bug36949.phpt
bug37090.phpt bug38710.phpt
Log:
Further changes to regression/bug-verification tests.
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/bug28817.phpt?r1=1.2.4.1&r2=1.2.4.1.2.1&diff_format=u
Index: php-src/ext/mysqli/tests/bug28817.phpt
diff -u php-src/ext/mysqli/tests/bug28817.phpt:1.2.4.1
php-src/ext/mysqli/tests/bug28817.phpt:1.2.4.1.2.1
--- php-src/ext/mysqli/tests/bug28817.phpt:1.2.4.1 Mon May 7 18:02:59 2007
+++ php-src/ext/mysqli/tests/bug28817.phpt Wed Oct 10 10:10:59 2007
@@ -1,7 +1,10 @@
--TEST--
Bug #28817 (problems with properties declared in the class extending MySQLi)
--SKIPIF--
-<?php require_once('skipif.inc'); ?>
+<?php
+require_once('skipif.inc');
+require_once('skipifconnectfailure.inc');
+?>
--FILE--
<?php
include "connect.inc";
@@ -21,19 +24,19 @@
var_dump($mysql->p_test);
@var_dump($mysql->errno);
- $mysql->connect($host, $user, $passwd);
+ $mysql->connect($host, $user, $passwd, $db, $port, $socket);
$mysql->select_db("nonexistingdb");
var_dump($mysql->errno > 0);
- $mysql->close();
+ $mysql->close();
?>
--EXPECTF--
array(2) {
[0]=>
- string(3) "foo"
+ %s(3) "foo"
[1]=>
- string(3) "bar"
+ %s(3) "bar"
}
NULL
-bool(true)
+bool(true)
\ No newline at end of file
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/bug29311.phpt?r1=1.3&r2=1.3.6.1&diff_format=u
Index: php-src/ext/mysqli/tests/bug29311.phpt
diff -u php-src/ext/mysqli/tests/bug29311.phpt:1.3
php-src/ext/mysqli/tests/bug29311.phpt:1.3.6.1
--- php-src/ext/mysqli/tests/bug29311.phpt:1.3 Sat Dec 4 08:50:33 2004
+++ php-src/ext/mysqli/tests/bug29311.phpt Wed Oct 10 10:10:59 2007
@@ -1,48 +1,51 @@
--TEST--
constructor test
--SKIPIF--
-<?php require_once('skipif.inc'); ?>
+<?php
+require_once('skipif.inc');
+require_once('skipifconnectfailure.inc');
+?>
--FILE--
<?php
include "connect.inc";
-
+
/* class 1 calls parent constructor */
class mysql1 extends mysqli {
function __construct() {
- global $host, $user, $passwd;
- parent::__construct($host, $user, $passwd, "test");
+ global $host, $user, $passwd, $db, $port, $socket;
+ parent::__construct($host, $user, $passwd, $db, $port,
$socket);
}
}
/* class 2 has an own constructor */
class mysql2 extends mysqli {
-
+
function __construct() {
- global $host, $user, $passwd;
- $this->connect($host, $user, $passwd, "test");
+ global $host, $user, $passwd, $db, $port, $socket;
+ $this->connect($host, $user, $passwd, $db, $port,
$socket);
}
}
/* class 3 has no constructor */
class mysql3 extends mysqli {
-
+
}
- $foo[0] = new mysql1();
- $foo[1] = new mysql2();
- $foo[2] = new mysql3($host, $user, $passwd, "test");
+ $foo[0] = new mysql1();
+ $foo[1] = new mysql2();
+ $foo[2] = new mysql3($host, $user, $passwd, $db, $port, $socket);
for ($i=0; $i < 3; $i++) {
if (($result = $foo[$i]->query("SELECT DATABASE()"))) {
$row = $result->fetch_row();
- printf("%d: %s\n", $i, $row[0]);
+ if ($row[0] != $db)
+ printf("%d: %s\n", $i, $row[0]);
$result->close();
}
$foo[$i]->close();
}
+ print "done!";
?>
--EXPECTF--
-0: test
-1: test
-2: test
+done!
\ No newline at end of file
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/bug30967.phpt?r1=1.4.4.1&r2=1.4.4.1.2.1&diff_format=u
Index: php-src/ext/mysqli/tests/bug30967.phpt
diff -u php-src/ext/mysqli/tests/bug30967.phpt:1.4.4.1
php-src/ext/mysqli/tests/bug30967.phpt:1.4.4.1.2.1
--- php-src/ext/mysqli/tests/bug30967.phpt:1.4.4.1 Mon May 7 18:03:00 2007
+++ php-src/ext/mysqli/tests/bug30967.phpt Wed Oct 10 10:10:59 2007
@@ -1,7 +1,10 @@
--TEST--
Bug #30967 (problems with properties declared in the class extending the class
extending MySQLi)
--SKIPIF--
-<?php require_once('skipif.inc'); ?>
+<?php
+require_once('skipif.inc');
+require_once('skipifconnectfailure.inc');
+?>
--FILE--
<?php
include "connect.inc";
@@ -12,12 +15,12 @@
class mysql2 extends mysql1 {
}
- $mysql = new mysql2($host, $user, $passwd, "test");
+ $mysql = new mysql2($host, $user, $passwd, $db, $port, $socket);
$mysql->query("THIS DOES NOT WORK");
printf("%d\n", $mysql->errno);
- $mysql->close();
+ $mysql->close();
?>
--EXPECTF--
1064
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/bug31141.phpt?r1=1.1.6.1&r2=1.1.6.1.2.1&diff_format=u
Index: php-src/ext/mysqli/tests/bug31141.phpt
diff -u php-src/ext/mysqli/tests/bug31141.phpt:1.1.6.1
php-src/ext/mysqli/tests/bug31141.phpt:1.1.6.1.2.1
--- php-src/ext/mysqli/tests/bug31141.phpt:1.1.6.1 Mon May 7 18:03:00 2007
+++ php-src/ext/mysqli/tests/bug31141.phpt Wed Oct 10 10:10:59 2007
@@ -22,7 +22,7 @@
--EXPECTF--
array(2) {
[0]=>
- string(3) "foo"
+ %s(3) "foo"
[1]=>
- string(3) "bar"
+ %s(3) "bar"
}
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/bug31668.phpt?r1=1.2.4.1&r2=1.2.4.1.2.1&diff_format=u
Index: php-src/ext/mysqli/tests/bug31668.phpt
diff -u php-src/ext/mysqli/tests/bug31668.phpt:1.2.4.1
php-src/ext/mysqli/tests/bug31668.phpt:1.2.4.1.2.1
--- php-src/ext/mysqli/tests/bug31668.phpt:1.2.4.1 Mon May 7 18:03:00 2007
+++ php-src/ext/mysqli/tests/bug31668.phpt Wed Oct 10 10:10:59 2007
@@ -1,15 +1,18 @@
--TEST--
Bug #31668 (multi_query works exactly every other time (multi_query was
global, now per connection))
--SKIPIF--
-<?php require_once('skipif.inc'); ?>
+<?php
+require_once('skipif.inc');
+require_once('skipifconnectfailure.inc');
+?>
--FILE--
<?php
include "connect.inc";
- $mysql = new mysqli($host, $user, $passwd, "test");
+ $mysql = new mysqli($host, $user, $passwd, $db, $port, $socket);
$mysql->multi_query('SELECT 1;SELECT 2');
do {
- $res = $mysql->store_result();
+ $res = $mysql->store_result();
if ($mysql->errno == 0) {
while ($arr = $res->fetch_assoc()) {
var_dump($arr);
@@ -20,10 +23,10 @@
var_dump($mysql->error, __LINE__);
$mysql->close();
- $mysql = new mysqli($host, $user, $passwd, "test");
+ $mysql = new mysqli($host, $user, $passwd, $db, $port, $socket);
$mysql->multi_query('SELECT 1;SELECT 2');
do {
- $res = $mysql->store_result();
+ $res = $mysql->store_result();
if ($mysql->errno == 0) {
while ($arr = $res->fetch_assoc()) {
var_dump($arr);
@@ -36,21 +39,21 @@
--EXPECTF--
array(1) {
[1]=>
- string(1) "1"
+ %s(1) "1"
}
array(1) {
[2]=>
- string(1) "2"
+ %s(1) "2"
}
-string(0) ""
+%s(0) ""
int(%d)
array(1) {
[1]=>
- string(1) "1"
+ %s(1) "1"
}
array(1) {
[2]=>
- string(1) "2"
+ %s(1) "2"
}
-string(0) ""
+%s(0) ""
int(%d)
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/bug32405.phpt?r1=1.1.4.1.2.1&r2=1.1.4.1.2.1.2.1&diff_format=u
Index: php-src/ext/mysqli/tests/bug32405.phpt
diff -u php-src/ext/mysqli/tests/bug32405.phpt:1.1.4.1.2.1
php-src/ext/mysqli/tests/bug32405.phpt:1.1.4.1.2.1.2.1
--- php-src/ext/mysqli/tests/bug32405.phpt:1.1.4.1.2.1 Mon May 7 18:03:00 2007
+++ php-src/ext/mysqli/tests/bug32405.phpt Wed Oct 10 10:10:59 2007
@@ -1,13 +1,16 @@
--TEST--
Bug #32405 (mysqli->fetch() is returning bad data)
--SKIPIF--
-<?php require_once('skipif.inc'); ?>
+<?php
+require_once('skipif.inc');
+require_once('skipifconnectfailure.inc');
+?>
--FILE--
<?php
include ("connect.inc");
/*** test mysqli_connect 127.0.0.1 ***/
- $link = mysqli_connect($host, $user, $passwd);
+ $link = mysqli_connect($host, $user, $passwd, $db, $port, $socket);
mysqli_select_db($link, "test");
mysqli_query($link, "SET sql_mode=''");
@@ -28,12 +31,12 @@
mysqli_query($link,"DROP TABLE test_users");
mysqli_close($link);
?>
---EXPECT--
+--EXPECTF--
int(1)
-string(5) "user1"
+%s(5) "user1"
int(2)
-string(5) "user2"
+%s(5) "user2"
int(3)
-string(5) "user3"
+%s(5) "user3"
int(4)
-string(5) "user4"
+%s(5) "user4"
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/bug33090.phpt?r1=1.1.6.1&r2=1.1.6.1.2.1&diff_format=u
Index: php-src/ext/mysqli/tests/bug33090.phpt
diff -u php-src/ext/mysqli/tests/bug33090.phpt:1.1.6.1
php-src/ext/mysqli/tests/bug33090.phpt:1.1.6.1.2.1
--- php-src/ext/mysqli/tests/bug33090.phpt:1.1.6.1 Mon May 7 18:03:00 2007
+++ php-src/ext/mysqli/tests/bug33090.phpt Wed Oct 10 10:10:59 2007
@@ -1,14 +1,17 @@
--TEST--
Bug #33090 (mysql_prepare doesn't return an error)
--SKIPIF--
-<?php require_once('skipif.inc'); ?>
+<?php
+require_once('skipif.inc');
+require_once('skipifconnectfailure.inc');
+?>
--FILE--
<?php
include ("connect.inc");
/*** test mysqli_connect 127.0.0.1 ***/
- $link = mysqli_connect($host, $user, $passwd);
- mysqli_select_db($link, "test");
+ $link = mysqli_connect($host, $user, $passwd, null, $port, $socket);
+ mysqli_select_db($link, $db);
if (!($link->prepare("this makes no sense"))) {
printf("%d\n", $link->errno);
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/bug33263.phpt?r1=1.1.6.2&r2=1.1.6.2.2.1&diff_format=u
Index: php-src/ext/mysqli/tests/bug33263.phpt
diff -u php-src/ext/mysqli/tests/bug33263.phpt:1.1.6.2
php-src/ext/mysqli/tests/bug33263.phpt:1.1.6.2.2.1
--- php-src/ext/mysqli/tests/bug33263.phpt:1.1.6.2 Mon May 7 18:03:00 2007
+++ php-src/ext/mysqli/tests/bug33263.phpt Wed Oct 10 10:10:59 2007
@@ -1,8 +1,11 @@
--TEST--
-Bug #33263 (mysqli_real_connect in __construct)
+Bug #33263 (mysqli_real_connect in __construct)
--SKIPIF--
-<?php require_once('skipif.inc'); ?>
-<?php require_once('skipifemb.inc'); ?>
+<?php
+require_once('skipif.inc');
+require_once('skipifemb.inc');
+require_once('skipifconnectfailure.inc');
+?>
--FILE--
<?php
@@ -10,23 +13,26 @@
class test extends mysqli
{
- public function __construct($host, $user, $passwd, $db) {
+ public function __construct($host, $user, $passwd, $db, $port,
$socket) {
parent::init();
- parent::real_connect($host, $user, $passwd, $db);
+ parent::real_connect($host, $user, $passwd, $db, $port,
$socket);
}
}
- $mysql = new test($host, $user, $passwd, "test");
+ $mysql = new test($host, $user, $passwd, $db, $port, $socket);
$stmt = $mysql->prepare("SELECT DATABASE()");
$stmt->execute();
- $stmt->bind_result($db);
+ $stmt->bind_result($database);
$stmt->fetch();
$stmt->close();
- var_dump($db);
+ if ($database != $db)
+ printf("[001] Expecting '%s' got %s/'%s'.\n",
+ gettype($database), $database);
- $mysql->close();
+ $mysql->close();
+ print "done!";
?>
---EXPECT--
-string(4) "test"
+--EXPECTF--
+done!
\ No newline at end of file
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/bug33491.phpt?r1=1.1.2.1&r2=1.1.2.1.4.1&diff_format=u
Index: php-src/ext/mysqli/tests/bug33491.phpt
diff -u php-src/ext/mysqli/tests/bug33491.phpt:1.1.2.1
php-src/ext/mysqli/tests/bug33491.phpt:1.1.2.1.4.1
--- php-src/ext/mysqli/tests/bug33491.phpt:1.1.2.1 Thu Oct 13 21:26:45 2005
+++ php-src/ext/mysqli/tests/bug33491.phpt Wed Oct 10 10:10:59 2007
@@ -3,7 +3,10 @@
--INI--
error_reporting=4095
--SKIPIF--
-<?php require_once('skipif.inc'); ?>
+<?php
+require_once('skipif.inc');
+require_once('skipifconnectfailure.inc');
+?>
--FILE--
<?php
@@ -15,10 +18,10 @@
}
}
-require_once dirname(__FILE__)."/connect.inc";
+require_once("connect.inc");
// Segfault when using the DB class which extends mysqli
-$DB = new DB($host, $user, $passwd, '');
+$DB = new DB($host, $user, $passwd, $db, $port, $socket);
$DB->query_single('SELECT DATE()');
?>
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/bug34785.phpt?r1=1.1.2.1.2.1&r2=1.1.2.1.2.1.2.1&diff_format=u
Index: php-src/ext/mysqli/tests/bug34785.phpt
diff -u php-src/ext/mysqli/tests/bug34785.phpt:1.1.2.1.2.1
php-src/ext/mysqli/tests/bug34785.phpt:1.1.2.1.2.1.2.1
--- php-src/ext/mysqli/tests/bug34785.phpt:1.1.2.1.2.1 Mon May 7 18:03:00 2007
+++ php-src/ext/mysqli/tests/bug34785.phpt Wed Oct 10 10:10:59 2007
@@ -1,7 +1,10 @@
--TEST--
Bug #34785 (Can not properly subclass mysqli_stmt)
--SKIPIF--
-<?php require_once('skipif.inc'); ?>
+<?php
+require_once('skipif.inc');
+require_once('skipifconnectfailure.inc');
+?>
--FILE--
<?php
include ("connect.inc");
@@ -21,7 +24,7 @@
}
/*** test mysqli_connect 127.0.0.1 ***/
- $link = mysqli_connect($host, $user, $passwd);
+ $link = mysqli_connect($host, $user, $passwd, $db, $port, $socket);
mysqli_query($link, "SET sql_mode=''");
$stmt = new my_stmt($link, "SELECT 'foo' FROM DUAL");
@@ -42,6 +45,6 @@
mysqli_close($link);
?>
---EXPECT--
-string(3) "foo"
-string(3) "bar"
+--EXPECTF--
+%s(3) "foo"
+%s(3) "bar"
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/bug34810.phpt?r1=1.1.2.3.2.1&r2=1.1.2.3.2.1.2.1&diff_format=u
Index: php-src/ext/mysqli/tests/bug34810.phpt
diff -u php-src/ext/mysqli/tests/bug34810.phpt:1.1.2.3.2.1
php-src/ext/mysqli/tests/bug34810.phpt:1.1.2.3.2.1.2.1
--- php-src/ext/mysqli/tests/bug34810.phpt:1.1.2.3.2.1 Mon May 7 18:03:00 2007
+++ php-src/ext/mysqli/tests/bug34810.phpt Wed Oct 10 10:10:59 2007
@@ -1,7 +1,10 @@
--TEST--
Bug #34810 (mysqli::init() and others use wrong $this pointer without checks)
--SKIPIF--
-<?php require_once('skipif.inc'); ?>
+<?php
+require_once('skipif.inc');
+require_once('skipifconnectfailure.inc');
+?>
--FILE--
<?php
@@ -9,13 +12,13 @@
public function connect() {
include "connect.inc";
- $link = mysqli_connect($host, $user, $passwd);
+ $link = mysqli_connect($host, $user, $passwd, $db, $port,
$socket);
var_dump($link);
$link = mysqli_init();
var_dump($link);
- $mysql = new mysqli($host, $user, $passwd, "test");
+ $mysql = new mysqli($host, $user, $passwd, $db, $port, $socket);
$mysql->query("DROP TABLE IF EXISTS test_warnings");
$mysql->query("CREATE TABLE test_warnings (a int not null)");
$mysql->query("SET sql_mode=''");
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/bug35103.phpt?r1=1.1.2.1.2.1&r2=1.1.2.1.2.1.2.1&diff_format=u
Index: php-src/ext/mysqli/tests/bug35103.phpt
diff -u php-src/ext/mysqli/tests/bug35103.phpt:1.1.2.1.2.1
php-src/ext/mysqli/tests/bug35103.phpt:1.1.2.1.2.1.2.1
--- php-src/ext/mysqli/tests/bug35103.phpt:1.1.2.1.2.1 Mon May 7 18:03:00 2007
+++ php-src/ext/mysqli/tests/bug35103.phpt Wed Oct 10 10:10:59 2007
@@ -1,7 +1,10 @@
--TEST--
Bug #35103 (Bad handling of unsigned bigint)
--SKIPIF--
-<?php require_once('skipif.inc'); ?>
+<?php
+require_once('skipif.inc');
+require_once('skipifconnectfailure.inc');
+?>
--FILE--
<?php
@@ -11,7 +14,7 @@
EOSQL;
include "connect.inc";
- $mysql = new mysqli($host, $user, $passwd, "test");
+ $mysql = new mysqli($host, $user, $passwd, $db, $port, $socket);
$mysql->query("DROP TABLE IF EXISTS test_bint");
$mysql->query("CREATE TABLE test_bint (a bigint(20) default NULL)
ENGINE=MYISAM");
$mysql->query("INSERT INTO test_bint VALUES
(9223372036854775807),(-9223372036854775808),(-2147483648),(-2147483649),(-2147483647),(2147483647),(2147483648),(2147483649)");
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/bug35517.phpt?r1=1.1.2.1.2.1&r2=1.1.2.1.2.1.2.1&diff_format=u
Index: php-src/ext/mysqli/tests/bug35517.phpt
diff -u php-src/ext/mysqli/tests/bug35517.phpt:1.1.2.1.2.1
php-src/ext/mysqli/tests/bug35517.phpt:1.1.2.1.2.1.2.1
--- php-src/ext/mysqli/tests/bug35517.phpt:1.1.2.1.2.1 Mon May 7 18:03:00 2007
+++ php-src/ext/mysqli/tests/bug35517.phpt Wed Oct 10 10:10:59 2007
@@ -1,12 +1,15 @@
--TEST--
Bug #35517 (mysqli_stmt_fetch returns NULL)
--SKIPIF--
-<?php require_once('skipif.inc'); ?>
+<?php
+require_once('skipif.inc');
+require_once('skipifconnectfailure.inc');
+?>
--FILE--
<?php
include "connect.inc";
- $mysql = new mysqli($host, $user, $passwd, "test");
+ $mysql = new mysqli($host, $user, $passwd, $db, $port, $socket);
$mysql->query("CREATE TABLE temp (id INT UNSIGNED NOT NULL)");
$mysql->query("INSERT INTO temp (id) VALUES
(3000000897),(3800001532),(3900002281),(3100059612)");
@@ -23,7 +26,7 @@
$mysql->close();
?>
--EXPECTF--
-string(10) "3000000897"
-string(10) "3800001532"
-string(10) "3900002281"
-string(10) "3100059612"
+%s(10) "3000000897"
+%s(10) "3800001532"
+%s(10) "3900002281"
+%s(10) "3100059612"
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/bug35759.phpt?r1=1.1.2.1.2.1&r2=1.1.2.1.2.1.2.1&diff_format=u
Index: php-src/ext/mysqli/tests/bug35759.phpt
diff -u php-src/ext/mysqli/tests/bug35759.phpt:1.1.2.1.2.1
php-src/ext/mysqli/tests/bug35759.phpt:1.1.2.1.2.1.2.1
--- php-src/ext/mysqli/tests/bug35759.phpt:1.1.2.1.2.1 Mon May 7 18:03:00 2007
+++ php-src/ext/mysqli/tests/bug35759.phpt Wed Oct 10 10:10:59 2007
@@ -1,7 +1,10 @@
--TEST--
Bug #35759 (mysqli_stmt_bind_result() makes huge allocation when column empty)
--SKIPIF--
-<?php require_once('skipif.inc'); ?>
+<?php
+require_once('skipif.inc');
+require_once('skipifconnectfailure.inc');
+?>
--FILE--
<?php
@@ -14,7 +17,7 @@
include "connect.inc";
$col_num= 1000;
- $mysql = new mysqli($host, $user, $passwd, "test");
+ $mysql = new mysqli($host, $user, $passwd, $db, $port, $socket);
$mysql->query("DROP TABLE IF EXISTS blobby");
$create = "CREATE TABLE blobby (a0 MEDIUMBLOB NOT NULL DEFAULT ''";
$i= 0;
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/bug36420.phpt?r1=1.1.2.2.2.1&r2=1.1.2.2.2.1.2.1&diff_format=u
Index: php-src/ext/mysqli/tests/bug36420.phpt
diff -u php-src/ext/mysqli/tests/bug36420.phpt:1.1.2.2.2.1
php-src/ext/mysqli/tests/bug36420.phpt:1.1.2.2.2.1.2.1
--- php-src/ext/mysqli/tests/bug36420.phpt:1.1.2.2.2.1 Mon May 7 18:03:00 2007
+++ php-src/ext/mysqli/tests/bug36420.phpt Wed Oct 10 10:10:59 2007
@@ -1,12 +1,15 @@
--TEST--
Bug #36420 (segfault when access result->num_rows after calling
result->close())
--SKIPIF--
-<?php require_once('skipif.inc'); ?>
+<?php
+require_once('skipif.inc');
+require_once('skipifconnectfailure.inc');
+?>
--FILE--
<?php
include "connect.inc";
-$mysqli = mysqli_connect($host, $user, $passwd);
+$mysqli = mysqli_connect($host, $user, $passwd, $db, $port, $socket);
$result = $mysqli->query('select 1');
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/bug36745.phpt?r1=1.1.2.1.2.2&r2=1.1.2.1.2.2.2.1&diff_format=u
Index: php-src/ext/mysqli/tests/bug36745.phpt
diff -u php-src/ext/mysqli/tests/bug36745.phpt:1.1.2.1.2.2
php-src/ext/mysqli/tests/bug36745.phpt:1.1.2.1.2.2.2.1
--- php-src/ext/mysqli/tests/bug36745.phpt:1.1.2.1.2.2 Mon May 7 18:03:00 2007
+++ php-src/ext/mysqli/tests/bug36745.phpt Wed Oct 10 10:10:59 2007
@@ -1,13 +1,16 @@
--TEST--
Bug #36745 (LOAD DATA LOCAL INFILE doesn't return correct error message)
--SKIPIF--
-<?php require_once('skipif.inc'); ?>
+<?php
+require_once('skipif.inc');
+require_once('skipifconnectfailure.inc');
+?>
--FILE--
<?php
include ("connect.inc");
/*** test mysqli_connect 127.0.0.1 ***/
- $mysql = mysqli_connect($host, $user, $passwd, "test");
+ $mysql = mysqli_connect($host, $user, $passwd, $db, $port, $socket);
$mysql->query("DROP TABLE IF EXISTS litest");
$mysql->query("CREATE TABLE litest (a VARCHAR(20))");
@@ -19,5 +22,5 @@
printf("Done");
?>
--EXPECTF--
-string(%d) "%s"
+%s(%d) "%s"
Done
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/bug36802.phpt?r1=1.1.2.1.2.2&r2=1.1.2.1.2.2.2.1&diff_format=u
Index: php-src/ext/mysqli/tests/bug36802.phpt
diff -u php-src/ext/mysqli/tests/bug36802.phpt:1.1.2.1.2.2
php-src/ext/mysqli/tests/bug36802.phpt:1.1.2.1.2.2.2.1
--- php-src/ext/mysqli/tests/bug36802.phpt:1.1.2.1.2.2 Mon May 7 18:03:00 2007
+++ php-src/ext/mysqli/tests/bug36802.phpt Wed Oct 10 10:10:59 2007
@@ -1,5 +1,5 @@
--TEST--
-Bug #36802 (crashes with mysql_init)
+Bug #36802 (crashes with with mysqli_set_charset())
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--FILE--
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/bug36949.phpt?r1=1.1.2.2&r2=1.1.2.2.2.1&diff_format=u
Index: php-src/ext/mysqli/tests/bug36949.phpt
diff -u php-src/ext/mysqli/tests/bug36949.phpt:1.1.2.2
php-src/ext/mysqli/tests/bug36949.phpt:1.1.2.2.2.1
--- php-src/ext/mysqli/tests/bug36949.phpt:1.1.2.2 Mon May 7 18:03:00 2007
+++ php-src/ext/mysqli/tests/bug36949.phpt Wed Oct 10 10:10:59 2007
@@ -1,18 +1,20 @@
--TEST--
Bug #36949 (invalid internal mysqli objects dtor)
--SKIPIF--
-<?php require_once('skipif.inc'); ?>
+<?php
+require_once('skipif.inc');
+require_once('skipifconnectfailure.inc');
+?>
--FILE--
<?php
include "connect.inc";
-
class A {
private $mysqli;
public function __construct() {
- global $user, $host, $passwd;
- $this->mysqli = new mysqli($host, $user, $passwd);
+ global $user, $host, $passwd, $db, $port, $socket;
+ $this->mysqli = new mysqli($host, $user, $passwd, $db, $port,
$socket);
$result = $this->mysqli->query("SELECT NOW() AS my_time FROM
DUAL");
$row = $result->fetch_object();
echo $row->my_time."<br>\n";
@@ -29,8 +31,8 @@
private $mysqli;
public function __construct() {
- global $user, $host, $passwd;
- $this->mysqli = new mysqli($host, $user, $passwd);
+ global $user, $host, $passwd, $db, $port, $socket;
+ $this->mysqli = new mysqli($host, $user, $passwd, $db, $port,
$socket);
$result = $this->mysqli->query("SELECT NOW() AS my_time FROM
DUAL");
$row = $result->fetch_object();
echo $row->my_time."<br>\n";
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/bug37090.phpt?r1=1.1.2.3&r2=1.1.2.3.2.1&diff_format=u
Index: php-src/ext/mysqli/tests/bug37090.phpt
diff -u php-src/ext/mysqli/tests/bug37090.phpt:1.1.2.3
php-src/ext/mysqli/tests/bug37090.phpt:1.1.2.3.2.1
--- php-src/ext/mysqli/tests/bug37090.phpt:1.1.2.3 Mon May 7 18:03:00 2007
+++ php-src/ext/mysqli/tests/bug37090.phpt Wed Oct 10 10:10:59 2007
@@ -1,16 +1,21 @@
--TEST--
Bug #37090 (mysqli_set_charset return code)
--SKIPIF--
-<?php require_once('skipif.inc');
+<?php
+require_once('skipif.inc');
+require_once('skipifconnectfailure.inc');
if (!function_exists('mysqli_set_charset')) {
die('skip mysqli_set_charset() not available');
}
+if (ini_get('unicode.semantics')) {
+ die("skip Functionality not available in unicode mode");
+}
?>
--FILE--
<?php
include "connect.inc";
- $mysql = new mysqli($host, $user, $passwd);
+ $mysql = new mysqli($host, $user, $passwd, $db, $port, $socket);
$cs = array();
$cs[] = $mysql->set_charset("latin5");
@@ -23,6 +28,7 @@
$cs[] = $mysql->character_set_name();
var_dump($cs);
+ print "done!";
?>
--EXPECT--
array(6) {
@@ -39,3 +45,4 @@
[5]=>
string(4) "utf8"
}
+done!
\ No newline at end of file
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/bug38710.phpt?r1=1.1.2.4&r2=1.1.2.4.2.1&diff_format=u
Index: php-src/ext/mysqli/tests/bug38710.phpt
diff -u php-src/ext/mysqli/tests/bug38710.phpt:1.1.2.4
php-src/ext/mysqli/tests/bug38710.phpt:1.1.2.4.2.1
--- php-src/ext/mysqli/tests/bug38710.phpt:1.1.2.4 Thu Sep 6 10:07:42 2007
+++ php-src/ext/mysqli/tests/bug38710.phpt Wed Oct 10 10:10:59 2007
@@ -3,21 +3,22 @@
--SKIPIF--
<?php
require_once('skipif.inc');
+require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
include "connect.inc";
-$db = new mysqli($host, $user, $passwd, "test");
+$db = new mysqli($host, $user, $passwd, $db, $port, $socket);
$qry=$db->stmt_init();
$qry->prepare("SELECT REPEAT('a',100000)");
$qry->execute();
$qry->bind_result($text);
$qry->fetch();
-if ($text !== str_repeat('a', mysqli_get_server_version($db) > 50110?
100000:(mysqli_get_server_version($db)>=50000? 8193:8191))) {
+if ($text !== str_repeat('a', ($IS_MYSQLND || mysqli_get_server_version($db) >
50110)? 100000:(mysqli_get_server_version($db)>=50000? 8193:8191))) {
var_dump(strlen($text));
}
echo "Done";
?>
--EXPECTF--
-Done
+Done
\ No newline at end of file
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php