Re: [PHP-CVS] svn: /php/php-src/branches/PHP_5_3_1/ NEWS configure.in main/php_version.h
hi Jani, 2009/10/21 Jani Taskinen : > Eh..why? It's confusing enough to use separate branch. Nobody else than you > propably even compiles it so why are you doing more work than you have to? There is a branch for 5.3.1 and tags for the 5.3.1 releases. That's been actually very efficient (more now that we have filled the gap and being synced). Cheers, -- Pierre http://blog.thepimp.net | http://www.libgd.org -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/branches/PHP_5_3_1/ NEWS configure.in main/php_version.h
Eh..why? It's confusing enough to use separate branch. Nobody else than you propably even compiles it so why are you doing more work than you have to? --Jani On 10/21/2009 01:02 AM, Johannes Schlüter wrote: johannes Tue, 20 Oct 2009 22:02:58 + Revision: http://svn.php.net/viewvc?view=revision&revision=289813 Log: Back to -dev Changed paths: U php/php-src/branches/PHP_5_3_1/NEWS U php/php-src/branches/PHP_5_3_1/configure.in U php/php-src/branches/PHP_5_3_1/main/php_version.h Modified: php/php-src/branches/PHP_5_3_1/NEWS === --- php/php-src/branches/PHP_5_3_1/NEWS 2009-10-20 20:09:24 UTC (rev 289812) +++ php/php-src/branches/PHP_5_3_1/NEWS 2009-10-20 22:02:58 UTC (rev 289813) @@ -1,5 +1,7 @@ PHP NEWS ||| +?? ??? 2009, PHP 5.3.1 RC3 + 20 Oct 2009, PHP 5.3.1 RC2 - Upgraded bundled sqlite to version 3.6.19. (Scott) Modified: php/php-src/branches/PHP_5_3_1/configure.in === --- php/php-src/branches/PHP_5_3_1/configure.in 2009-10-20 20:09:24 UTC (rev 289812) +++ php/php-src/branches/PHP_5_3_1/configure.in 2009-10-20 22:02:58 UTC (rev 289813) @@ -42,7 +42,7 @@ PHP_MAJOR_VERSION=5 PHP_MINOR_VERSION=3 PHP_RELEASE_VERSION=1 -PHP_EXTRA_VERSION="RC2" +PHP_EXTRA_VERSION="RC3-dev" PHP_VERSION="$PHP_MAJOR_VERSION.$PHP_MINOR_VERSION.$PHP_RELEASE_VERSION$PHP_EXTRA_VERSION" PHP_VERSION_ID=`expr [$]PHP_MAJOR_VERSION \* 1 + [$]PHP_MINOR_VERSION \* 100 + [$]PHP_RELEASE_VERSION` Modified: php/php-src/branches/PHP_5_3_1/main/php_version.h === --- php/php-src/branches/PHP_5_3_1/main/php_version.h 2009-10-20 20:09:24 UTC (rev 289812) +++ php/php-src/branches/PHP_5_3_1/main/php_version.h 2009-10-20 22:02:58 UTC (rev 289813) @@ -3,6 +3,6 @@ #define PHP_MAJOR_VERSION 5 #define PHP_MINOR_VERSION 3 #define PHP_RELEASE_VERSION 1 -#define PHP_EXTRA_VERSION "RC2" -#define PHP_VERSION "5.3.1RC2" +#define PHP_EXTRA_VERSION "RC3-dev" +#define PHP_VERSION "5.3.1RC3-dev" #define PHP_VERSION_ID 50301 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/standard/dl.c trunk/ext/standard/dl.c
pajoye Wed, 21 Oct 2009 06:42:08 + Revision: http://svn.php.net/viewvc?view=revision&revision=289821 Log: - fix leak in DL on error (windows) Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/standard/dl.c U php/php-src/trunk/ext/standard/dl.c Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2009-10-21 06:03:12 UTC (rev 289820) +++ php/php-src/branches/PHP_5_3/NEWS 2009-10-21 06:42:08 UTC (rev 289821) @@ -8,6 +8,9 @@ - Implemented FR #49253 (added support for libcurl's CERTINFO option). (Linus Nielsen Feltzing ) +- Fixed memory leak in extension loading when an error occurs on Windows. + (Pierre) + - Fixed bug #49855 (import_request_variables() always returns NULL). (Ilia, sjoerd at php dot net) - Fixed bug #49800 (SimpleXML allow (un)serialize() calls without warning). Modified: php/php-src/branches/PHP_5_3/ext/standard/dl.c === --- php/php-src/branches/PHP_5_3/ext/standard/dl.c 2009-10-21 06:03:12 UTC (rev 289820) +++ php/php-src/branches/PHP_5_3/ext/standard/dl.c 2009-10-21 06:42:08 UTC (rev 289821) @@ -146,8 +146,18 @@ /* load dynamic symbol */ handle = DL_LOAD(libpath); if (!handle) { +#if PHP_WIN32 + char *err = GET_DL_ERROR(); + if (err) { + php_error_docref(NULL TSRMLS_CC, error_type, "Unable to load dynamic library '%s' - %s", libpath, err); + LocalFree(err); + } else { + php_error_docref(NULL TSRMLS_CC, error_type, "Unable to load dynamic library '%s' - %s", libpath, "Unknown reason"); + } +#else php_error_docref(NULL TSRMLS_CC, error_type, "Unable to load dynamic library '%s' - %s", libpath, GET_DL_ERROR()); GET_DL_ERROR(); /* free the buffer storing the error */ +#endif efree(libpath); return FAILURE; } Modified: php/php-src/trunk/ext/standard/dl.c === --- php/php-src/trunk/ext/standard/dl.c 2009-10-21 06:03:12 UTC (rev 289820) +++ php/php-src/trunk/ext/standard/dl.c 2009-10-21 06:42:08 UTC (rev 289821) @@ -139,8 +139,18 @@ /* load dynamic symbol */ handle = DL_LOAD(libpath); if (!handle) { +#if PHP_WIN32 + char *err = GET_DL_ERROR(); + if (err) { + php_error_docref(NULL TSRMLS_CC, error_type, "Unable to load dynamic library '%s' - %s", libpath, err); + LocalFree(err); + } else { + php_error_docref(NULL TSRMLS_CC, error_type, "Unable to load dynamic library '%s' - %s", libpath, "Unknown reason"); + } +#else php_error_docref(NULL TSRMLS_CC, error_type, "Unable to load dynamic library '%s' - %s", libpath, GET_DL_ERROR()); GET_DL_ERROR(); /* free the buffer storing the error */ +#endif efree(libpath); return FAILURE; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/branches/PHP_5_3_1/ NEWS configure.in main/php_version.h
johannes Tue, 20 Oct 2009 22:02:58 + Revision: http://svn.php.net/viewvc?view=revision&revision=289813 Log: Back to -dev Changed paths: U php/php-src/branches/PHP_5_3_1/NEWS U php/php-src/branches/PHP_5_3_1/configure.in U php/php-src/branches/PHP_5_3_1/main/php_version.h Modified: php/php-src/branches/PHP_5_3_1/NEWS === --- php/php-src/branches/PHP_5_3_1/NEWS 2009-10-20 20:09:24 UTC (rev 289812) +++ php/php-src/branches/PHP_5_3_1/NEWS 2009-10-20 22:02:58 UTC (rev 289813) @@ -1,5 +1,7 @@ PHPNEWS ||| +?? ??? 2009, PHP 5.3.1 RC3 + 20 Oct 2009, PHP 5.3.1 RC2 - Upgraded bundled sqlite to version 3.6.19. (Scott) Modified: php/php-src/branches/PHP_5_3_1/configure.in === --- php/php-src/branches/PHP_5_3_1/configure.in 2009-10-20 20:09:24 UTC (rev 289812) +++ php/php-src/branches/PHP_5_3_1/configure.in 2009-10-20 22:02:58 UTC (rev 289813) @@ -42,7 +42,7 @@ PHP_MAJOR_VERSION=5 PHP_MINOR_VERSION=3 PHP_RELEASE_VERSION=1 -PHP_EXTRA_VERSION="RC2" +PHP_EXTRA_VERSION="RC3-dev" PHP_VERSION="$PHP_MAJOR_VERSION.$PHP_MINOR_VERSION.$PHP_RELEASE_VERSION$PHP_EXTRA_VERSION" PHP_VERSION_ID=`expr [$]PHP_MAJOR_VERSION \* 1 + [$]PHP_MINOR_VERSION \* 100 + [$]PHP_RELEASE_VERSION` Modified: php/php-src/branches/PHP_5_3_1/main/php_version.h === --- php/php-src/branches/PHP_5_3_1/main/php_version.h 2009-10-20 20:09:24 UTC (rev 289812) +++ php/php-src/branches/PHP_5_3_1/main/php_version.h 2009-10-20 22:02:58 UTC (rev 289813) @@ -3,6 +3,6 @@ #define PHP_MAJOR_VERSION 5 #define PHP_MINOR_VERSION 3 #define PHP_RELEASE_VERSION 1 -#define PHP_EXTRA_VERSION "RC2" -#define PHP_VERSION "5.3.1RC2" +#define PHP_EXTRA_VERSION "RC3-dev" +#define PHP_VERSION "5.3.1RC3-dev" #define PHP_VERSION_ID 50301 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/tags/
johannes Tue, 20 Oct 2009 20:09:24 + Revision: http://svn.php.net/viewvc?view=revision&revision=289812 Log: tag php_5_3_1RC2 Changed paths: A + php/php-src/tags/php_5_3_1RC2/ (from php/php-src/branches/PHP_5_3_1/:r289809) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/branches/PHP_5_3_1/ NEWS configure.in main/php_version.h
johannes Tue, 20 Oct 2009 18:17:22 + Revision: http://svn.php.net/viewvc?view=revision&revision=289806 Log: 5.3.1RC2 Changed paths: U php/php-src/branches/PHP_5_3_1/NEWS U php/php-src/branches/PHP_5_3_1/configure.in U php/php-src/branches/PHP_5_3_1/main/php_version.h Modified: php/php-src/branches/PHP_5_3_1/NEWS === --- php/php-src/branches/PHP_5_3_1/NEWS 2009-10-20 18:07:04 UTC (rev 289805) +++ php/php-src/branches/PHP_5_3_1/NEWS 2009-10-20 18:17:22 UTC (rev 289806) @@ -1,6 +1,6 @@ PHPNEWS ||| -?? ??? 2009, PHP 5.3.1 RC2 +20 Oct 2009, PHP 5.3.1 RC2 - Upgraded bundled sqlite to version 3.6.19. (Scott) - Fixed a safe_mode bypass in tempnam() identified by Grzegorz Stachowiak. Modified: php/php-src/branches/PHP_5_3_1/configure.in === --- php/php-src/branches/PHP_5_3_1/configure.in 2009-10-20 18:07:04 UTC (rev 289805) +++ php/php-src/branches/PHP_5_3_1/configure.in 2009-10-20 18:17:22 UTC (rev 289806) @@ -42,7 +42,7 @@ PHP_MAJOR_VERSION=5 PHP_MINOR_VERSION=3 PHP_RELEASE_VERSION=1 -PHP_EXTRA_VERSION="RC2-dev" +PHP_EXTRA_VERSION="RC2" PHP_VERSION="$PHP_MAJOR_VERSION.$PHP_MINOR_VERSION.$PHP_RELEASE_VERSION$PHP_EXTRA_VERSION" PHP_VERSION_ID=`expr [$]PHP_MAJOR_VERSION \* 1 + [$]PHP_MINOR_VERSION \* 100 + [$]PHP_RELEASE_VERSION` Modified: php/php-src/branches/PHP_5_3_1/main/php_version.h === --- php/php-src/branches/PHP_5_3_1/main/php_version.h 2009-10-20 18:07:04 UTC (rev 289805) +++ php/php-src/branches/PHP_5_3_1/main/php_version.h 2009-10-20 18:17:22 UTC (rev 289806) @@ -3,6 +3,6 @@ #define PHP_MAJOR_VERSION 5 #define PHP_MINOR_VERSION 3 #define PHP_RELEASE_VERSION 1 -#define PHP_EXTRA_VERSION "RC2-dev" -#define PHP_VERSION "5.3.1RC2-dev" +#define PHP_EXTRA_VERSION "RC2" +#define PHP_VERSION "5.3.1RC2" #define PHP_VERSION_ID 50301 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/mysqli/tests/mysqli_stmt_attr_set.phpt trunk/ext/mysqli/tests/mysqli_stmt_attr_set.phpt
uw Tue, 20 Oct 2009 17:54:57 + Revision: http://svn.php.net/viewvc?view=revision&revision=289804 Log: Making test a bit more portable Changed paths: U php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_stmt_attr_set.phpt U php/php-src/trunk/ext/mysqli/tests/mysqli_stmt_attr_set.phpt Modified: php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_stmt_attr_set.phpt === --- php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_stmt_attr_set.phpt 2009-10-20 17:52:18 UTC (rev 289803) +++ php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_stmt_attr_set.phpt 2009-10-20 17:54:57 UTC (rev 289804) @@ -45,23 +45,27 @@ printf("[005] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp); $stmt->prepare("SELECT * FROM test"); + mt_srand(microtime(true)); + + /* mysqlnd detects invalid attributes, libmysql does not AFAIK */ + $invalid_ret = ($IS_MYSQLND) ? false : true; + for ($i = -100; $i < 1000; $i++) { if (in_array($i, $valid_attr)) continue; $invalid_attr = $i; - if (false !== ($tmp = @mysqli_stmt_attr_set($stmt, $invalid_attr, 0))) { - printf("[006a] Expecting boolean/false for attribute %d, got %s/%s\n", $invalid_attr, gettype($tmp), $tmp); + if ($invalid_ret !== ($tmp = @mysqli_stmt_attr_set($stmt, $invalid_attr, 0))) { + printf("[006a] Expecting boolean/%s for attribute %d, got %s/%s\n", $invalid_ret, $invalid_attr, gettype($tmp), $tmp); } } - for ($i = 0; $i < 10; $i++) { + for ($i = 0; $i < 2; $i++) { do { $invalid_attr = mt_rand(-1 * (min(4294967296, PHP_INT_MAX) + 1), min(4294967296, PHP_INT_MAX)); } while (in_array($invalid_attr, $valid_attr)); - if (false !== ($tmp = @mysqli_stmt_attr_set($stmt, $invalid_attr, 0))) { - /* Although it may be desired to get false neither the MySQL Client Library nor mysqlnd are supposed to detect invalid codes */ - printf("[006b] Expecting boolean/true for attribute %d, got %s/%s\n", $invalid_attr, gettype($tmp), $tmp); + if ($invalid_ret !== ($tmp = @mysqli_stmt_attr_set($stmt, $invalid_attr, 0))) { + printf("[006b] Expecting boolean/%s for attribute %d, got %s/%s\n", $invalid_ret, $invalid_attr, gettype($tmp), $tmp); } } $stmt->close(); Modified: php/php-src/trunk/ext/mysqli/tests/mysqli_stmt_attr_set.phpt === --- php/php-src/trunk/ext/mysqli/tests/mysqli_stmt_attr_set.phpt 2009-10-20 17:52:18 UTC (rev 289803) +++ php/php-src/trunk/ext/mysqli/tests/mysqli_stmt_attr_set.phpt 2009-10-20 17:54:57 UTC (rev 289804) @@ -45,23 +45,27 @@ printf("[005] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp); $stmt->prepare("SELECT * FROM test"); + mt_srand(microtime(true)); + + /* mysqlnd detects invalid attributes, libmysql does not AFAIK */ + $invalid_ret = ($IS_MYSQLND) ? false : true; + for ($i = -100; $i < 1000; $i++) { if (in_array($i, $valid_attr)) continue; $invalid_attr = $i; - if (false !== ($tmp = @mysqli_stmt_attr_set($stmt, $invalid_attr, 0))) { - printf("[006a] Expecting boolean/false for attribute %d, got %s/%s\n", $invalid_attr, gettype($tmp), $tmp); + if ($invalid_ret !== ($tmp = @mysqli_stmt_attr_set($stmt, $invalid_attr, 0))) { + printf("[006a] Expecting boolean/%s for attribute %d, got %s/%s\n", $invalid_ret, $invalid_attr, gettype($tmp), $tmp); } } - for ($i = 0; $i < 10; $i++) { + for ($i = 0; $i < 2; $i++) { do { $invalid_attr = mt_rand(-1 * (min(4294967296, PHP_INT_MAX) + 1), min(4294967296, PHP_INT_MAX)); } while (in_array($invalid_attr, $valid_attr)); - if (false !== ($tmp = @mysqli_stmt_attr_set($stmt, $invalid_attr, 0))) { - /* Although it may be desired to get false neither the MySQL Client Library nor mysqlnd are supposed to detect invalid codes */ - printf("[006b] Expecting boolean/true for attribute %d, got %s/%s\n", $invalid_attr, gettype($tmp), $tmp); + if ($invalid_ret !== ($tmp = @mysqli_stmt_attr_set($stmt, $invalid_attr, 0))) { + printf("[006b] Expecting boolean/%s for attribute %d, got %s/%s\n", $invalid_ret, $invalid_attr, gettype($tmp), $tmp); } } $stmt->close(); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visi
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/mysqli/tests/mysqli_fetch_array_large.phpt trunk/ext/mysqli/tests/mysqli_fetch_array_large.phpt
uw Tue, 20 Oct 2009 17:03:32 + Revision: http://svn.php.net/viewvc?view=revision&revision=289799 Log: Fixing test Changed paths: U php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_fetch_array_large.phpt U php/php-src/trunk/ext/mysqli/tests/mysqli_fetch_array_large.phpt Modified: php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_fetch_array_large.phpt === --- php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_fetch_array_large.phpt 2009-10-20 14:11:43 UTC (rev 289798) +++ php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_fetch_array_large.phpt 2009-10-20 17:03:32 UTC (rev 289799) @@ -19,53 +19,57 @@ $sql .= sprintf("('%s'), ", $random_char); $sql = substr($sql, 0, -2); - assert(strlen($sql) < $package_size); + $len = strlen($sql); + assert($len < $package_size); - if (!...@mysqli_query($link, $sql)) { - if (1153 == mysqli_errno($link) || stristr(mysqli_error($link), 'max_allowed_packet')) - /* [1153] Got a packet bigger than 'max_allowed_packet' bytes */ + if (!mysqli_query($link, $sql)) { + if (1153 == mysqli_errno($link) || 2006 == mysqli_errno($link) || stristr(mysqli_error($link), 'max_allowed_packet')) + /* + myslqnd - [1153] Got a packet bigger than 'max_allowed_packet' bytes + libmysql -[2006] MySQL server has gone away + */ return false; - printf("[%03d + 1] [%d] %s\n", $offset, mysqli_errno($link), mysqli_error($link)); + printf("[%03d + 1] len = %d, [%d] %s\n", $offset, $len, mysqli_errno($link), mysqli_error($link)); return false; } /* buffered result set - let's hope we do not run into PHP memory limit... */ if (!$res = mysqli_query($link, "SELECT id, label FROM test")) { - printf("[%03d + 2] [%d] %s\n", $offset, mysqli_errno($link), mysqli_error($link)); + printf("[%03d + 2] len = %d, [%d] %s\n", $offset, $len, mysqli_errno($link), mysqli_error($link)); return false; } while ($row = mysqli_fetch_assoc($res)) { if ($row['label'] != $random_char) { - printf("[%03d + 3] Wrong results - expecting '%s' got '%s', [%d] %s\n", - $offset, $random_char, $row['label'], mysqli_errno($link), mysqli_error($link)); + printf("[%03d + 3] Wrong results - expecting '%s' got '%s', len = %d, [%d] %s\n", + $offset, $random_char, $row['label'], $len, mysqli_errno($link), mysqli_error($link)); return false; } } mysqli_free_result($res); if (!$stmt = mysqli_prepare($link, "SELECT id, label FROM test")) { - printf("[%03d + 4] [%d] %s\n", $offset, mysqli_errno($link), mysqli_error($link)); + printf("[%03d + 4] len = %d, [%d] %s\n", $offset, $len, mysqli_errno($link), mysqli_error($link)); return false; } /* unbuffered result set */ if (!mysqli_stmt_execute($stmt)) { - printf("[%03d + 5] [%d] %s\n", $offset, mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt)); + printf("[%03d + 5] len = %d, [%d] %s, [%d] %s\n", $offset, $len, mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt), mysqli_errno($link), mysqli_error($link)); return false; } $id = $label = NULL; if (!mysqli_stmt_bind_result($stmt, $id, $label)) { - printf("[%03d + 6] [%d] %s\n", $offset, mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt)); + printf("[%03d + 6] len = %d, [%d] %s, [%d] %s\n", $offset, $len, mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt), mysqli_errno($link), mysqli_error($link)); return false; } while (mysqli_stmt_fetch($stmt)) { if ($label != $random_char) { - printf("[%03d + 7] Wrong results - expecting '%s' got '%s', [%d] %s\n", - $offset, $random_char, $label, mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt)); + printf("[%03d + 7] Wrong results - expecting '%s' got '%s', len = %d, [%d] %s\n", +
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/mysqli/tests/mysqli_change_user_insert_id.phpt trunk/ext/mysqli/tests/mysqli_change_user_insert_id.phpt
uw Tue, 20 Oct 2009 14:11:43 + Revision: http://svn.php.net/viewvc?view=revision&revision=289798 Log: libmysql is still 'buggy' - skip test with libmysql Changed paths: U php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_change_user_insert_id.phpt U php/php-src/trunk/ext/mysqli/tests/mysqli_change_user_insert_id.phpt Modified: php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_change_user_insert_id.phpt === --- php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_change_user_insert_id.phpt 2009-10-20 13:58:57 UTC (rev 289797) +++ php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_change_user_insert_id.phpt 2009-10-20 14:11:43 UTC (rev 289798) @@ -6,13 +6,16 @@ require_once('skipifemb.inc'); require_once('skipifconnectfailure.inc'); require_once('connect.inc'); + if (!$IS_MYSQLND) { if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) die("skip Can't test server version, might hit known bugs http://bugs.mysql.com/bug.php?id=30472, http://bugs.mysql.com/bug.php?id=45184";); - if (mysqli_get_client_version($link) <= 50135) - /* TODO - check wich version got the patch */ + + if ((mysqli_get_client_version($link) <= 50139) || (mysqli_get_server_version($link) <= 50139)) + /* #30472 got fixed in 5.1.23 but #45184 is open */ die(sprintf("skip libmysql %s should have bugs http://bugs.mysql.com/bug.php?id=30472, http://bugs.mysql.com/bug.php?id=45184";, mysqli_get_client_version($link))); + mysqli_close($link); } ?> Modified: php/php-src/trunk/ext/mysqli/tests/mysqli_change_user_insert_id.phpt === --- php/php-src/trunk/ext/mysqli/tests/mysqli_change_user_insert_id.phpt 2009-10-20 13:58:57 UTC (rev 289797) +++ php/php-src/trunk/ext/mysqli/tests/mysqli_change_user_insert_id.phpt 2009-10-20 14:11:43 UTC (rev 289798) @@ -6,13 +6,16 @@ require_once('skipifemb.inc'); require_once('skipifconnectfailure.inc'); require_once('connect.inc'); + if (!$IS_MYSQLND) { if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) die("skip Can't test server version, might hit known bugs http://bugs.mysql.com/bug.php?id=30472, http://bugs.mysql.com/bug.php?id=45184";); - if (mysqli_get_client_version($link) <= 50135) - /* TODO - check wich version got the patch */ + + if ((mysqli_get_client_version($link) <= 50139) || (mysqli_get_server_version($link) <= 50139)) + /* #30472 got fixed in 5.1.23 but #45184 is open */ die(sprintf("skip libmysql %s should have bugs http://bugs.mysql.com/bug.php?id=30472, http://bugs.mysql.com/bug.php?id=45184";, mysqli_get_client_version($link))); + mysqli_close($link); } ?> -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/mysqli/tests/071.phpt trunk/ext/mysqli/tests/071.phpt
uw Tue, 20 Oct 2009 13:58:57 + Revision: http://svn.php.net/viewvc?view=revision&revision=289797 Log: Well, hacking around to cope with mysql version specific behaviour if using libmysql... Changed paths: U php/php-src/branches/PHP_5_3/ext/mysqli/tests/071.phpt U php/php-src/trunk/ext/mysqli/tests/071.phpt Modified: php/php-src/branches/PHP_5_3/ext/mysqli/tests/071.phpt === --- php/php-src/branches/PHP_5_3/ext/mysqli/tests/071.phpt 2009-10-20 13:46:54 UTC (rev 289796) +++ php/php-src/branches/PHP_5_3/ext/mysqli/tests/071.phpt 2009-10-20 13:58:57 UTC (rev 289797) @@ -11,10 +11,28 @@ require_once("connect.inc"); $mysql = new my_mysqli($host, $user, $passwd, $db, $port, $socket); + $version = $mysql->server_version; var_dump($mysql->ping()); - var_dump($mysql->kill($mysql->thread_id)); + $ret = $mysql->kill($mysql->thread_id); + if ($IS_MYSQLND) { + if ($ret !== true){ + printf("[001] Expecting boolean/true got %s/%s\n", gettype($ret), var_export($ret, true)); + } + } else { + /* libmysql return value seems to depend on server version */ + if (($version >= 50123 || $version <= 40200) && $version != 50200) { + /* TODO: find exact version */ + if ($ret !== true){ + printf("[001] Expecting boolean/true got %s/%s @\n", gettype($ret), var_export($ret, true), $version); + } + } else { + if ($ret !== false){ + printf("[001] Expecting boolean/false got %s/%s @\n", gettype($ret), var_export($ret, true), $version); + } + } + } var_dump($mysql->ping()); @@ -24,7 +42,24 @@ var_dump(mysqli_ping($mysql)); - var_dump(mysqli_kill($mysql, mysqli_thread_id($mysql))); + $ret = $mysql->kill($mysql->thread_id); + if ($IS_MYSQLND) { + if ($ret !== true){ + printf("[002] Expecting boolean/true got %s/%s\n", gettype($ret), var_export($ret, true)); + } + } else { + /* libmysql return value seems to depend on server version */ + if (($version >= 50123 || $version <= 40200) && $version != 50200) { + /* TODO: find exact version */ + if ($ret !== true){ + printf("[002] Expecting boolean/true got %s/%s @\n", gettype($ret), var_export($ret, true), $version); + } + } else { + if ($ret !== false){ + printf("[002] Expecting boolean/false got %s/%s @\n", gettype($ret), var_export($ret, true), $version); + } + } + } var_dump(mysqli_ping($mysql)); @@ -33,9 +68,7 @@ ?> --EXPECT-- bool(true) -bool(true) bool(false) bool(true) -bool(true) bool(false) done! \ No newline at end of file Modified: php/php-src/trunk/ext/mysqli/tests/071.phpt === --- php/php-src/trunk/ext/mysqli/tests/071.phpt 2009-10-20 13:46:54 UTC (rev 289796) +++ php/php-src/trunk/ext/mysqli/tests/071.phpt 2009-10-20 13:58:57 UTC (rev 289797) @@ -11,10 +11,28 @@ require_once("connect.inc"); $mysql = new my_mysqli($host, $user, $passwd, $db, $port, $socket); + $version = $mysql->server_version; var_dump($mysql->ping()); - var_dump($mysql->kill($mysql->thread_id)); + $ret = $mysql->kill($mysql->thread_id); + if ($IS_MYSQLND) { + if ($ret !== true){ + printf("[001] Expecting boolean/true got %s/%s\n", gettype($ret), var_export($ret, true)); + } + } else { + /* libmysql return value seems to depend on server version */ + if (($version >= 50123 || $version <= 40200) && $version != 50200) { + /* TODO: find exact version */ + if ($ret !== true){ + printf("[001] Expecting boolean/true got %s/%s @\n", gettype($ret), var_export($ret, true), $version); + } + } else { + if ($ret !== false){ + printf("[001] Expecting boolean/false got %s/%s @\n", gettype($ret), var_export($ret, true), $version); + } + } + } var_dump($mysql->ping()); @@ -24,7 +42,24 @@ var_dump(mysqli_ping($mysql)); - var_dump(mysqli_kill($mysql, mysqli_thread_id($mysql))); + $ret = $mysql->kill($mysql->thread_id); + if ($IS_MYSQLND) { + if ($ret !== true){ + printf("[00
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/sapi/cgi/cgi_main.c branches/PHP_5_3_1/sapi/cgi/cgi_main.c trunk/sapi/cgi/cgi_main.c
tony2001 Tue, 20 Oct 2009 12:57:44 + Revision: http://svn.php.net/viewvc?view=revision&revision=289795 Log: fix crash on empty doc_root Changed paths: U php/php-src/branches/PHP_5_3/sapi/cgi/cgi_main.c U php/php-src/branches/PHP_5_3_1/sapi/cgi/cgi_main.c U php/php-src/trunk/sapi/cgi/cgi_main.c Modified: php/php-src/branches/PHP_5_3/sapi/cgi/cgi_main.c === --- php/php-src/branches/PHP_5_3/sapi/cgi/cgi_main.c2009-10-20 12:55:32 UTC (rev 289794) +++ php/php-src/branches/PHP_5_3/sapi/cgi/cgi_main.c2009-10-20 12:57:44 UTC (rev 289795) @@ -828,7 +828,7 @@ /* DOCUMENT_ROOT should also be defined at this stage..but better check it anyway */ if (doc_root) { doc_root_len = strlen(doc_root); - if (IS_SLASH(doc_root[doc_root_len - 1])) { + if (doc_root_len > 0 && IS_SLASH(doc_root[doc_root_len - 1])) { --doc_root_len; } #ifdef PHP_WIN32 Modified: php/php-src/branches/PHP_5_3_1/sapi/cgi/cgi_main.c === --- php/php-src/branches/PHP_5_3_1/sapi/cgi/cgi_main.c 2009-10-20 12:55:32 UTC (rev 289794) +++ php/php-src/branches/PHP_5_3_1/sapi/cgi/cgi_main.c 2009-10-20 12:57:44 UTC (rev 289795) @@ -828,7 +828,7 @@ /* DOCUMENT_ROOT should also be defined at this stage..but better check it anyway */ if (doc_root) { doc_root_len = strlen(doc_root); - if (IS_SLASH(doc_root[doc_root_len - 1])) { + if (doc_root_len > 0 && IS_SLASH(doc_root[doc_root_len - 1])) { --doc_root_len; } #ifdef PHP_WIN32 Modified: php/php-src/trunk/sapi/cgi/cgi_main.c === --- php/php-src/trunk/sapi/cgi/cgi_main.c 2009-10-20 12:55:32 UTC (rev 289794) +++ php/php-src/trunk/sapi/cgi/cgi_main.c 2009-10-20 12:57:44 UTC (rev 289795) @@ -825,7 +825,7 @@ /* DOCUMENT_ROOT should also be defined at this stage..but better check it anyway */ if (doc_root) { doc_root_len = strlen(doc_root); - if (IS_SLASH(doc_root[doc_root_len - 1])) { + if (doc_root_len > 0 && IS_SLASH(doc_root[doc_root_len - 1])) { --doc_root_len; } #ifdef PHP_WIN32 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/mysqli/tests/015.phpt branches/PHP_5_3/ext/mysqli/tests/mysqli_change_user_rollback.phpt trunk/ext/mysqli/tests/015.phpt trunk/ext/mysqli/tests/mysqli
uw Tue, 20 Oct 2009 12:41:58 + Revision: http://svn.php.net/viewvc?view=revision&revision=289792 Log: Skipping tests if InnoDB is available but disabled. I wonder what InnoDB status comes next... Changed paths: U php/php-src/branches/PHP_5_3/ext/mysqli/tests/015.phpt U php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_change_user_rollback.phpt U php/php-src/trunk/ext/mysqli/tests/015.phpt U php/php-src/trunk/ext/mysqli/tests/mysqli_change_user_rollback.phpt Modified: php/php-src/branches/PHP_5_3/ext/mysqli/tests/015.phpt === --- php/php-src/branches/PHP_5_3/ext/mysqli/tests/015.phpt 2009-10-20 12:31:04 UTC (rev 289791) +++ php/php-src/branches/PHP_5_3/ext/mysqli/tests/015.phpt 2009-10-20 12:41:58 UTC (rev 289792) @@ -11,8 +11,9 @@ mysqli_free_result($result); mysqli_close($link); - if ($row[1] == "NO") { - printf ("skip innodb support not installed."); + if ($row[1] == "DISABLED" || $row[1] == "NO") { + printf ("skip innodb support is not installed or enabled."); + exit; } ?> --FILE-- Modified: php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_change_user_rollback.phpt === --- php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_change_user_rollback.phpt 2009-10-20 12:31:04 UTC (rev 289791) +++ php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_change_user_rollback.phpt 2009-10-20 12:41:58 UTC (rev 289792) @@ -12,8 +12,9 @@ mysqli_free_result($result); mysqli_close($link); -if ($row[1] == 'NO') { - printf ("skip ROLLBACK requires transactional engine InnoDB"); +if ($row[1] == "DISABLED" || $row[1] == "NO") { + printf ("skip innodb support is not installed or enabled."); + exit; } ?> --FILE-- Modified: php/php-src/trunk/ext/mysqli/tests/015.phpt === --- php/php-src/trunk/ext/mysqli/tests/015.phpt 2009-10-20 12:31:04 UTC (rev 289791) +++ php/php-src/trunk/ext/mysqli/tests/015.phpt 2009-10-20 12:41:58 UTC (rev 289792) @@ -11,8 +11,9 @@ mysqli_free_result($result); mysqli_close($link); - if ($row[1] == "NO") { - printf ("skip innodb support not installed."); + if ($row[1] == "DISABLED" || $row[1] == "NO") { + printf ("skip innodb support is not installed or enabled."); + exit; } ?> --FILE-- Modified: php/php-src/trunk/ext/mysqli/tests/mysqli_change_user_rollback.phpt === --- php/php-src/trunk/ext/mysqli/tests/mysqli_change_user_rollback.phpt 2009-10-20 12:31:04 UTC (rev 289791) +++ php/php-src/trunk/ext/mysqli/tests/mysqli_change_user_rollback.phpt 2009-10-20 12:41:58 UTC (rev 289792) @@ -12,8 +12,9 @@ mysqli_free_result($result); mysqli_close($link); -if ($row[1] == 'NO') { - printf ("skip ROLLBACK requires transactional engine InnoDB"); +if ($row[1] == "DISABLED" || $row[1] == "NO") { + printf ("skip innodb support is not installed or enabled."); + exit; } ?> --FILE-- -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/mysql/tests/mysql_query_load_data_openbasedir.phpt branches/PHP_5_3/ext/mysqli/tests/mysqli_set_local_infile_handler.phpt branches/PHP_5_3/ext/mysqli/
uw Tue, 20 Oct 2009 12:31:04 + Revision: http://svn.php.net/viewvc?view=revision&revision=289791 Log: Fixing typo in SKIPIF and partly skipping tests if using remote MySQL because LOAD LOCAL INFILE will fail Changed paths: U php/php-src/branches/PHP_5_3/ext/mysql/tests/mysql_query_load_data_openbasedir.phpt U php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_set_local_infile_handler.phpt U php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_set_local_infile_handler_bad_character.phpt U php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_set_local_infile_handler_buffer_overflow.phpt U php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_set_local_infile_handler_close_link.phpt U php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_set_local_infile_handler_closefile.phpt U php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_set_local_infile_handler_closures.phpt U php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_set_local_infile_handler_kill_link.phpt U php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_set_local_infile_handler_negative_len.phpt U php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_set_local_infile_handler_nested_call.phpt U php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_set_local_infile_handler_new_query.phpt U php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_set_local_infile_handler_nofileop.phpt U php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_set_local_infile_handler_openbasedir.phpt U php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_set_local_infile_handler_replace_buffer.phpt U php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_set_local_infile_handler_short_len.phpt U php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_set_local_infile_handler_unregister.phpt U php/php-src/trunk/ext/mysql/tests/mysql_query_load_data_openbasedir.phpt U php/php-src/trunk/ext/mysqli/tests/mysqli_get_cache_stats_free_buffered.phpt U php/php-src/trunk/ext/mysqli/tests/mysqli_set_local_infile_handler.phpt U php/php-src/trunk/ext/mysqli/tests/mysqli_set_local_infile_handler_bad_character.phpt U php/php-src/trunk/ext/mysqli/tests/mysqli_set_local_infile_handler_buffer_overflow.phpt U php/php-src/trunk/ext/mysqli/tests/mysqli_set_local_infile_handler_close_link.phpt U php/php-src/trunk/ext/mysqli/tests/mysqli_set_local_infile_handler_closefile.phpt U php/php-src/trunk/ext/mysqli/tests/mysqli_set_local_infile_handler_closures.phpt U php/php-src/trunk/ext/mysqli/tests/mysqli_set_local_infile_handler_kill_link.phpt U php/php-src/trunk/ext/mysqli/tests/mysqli_set_local_infile_handler_negative_len.phpt U php/php-src/trunk/ext/mysqli/tests/mysqli_set_local_infile_handler_nested_call.phpt U php/php-src/trunk/ext/mysqli/tests/mysqli_set_local_infile_handler_new_query.phpt U php/php-src/trunk/ext/mysqli/tests/mysqli_set_local_infile_handler_nofileop.phpt U php/php-src/trunk/ext/mysqli/tests/mysqli_set_local_infile_handler_openbasedir.phpt U php/php-src/trunk/ext/mysqli/tests/mysqli_set_local_infile_handler_replace_buffer.phpt U php/php-src/trunk/ext/mysqli/tests/mysqli_set_local_infile_handler_short_len.phpt U php/php-src/trunk/ext/mysqli/tests/mysqli_set_local_infile_handler_unregister.phpt Modified: php/php-src/branches/PHP_5_3/ext/mysql/tests/mysql_query_load_data_openbasedir.phpt === --- php/php-src/branches/PHP_5_3/ext/mysql/tests/mysql_query_load_data_openbasedir.phpt 2009-10-20 12:05:54 UTC (rev 289790) +++ php/php-src/branches/PHP_5_3/ext/mysql/tests/mysql_query_load_data_openbasedir.phpt 2009-10-20 12:31:04 UTC (rev 289791) @@ -13,6 +13,14 @@ 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 Modified: php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_set_local_infile_handler.phpt === --- php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_set_local_infile_handler.phpt 2009-10-20 12:05:54 UTC (rev 289790) +++ php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_set_local_infile_handler.phpt 2009-10-20 12:31:04 UTC (rev 289791) @@ -10,7 +10,7 @@ die("skip - function not available."); require_once('connect.inc'); -if (!$link = my_mysqli_connect($host, $user, $passwb, $db, $port, $socket)) +if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) die("skip Cannot connect to MySQL"); if (!$res = mysqli_query($link, 'SHOW VARIA
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/mysql/tests/mysql_connect.phpt trunk/ext/mysql/tests/mysql_connect.phpt
uw Tue, 20 Oct 2009 08:41:11 + Revision: http://svn.php.net/viewvc?view=revision&revision=289787 Log: Making test pass when MySQL runs on Win* Changed paths: U php/php-src/branches/PHP_5_3/ext/mysql/tests/mysql_connect.phpt U php/php-src/trunk/ext/mysql/tests/mysql_connect.phpt Modified: php/php-src/branches/PHP_5_3/ext/mysql/tests/mysql_connect.phpt === --- php/php-src/branches/PHP_5_3/ext/mysql/tests/mysql_connect.phpt 2009-10-20 08:23:06 UTC (rev 289786) +++ php/php-src/branches/PHP_5_3/ext/mysql/tests/mysql_connect.phpt 2009-10-20 08:41:11 UTC (rev 289787) @@ -35,19 +35,23 @@ // Run the following tests without an anoynmous MySQL user and use a password for the test user! ini_set('mysql.default_socket', $socket); -if (!is_resource($link = mysql_connect($host, $user, $passwd, true))) { - printf("[006] Usage of mysql.default_socket failed\n"); -} else { - mysql_close($link); +if (!is_null($socket)) { + if (!is_resource($link = mysql_connect($host, $user, $passwd, true))) { + printf("[006] Usage of mysql.default_socket failed\n"); + } else { + mysql_close($link); + } } if (!ini_get('sql.safe_mode')) { ini_set('mysql.default_port', $port); - if (!is_resource($link = mysql_connect($host, $user, $passwd, true))) { - printf("[007] Usage of mysql.default_port failed\n"); - } else { - mysql_close($link); + if (!is_null($port)) { + if (!is_resource($link = mysql_connect($host, $user, $passwd, true))) { + printf("[007] Usage of mysql.default_port failed\n"); + } else { + mysql_close($link); + } } ini_set('mysql.default_password', $passwd); Modified: php/php-src/trunk/ext/mysql/tests/mysql_connect.phpt === --- php/php-src/trunk/ext/mysql/tests/mysql_connect.phpt2009-10-20 08:23:06 UTC (rev 289786) +++ php/php-src/trunk/ext/mysql/tests/mysql_connect.phpt2009-10-20 08:41:11 UTC (rev 289787) @@ -35,19 +35,23 @@ // Run the following tests without an anoynmous MySQL user and use a password for the test user! ini_set('mysql.default_socket', $socket); -if (!is_resource($link = mysql_connect($host, $user, $passwd, true))) { - printf("[006] Usage of mysql.default_socket failed\n"); -} else { - mysql_close($link); +if (!is_null($socket)) { + if (!is_resource($link = mysql_connect($host, $user, $passwd, true))) { + printf("[006] Usage of mysql.default_socket failed\n"); + } else { + mysql_close($link); + } } if (!ini_get('sql.safe_mode')) { ini_set('mysql.default_port', $port); - if (!is_resource($link = mysql_connect($host, $user, $passwd, true))) { - printf("[007] Usage of mysql.default_port failed\n"); - } else { - mysql_close($link); + if (!is_null($port)) { + if (!is_resource($link = mysql_connect($host, $user, $passwd, true))) { + printf("[007] Usage of mysql.default_port failed\n"); + } else { + mysql_close($link); + } } ini_set('mysql.default_password', $passwd); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/mysql/tests/connect.inc trunk/ext/mysql/tests/connect.inc
uw Tue, 20 Oct 2009 08:23:06 + Revision: http://svn.php.net/viewvc?view=revision&revision=289786 Log: Bail if connect.inc gets included twice. Including twice is most likely a 'bug'. See also http://news.php.net/php.cvs/60720 Changed paths: U php/php-src/branches/PHP_5_3/ext/mysql/tests/connect.inc U php/php-src/trunk/ext/mysql/tests/connect.inc Modified: php/php-src/branches/PHP_5_3/ext/mysql/tests/connect.inc === --- php/php-src/branches/PHP_5_3/ext/mysql/tests/connect.inc2009-10-20 00:43:30 UTC (rev 289785) +++ php/php-src/branches/PHP_5_3/ext/mysql/tests/connect.inc2009-10-20 08:23:06 UTC (rev 289786) @@ -19,30 +19,34 @@ } } -/* wrapper to simplify test porting */ -function my_mysql_connect($host, $user, $passwd, $db, $port, $socket, $flags = NULL) { - global $connect_flags; +if (!function_exists('my_mysql_connect')) { + /* wrapper to simplify test porting */ + function my_mysql_connect($host, $user, $passwd, $db, $port, $socket, $flags = NULL) { + global $connect_flags; - $flags = ($flags === NULL) ? $connect_flags : $flags; + $flags = ($flags === NULL) ? $connect_flags : $flags; - if ($socket) - $host = sprintf("%s:%s", $host, $socket); - else if ($port) - $host = sprintf("%s:%s", $host, $port); + if ($socket) + $host = sprintf("%s:%s", $host, $socket); + else if ($port) + $host = sprintf("%s:%s", $host, $port); - if (!$link = mysql_connect($host, $user, $passwd, true, $flags)) { - printf("[000-a] Cannot connect using host '%s', user '%s', password '', [%d] %s\n", - $host, $user, $passwd, - mysql_errno(), mysql_error()); - return false; - } + if (!$link = mysql_connect($host, $user, $passwd, true, $flags)) { + printf("[000-a] Cannot connect using host '%s', user '%s', password '', [%d] %s\n", + $host, $user, $passwd, + mysql_errno(), mysql_error()); + return false; + } - if (!mysql_select_db($db, $link)) { - printf("[000-b] [%d] %s\n", mysql_errno($link), mysql_error($link)); - return false; + if (!mysql_select_db($db, $link)) { + printf("[000-b] [%d] %s\n", mysql_errno($link), mysql_error($link)); + return false; + } + + return $link; } - - return $link; +} else { + printf("skip Eeeek/BUG/FIXME - connect.inc included twice! skipif bug?\n"); } /* Modified: php/php-src/trunk/ext/mysql/tests/connect.inc === --- php/php-src/trunk/ext/mysql/tests/connect.inc 2009-10-20 00:43:30 UTC (rev 289785) +++ php/php-src/trunk/ext/mysql/tests/connect.inc 2009-10-20 08:23:06 UTC (rev 289786) @@ -19,30 +19,34 @@ } } -/* wrapper to simplify test porting */ -function my_mysql_connect($host, $user, $passwd, $db, $port, $socket, $flags = NULL) { - global $connect_flags; +if (!function_exists('my_mysql_connect')) { + /* wrapper to simplify test porting */ + function my_mysql_connect($host, $user, $passwd, $db, $port, $socket, $flags = NULL) { + global $connect_flags; - $flags = ($flags === NULL) ? $connect_flags : $flags; + $flags = ($flags === NULL) ? $connect_flags : $flags; - if ($socket) - $host = sprintf("%s:%s", $host, $socket); - else if ($port) - $host = sprintf("%s:%s", $host, $port); + if ($socket) + $host = sprintf("%s:%s", $host, $socket); + else if ($port) + $host = sprintf("%s:%s", $host, $port); - if (!$link = mysql_connect($host, $user, $passwd, true, $flags)) { - printf("[000-a] Cannot connect using host '%s', user '%s', password '', [%d] %s\n", - $host, $user, $passwd, - mysql_errno(), mysql_error()); - return false; - } + if (!$link = mysql_connect($host, $user, $passwd, true, $flags)) { + printf("[000-a] Cannot connect using host '%s', user '%s', password '', [%d] %s\n", + $host, $user, $passwd, + mysql_errno(), mysql_error()); + return false; + } - if (!mysql_select_db($db, $link)) { - printf("[000-b] [%d] %s\n", mysql_errno($link), mysql_error($link)); - return false; + if (!mysql_select_db($db, $link))