From: Tjerk Anne Meesters Date: Sun, 4 Sep 2011 14:21:27 +0000 (+0000) Subject: Patch to run two more mysql test cases that would usually be skipped. X-Git-Tag: php-5.5.0alpha1~1361 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9582b621118b7d5aa36b4db6ac6d0c457dbf9d60;p=php Patch to run two more mysql test cases that would usually be skipped. Replaced skipifdefaultconnectionfailure.inc by three additional ini_set() statements in connect.inc for the default connection settings Patch also includes a typo in connect.inc concerning mysql.default_socket --- diff --git a/ext/mysql/tests/connect.inc b/ext/mysql/tests/connect.inc index 97fed42146..5c2f93d8f0 100755 --- a/ext/mysql/tests/connect.inc +++ b/ext/mysql/tests/connect.inc @@ -64,13 +64,19 @@ $host = getenv("MYSQL_TEST_HOST") ? getenv("MYSQL_TEST_HOST") : "localhost"; $port = getenv("MYSQL_TEST_PORT") ? getenv("MYSQL_TEST_PORT") : 3306; $user = getenv("MYSQL_TEST_USER") ? getenv("MYSQL_TEST_USER") : "root"; $passwd = getenv("MYSQL_TEST_PASSWD") ? getenv("MYSQL_TEST_PASSWD") : ""; + +// added so that mysql_connect() without args works as well (required in some tests that rely on a default connection being opened implicitly) +ini_set('mysql.default_host', $host); +ini_set('mysql.default_user', $user); +ini_set('mysql.default_password', $passwd); + $db = getenv("MYSQL_TEST_DB") ? getenv("MYSQL_TEST_DB") : "test"; $engine = getenv("MYSQL_TEST_ENGINE") ? getenv("MYSQL_TEST_ENGINE") : "MyISAM"; $socket = getenv("MYSQL_TEST_SOCKET") ? getenv("MYSQL_TEST_SOCKET") : null; $skip_on_connect_failure = getenv("MYSQL_TEST_SKIP_CONNECT_FAILURE") ? getenv("MYSQL_TEST_SKIP_CONNECT_FAILURE") : true; $connect_flags = getenv("MYSQL_TEST_CONNECT_FLAGS") ? (int)getenv("MYSQL_TEST_CONNECT_FLAGS") : 0; if ($socket) { - ini_set('mysql.default_user', $socket); + ini_set('mysql.default_socket', $socket); } /* Development setting: test experimal features and/or feature requests that never worked before? */ $TEST_EXPERIMENTAL = (in_array(getenv("MYSQL_TEST_EXPERIMENTAL"), array(0, 1))) ? @@ -78,4 +84,4 @@ $TEST_EXPERIMENTAL = (in_array(getenv("MYSQL_TEST_EXPERIMENTAL"), array(0, 1))) false; $IS_MYSQLND = stristr(mysql_get_client_info(), "mysqlnd"); -?> \ No newline at end of file +?> diff --git a/ext/mysql/tests/mysql_affected_rows.phpt b/ext/mysql/tests/mysql_affected_rows.phpt index ce16a7748c..42632bf8d7 100644 --- a/ext/mysql/tests/mysql_affected_rows.phpt +++ b/ext/mysql/tests/mysql_affected_rows.phpt @@ -4,7 +4,6 @@ mysql_affected_rows() --FILE-- --FILE--