File:
[ELWIX - Embedded LightWeight unIX -] /
embedaddon /
php /
ext /
mysqli /
tests /
bug50772.phpt
Revision
1.1.1.1 (vendor branch):
download - view:
text,
annotated -
select for diffs -
revision graph
Tue Feb 21 23:47:58 2012 UTC (12 years, 6 months ago) by
misho
Branches:
php,
MAIN
CVS tags:
v5_4_3elwix,
v5_4_29p0,
v5_4_29,
v5_4_20p0,
v5_4_20,
v5_4_17p0,
v5_4_17,
v5_3_10,
HEAD
php
--TEST--
Bug #50772 (mysqli constructor without parameters does not return a working mysqli object)
--SKIPIF--
<?php
require_once('skipif.inc');
require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
include "connect.inc";
$db1 = new mysqli();
// These calls fail
$db1->options(MYSQLI_OPT_CONNECT_TIMEOUT, 3);
my_mysqli_real_connect($db1, $host, $user, $passwd, $db, $port, $socket);
if(mysqli_connect_error()) {
echo "error 1\n";
} else {
echo "ok 1\n";
}
$db2 = mysqli_init();
$db2->options(MYSQLI_OPT_CONNECT_TIMEOUT, 3);
my_mysqli_real_connect($db2, $host, $user, $passwd, $db, $port, $socket);
if(mysqli_connect_error()) {
echo "error 2\n";
} else {
echo "ok 2\n";
}
echo "done\n";
?>
--EXPECTF--
ok 1
ok 2
done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>