diff options
author | Ulf Wendel <uw@php.net> | 2009-10-20 12:31:04 +0000 |
---|---|---|
committer | Ulf Wendel <uw@php.net> | 2009-10-20 12:31:04 +0000 |
commit | 57c1b63c2d46156a71791531eac0665866da9348 (patch) | |
tree | 1aeea01b77be2c338951214371b310c47a940037 /ext/mysql | |
parent | 0efa2445ade075bfb865acb55ed441ae289bde0c (diff) | |
download | php-git-57c1b63c2d46156a71791531eac0665866da9348.tar.gz |
Fixing typo in SKIPIF and partly skipping tests if using remote MySQL because LOAD LOCAL INFILE will fail
Diffstat (limited to 'ext/mysql')
-rw-r--r-- | ext/mysql/tests/mysql_query_load_data_openbasedir.phpt | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ext/mysql/tests/mysql_query_load_data_openbasedir.phpt b/ext/mysql/tests/mysql_query_load_data_openbasedir.phpt index 577ede3752..4e3bfbcf39 100644 --- a/ext/mysql/tests/mysql_query_load_data_openbasedir.phpt +++ b/ext/mysql/tests/mysql_query_load_data_openbasedir.phpt @@ -13,6 +13,14 @@ if (!$fp = fopen('./simple.csv', 'w')) fclose($fp); @unlink('./simple.csv'); + +require_once("connect.inc"); +if ($socket == "" && $host != NULL && $host != 'localhost' && $host != '.') { + /* could be a remote TCP/IP connection. LOCAL INFILE may not work */ + if (gethostbyaddr($host) != gethostname()) { + die("skip LOAD DATA LOCAL INFILE will fail if connecting to remote MySQL"); + } +} ?> --INI-- safe_mode=0 |