From 57c1b63c2d46156a71791531eac0665866da9348 Mon Sep 17 00:00:00 2001
From: Ulf Wendel <uw@php.net>
Date: Tue, 20 Oct 2009 12:31:04 +0000
Subject: Fixing typo in SKIPIF and partly skipping tests if using remote MySQL
 because LOAD LOCAL INFILE will fail

---
 ext/mysql/tests/mysql_query_load_data_openbasedir.phpt | 8 ++++++++
 1 file changed, 8 insertions(+)

(limited to 'ext/mysql')

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
-- 
cgit v1.2.1