com php-src: Improve the test: ext/mysqli/tests/bug68077.phpt

From: Date: Tue, 17 Nov 2015 12:12:50 +0000
Subject: com php-src: Improve the test: ext/mysqli/tests/bug68077.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-89879@lists.php.net to get a copy of this message
Commit: fba3985f23020d53ce370e3c4ac685646bda5c92 Author: Xinchen Hui <laruence@gmail.com> Tue, 17 Nov 2015 20:12:50 +0800 Parents: 25439e939e8d6a86bcc1654221460851b43271d5 Branches: PHP-5.6 PHP-7.0 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=fba3985f23020d53ce370e3c4ac685646bda5c92 Log: Improve the test Changed paths: M ext/mysqli/tests/bug68077.phpt Diff: diff --git a/ext/mysqli/tests/bug68077.phpt b/ext/mysqli/tests/bug68077.phpt index 18c2765..3b6fa92 100644 --- a/ext/mysqli/tests/bug68077.phpt +++ b/ext/mysqli/tests/bug68077.phpt @@ -7,13 +7,22 @@ require_once('skipifconnectfailure.inc'); if (!$IS_MYSQLND) { die("skip: test applies only to mysqlnd"); } +if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) + die("skip Cannot connect to MySQL"); + +include_once("local_infile_tools.inc"); +if ($msg = check_local_infile_support($link, $engine)) + die(sprintf("skip %s, [%d] %s", $msg, $link->errno, $link->error)); + +mysqli_close($link); ?> --INI-- -open_basedir={PWD} +open_basedir= --FILE-- <?php require_once("connect.inc"); + ini_set("open_basedir", __DIR__); if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) { printf("[001] Connect failed, [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error()); } @@ -39,7 +48,8 @@ open_basedir={PWD} echo "done\n"; } - if (!$link->query("LOAD DATA LOCAL INFILE '../../bug53503.data' INTO TABLE test")) { + ini_set("open_basedir", __DIR__ . "/dummy"); + if (!$link->query("LOAD DATA LOCAL INFILE '" . __DIR__ . "/bug53503.data' INTO TABLE test")) { printf("[006] [%d] %s\n", $link->errno, $link->error); echo "done\n"; } else {

« previous php.cvs (#89879) next »