File:
[ELWIX - Embedded LightWeight unIX -] /
embedaddon /
php /
ext /
mysqli /
tests /
071.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--
mysqli thread_id & kill
--SKIPIF--
<?php
require_once('skipif.inc');
require_once('skipifemb.inc');
require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
require_once("connect.inc");
$mysql = new my_mysqli($host, $user, $passwd, $db, $port, $socket);
$version = $mysql->server_version;
var_dump($mysql->ping());
$ret = $mysql->kill($mysql->thread_id);
if ($IS_MYSQLND) {
if ($ret !== true){
printf("[001] Expecting boolean/true got %s/%s\n", gettype($ret), var_export($ret, true));
}
} else {
/* libmysql return value seems to depend on server version */
if ((($version >= 50123) || ($version <= 40200)) && $version != 50200) {
/* TODO: find exact version */
if ($ret !== true){
printf("[001] Expecting boolean/true got %s/%s @\n", gettype($ret), var_export($ret, true), $version);
}
} else {
if ($ret !== false){
printf("[001] Expecting boolean/false got %s/%s @\n", gettype($ret), var_export($ret, true), $version);
}
}
}
var_dump($mysql->ping());
$mysql->close();
$mysql = new my_mysqli($host, $user, $passwd, $db, $port, $socket);
var_dump(mysqli_ping($mysql));
$ret = $mysql->kill($mysql->thread_id);
if ($IS_MYSQLND) {
if ($ret !== true){
printf("[002] Expecting boolean/true got %s/%s\n", gettype($ret), var_export($ret, true));
}
} else {
/* libmysql return value seems to depend on server version */
if ((($version >= 50123) || ($version <= 40200)) && $version != 50200) {
/* TODO: find exact version */
if ($ret !== true){
printf("[002] Expecting boolean/true got %s/%s @\n", gettype($ret), var_export($ret, true), $version);
}
} else {
if ($ret !== false){
printf("[002] Expecting boolean/false got %s/%s @\n", gettype($ret), var_export($ret, true), $version);
}
}
}
var_dump(mysqli_ping($mysql));
$mysql->close();
print "done!";
?>
--EXPECT--
bool(true)
bool(false)
bool(true)
bool(false)
done!
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>