php-src/ext/mysqli/tests/bug33263.phpt
Ulf Wendel 974935e6b8 Next set of files which now feature the new environment variable
MYSQL_TEST_SKIP_CONNECT_FAILURE which controls how connection problems
are handled: failure (MYSQL_TEST_SKIP_CONNECT_FAILURE = false, default)
or skip (MYSQL_TEST_SKIP_CONNECT_FAILURE = true)

Also, some minor tweaking of connection parameters in the tests.
2007-08-09 09:43:28 +00:00

36 lines
679 B
PHP

--TEST--
Bug #33263 (mysqli_real_connect in __construct)
--SKIPIF--
<?php
require_once('skipif.inc');
require_once('skipifemb.inc');
require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
include "connect.inc";
class test extends mysqli
{
public function __construct($host, $user, $passwd, $db, $port, $socket) {
parent::init();
parent::real_connect($host, $user, $passwd, $db, $port, $socket);
}
}
$mysql = new test($host, $user, $passwd, $db, $port, $socket);
$stmt = $mysql->prepare("SELECT DATABASE()");
$stmt->execute();
$stmt->bind_result($db);
$stmt->fetch();
$stmt->close();
var_dump($db);
$mysql->close();
?>
--EXPECTF--
%s(4) "test"