diff options
| author | Andrey Hristov <andrey@php.net> | 2010-03-26 16:58:25 +0000 |
|---|---|---|
| committer | Andrey Hristov <andrey@php.net> | 2010-03-26 16:58:25 +0000 |
| commit | 7868bca437431f95f4b51afa3e4c4b64e45ebad9 (patch) | |
| tree | 74522e929e144647f36110a6036be47843d46ca1 /ext/mysqli/tests/connect.inc | |
| parent | a2edb7f69c30fbc2cee6f0a4af94226b198ec558 (diff) | |
| download | php-git-7868bca437431f95f4b51afa3e4c4b64e45ebad9.tar.gz | |
Fix tests that fail when the MySQL's socket file is not /tmp/mysql.sock
as it is in when compiled from source and the default for mysqlnd.
SuSE for example uses /var/run/mysql/mysql.sock . Also, sql.safe_mode
(ext/mysql and ingres) needs the socket.
Fix possible crashes in mysqlnd. When packets are shorter, functions should
return error.
Diffstat (limited to 'ext/mysqli/tests/connect.inc')
| -rw-r--r-- | ext/mysqli/tests/connect.inc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/mysqli/tests/connect.inc b/ext/mysqli/tests/connect.inc index 48ba893ccc..92caa25e93 100644 --- a/ext/mysqli/tests/connect.inc +++ b/ext/mysqli/tests/connect.inc @@ -17,7 +17,9 @@ $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('mysqli.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))) ? ((1 == getenv("MYSQL_TEST_EXPERIMENTAL")) ? true : false) : |
