[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/mysqli/tests/mysqli_poll_reference.phpt trunk/ext/mysqli/tests/mysqli_poll_reference.phpt
uw Tue, 22 Sep 2009 06:59:04 + Revision: http://svn.php.net/viewvc?view=revisionrevision=288547 Log: Fixing test. Can't wait to see the new run-tests materialize for detecting skip section parse errors. Changed paths: U php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_poll_reference.phpt U php/php-src/trunk/ext/mysqli/tests/mysqli_poll_reference.phpt Modified: php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_poll_reference.phpt === --- php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_poll_reference.phpt 2009-09-22 01:17:16 UTC (rev 288546) +++ php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_poll_reference.phpt 2009-09-22 06:59:04 UTC (rev 288547) @@ -13,10 +13,9 @@ if (!$link = mysqli_connect($host, $user, $passwd, $db, $port, $socket)) die(skip cannot connect); -if (mysqli_server_version($link) 50012)) +if (mysqli_server_version($link) 50012) die(skip Test needs SQL function SLEEP() available as of MySQL 5.0.12); -mysqli_close($link); ? --FILE-- ?php Modified: php/php-src/trunk/ext/mysqli/tests/mysqli_poll_reference.phpt === --- php/php-src/trunk/ext/mysqli/tests/mysqli_poll_reference.phpt 2009-09-22 01:17:16 UTC (rev 288546) +++ php/php-src/trunk/ext/mysqli/tests/mysqli_poll_reference.phpt 2009-09-22 06:59:04 UTC (rev 288547) @@ -13,10 +13,9 @@ if (!$link = mysqli_connect($host, $user, $passwd, $db, $port, $socket)) die(skip cannot connect); -if (mysqli_server_version($link) 50012)) +if (mysqli_server_version($link) 50012) die(skip Test needs SQL function SLEEP() available as of MySQL 5.0.12); -mysqli_close($link); ? --FILE-- ?php -- 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_bind_result.phpt trunk/ext/mysqli/tests/mysqli_stmt_bind_result.phpt
uw Tue, 22 Sep 2009 07:11:50 + Revision: http://svn.php.net/viewvc?view=revisionrevision=288548 Log: Fixing test. There is nothing we can do about the MySQL Client Library allocate huge 4GB buffers for some SQL types. Changed paths: U php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_stmt_bind_result.phpt U php/php-src/trunk/ext/mysqli/tests/mysqli_stmt_bind_result.phpt Modified: php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_stmt_bind_result.phpt === --- php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_stmt_bind_result.phpt 2009-09-22 06:59:04 UTC (rev 288547) +++ php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_stmt_bind_result.phpt 2009-09-22 07:11:50 UTC (rev 288548) @@ -282,8 +282,12 @@ func_mysqli_stmt_bind_result($link, $engine, b, MEDIUMTEXT, , 1640, $hint_str_or_unicode); /* Is this one related? http://bugs.php.net/bug.php?id=35759 */ - func_mysqli_stmt_bind_result($link, $engine, b, LONGBLOB, , 1660); - func_mysqli_stmt_bind_result($link, $engine, b, LONGTEXT, , 1680, $hint_str_or_unicode); + if (($IS_MYSQLND) || (!$IS_MYSQLND (ini_get('memory_limit') 4294967296))) { + /* NOTE: the MySQL Client Library - not mysqlnd - will allocate + a hugge max_length(type) = 4GB bind buffer */ + func_mysqli_stmt_bind_result($link, $engine, b, LONGBLOB, , 1660); + func_mysqli_stmt_bind_result($link, $engine, b, LONGTEXT, , 1680, $hint_str_or_unicode); + } func_mysqli_stmt_bind_result($link, $engine, s, ENUM('a', 'b'), a, 1700, $hint_str_or_unicode); func_mysqli_stmt_bind_result($link, $engine, s, ENUM('a', 'b'), NULL, 1720, $hint_str_or_unicode); Modified: php/php-src/trunk/ext/mysqli/tests/mysqli_stmt_bind_result.phpt === --- php/php-src/trunk/ext/mysqli/tests/mysqli_stmt_bind_result.phpt 2009-09-22 06:59:04 UTC (rev 288547) +++ php/php-src/trunk/ext/mysqli/tests/mysqli_stmt_bind_result.phpt 2009-09-22 07:11:50 UTC (rev 288548) @@ -282,8 +282,12 @@ func_mysqli_stmt_bind_result($link, $engine, b, MEDIUMTEXT, , 1640, $hint_str_or_unicode); /* Is this one related? http://bugs.php.net/bug.php?id=35759 */ - func_mysqli_stmt_bind_result($link, $engine, b, LONGBLOB, , 1660); - func_mysqli_stmt_bind_result($link, $engine, b, LONGTEXT, , 1680, $hint_str_or_unicode); + if (($IS_MYSQLND) || (!$IS_MYSQLND (ini_get('memory_limit') 4294967296))) { + /* NOTE: the MySQL Client Library - not mysqlnd - will allocate + a hugge max_length(type) = 4GB bind buffer */ + func_mysqli_stmt_bind_result($link, $engine, b, LONGBLOB, , 1660); + func_mysqli_stmt_bind_result($link, $engine, b, LONGTEXT, , 1680, $hint_str_or_unicode); + } func_mysqli_stmt_bind_result($link, $engine, s, ENUM('a', 'b'), a, 1700, $hint_str_or_unicode); func_mysqli_stmt_bind_result($link, $engine, s, ENUM('a', 'b'), NULL, 1720, $hint_str_or_unicode); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /SVNROOT/ global_avail
rasmus Tue, 22 Sep 2009 07:41:16 + Revision: http://svn.php.net/viewvc?view=revisionrevision=288550 Log: karma Changed paths: U SVNROOT/global_avail Modified: SVNROOT/global_avail === --- SVNROOT/global_avail2009-09-22 07:16:41 UTC (rev 288549) +++ SVNROOT/global_avail2009-09-22 07:41:16 UTC (rev 288550) @@ -304,6 +304,8 @@ avail|santiago|pecl/gupnp avail|patrickallaert|php/php-src/*/ext/ldap,php/php-src/*/tests,php/php-src/NEWS avail|basantk|pecl/memsession +avail|devour|pecl/geoip +avail|iekpo|pecl/solr,phpdoc # Objective-C bridge avail|wez,jan|php/php-objc -- 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/spl/spl_array.c trunk/ext/spl/spl_array.c
dmitry Tue, 22 Sep 2009 07:54:06 + Revision: http://svn.php.net/viewvc?view=revisionrevision=288551 Log: Fixed ext/spl/tests/arrayObject_magicMethods2.phpt Changed paths: U php/php-src/branches/PHP_5_3/ext/spl/spl_array.c U php/php-src/trunk/ext/spl/spl_array.c Modified: php/php-src/branches/PHP_5_3/ext/spl/spl_array.c === --- php/php-src/branches/PHP_5_3/ext/spl/spl_array.c2009-09-22 07:41:16 UTC (rev 288550) +++ php/php-src/branches/PHP_5_3/ext/spl/spl_array.c2009-09-22 07:54:06 UTC (rev 288551) @@ -700,6 +700,7 @@ } if (intern-debug_info-nApplyCount == 0) { + zend_hash_clean(intern-debug_info); zend_hash_copy(intern-debug_info, intern-std.properties, (copy_ctor_func_t) zval_add_ref, (void *) tmp, sizeof(zval *)); storage = intern-array; Modified: php/php-src/trunk/ext/spl/spl_array.c === --- php/php-src/trunk/ext/spl/spl_array.c 2009-09-22 07:41:16 UTC (rev 288550) +++ php/php-src/trunk/ext/spl/spl_array.c 2009-09-22 07:54:06 UTC (rev 288551) @@ -703,6 +703,7 @@ } if (intern-debug_info-nApplyCount == 0) { + zend_hash_clean(intern-debug_info); zend_hash_copy(intern-debug_info, intern-std.properties, (copy_ctor_func_t) zval_add_ref, (void *) tmp, sizeof(zval *)); storage = intern-array; -- 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_2/ext/standard/tests/strings/setlocale_variation2.phpt PHP_5_3/ext/standard/tests/strings/setlocale_variation2.phpt
dmitry Tue, 22 Sep 2009 08:22:29 + Revision: http://svn.php.net/viewvc?view=revisionrevision=288554 Log: Fixed test (removed bad locale) Changed paths: U php/php-src/branches/PHP_5_2/ext/standard/tests/strings/setlocale_variation2.phpt U php/php-src/branches/PHP_5_3/ext/standard/tests/strings/setlocale_variation2.phpt Modified: php/php-src/branches/PHP_5_2/ext/standard/tests/strings/setlocale_variation2.phpt === --- php/php-src/branches/PHP_5_2/ext/standard/tests/strings/setlocale_variation2.phpt 2009-09-22 07:58:15 UTC (rev 288553) +++ php/php-src/branches/PHP_5_2/ext/standard/tests/strings/setlocale_variation2.phpt 2009-09-22 08:22:29 UTC (rev 288554) @@ -18,6 +18,10 @@ /* setlocale() to set all available locales in the system and check the success count */ echo *** Testing setlocale() : usage variations ***\n; +function good_locale($locale) { + return $locale !== 'tt...@iqtelif.utf-8'; +} + /* Prototype : array list_system_locales( void ) * Description: To get the currently installed locle in this platform * Arguments : Nil @@ -38,8 +42,8 @@ $system_locales = explode(\n, $all_locales); - // return all the locale found in the system - return $system_locales; + // return all the locale found in the system, except for broken one + return array_filter($system_locales, 'good_locale'); } // gather all the locales installed in the system Modified: php/php-src/branches/PHP_5_3/ext/standard/tests/strings/setlocale_variation2.phpt === --- php/php-src/branches/PHP_5_3/ext/standard/tests/strings/setlocale_variation2.phpt 2009-09-22 07:58:15 UTC (rev 288553) +++ php/php-src/branches/PHP_5_3/ext/standard/tests/strings/setlocale_variation2.phpt 2009-09-22 08:22:29 UTC (rev 288554) @@ -18,6 +18,10 @@ /* setlocale() to set all available locales in the system and check the success count */ echo *** Testing setlocale() : usage variations ***\n; +function good_locale($locale) { + return $locale !== 'tt...@iqtelif.utf-8'; +} + /* Prototype : array list_system_locales( void ) * Description: To get the currently installed locle in this platform * Arguments : Nil @@ -38,8 +42,8 @@ $system_locales = explode(\n, $all_locales); - // return all the locale found in the system - return $system_locales; + // return all the locale found in the system, except for broken one + return array_filter($system_locales, 'good_locale'); } // gather all the locales installed in the system -- 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_real_connect.phpt trunk/ext/mysqli/tests/mysqli_real_connect.phpt
uw Tue, 22 Sep 2009 08:42:44 + Revision: http://svn.php.net/viewvc?view=revisionrevision=288555 Log: Fixing test Changed paths: U php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_real_connect.phpt U php/php-src/trunk/ext/mysqli/tests/mysqli_real_connect.phpt Modified: php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_real_connect.phpt === --- php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_real_connect.phpt 2009-09-22 08:22:29 UTC (rev 288554) +++ php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_real_connect.phpt 2009-09-22 08:42:44 UTC (rev 288555) @@ -161,12 +161,13 @@ printf([025] Usage of mysqli.default_host=p: did not fail\n) ; mysqli_close($link); } + @mysqli_close($link); } @var_dump($link); - if (NULL === ($tmp = mysqli_real_connect($link, $host, $user, $passwd, $db, $port, $socket))) - printf([026] Expecting not NULL, got %s/%s\n, gettype($tmp), $tmp); + if (NULL !== ($tmp = mysqli_real_connect($link, $host, $user, $passwd, $db, $port, $socket))) + printf([026] Expecting NULL, got %s/%s\n, gettype($tmp), $tmp); print done!; ? @@ -180,17 +181,17 @@ [%u|b%affected_rows]= NULL [%u|b%client_info]= - %unicode|string%(%d) %s + %s [%u|b%client_version]= int(%d) [%u|b%connect_errno]= int(%d) [%u|b%connect_error]= - %unicode|string%(%d) %s + %unicode|string%(%d) %s [%u|b%errno]= - int(%d) + %s [%u|b%error]= - %unicode|string%(%d) %s + %s [%u|b%field_count]= NULL [%u|b%host_info]= @@ -212,4 +213,6 @@ [%u|b%warning_count]= NULL } -done! + +Warning: mysqli_real_connect(): Couldn't fetch mysqli in %s on line %d +done! \ No newline at end of file Modified: php/php-src/trunk/ext/mysqli/tests/mysqli_real_connect.phpt === --- php/php-src/trunk/ext/mysqli/tests/mysqli_real_connect.phpt 2009-09-22 08:22:29 UTC (rev 288554) +++ php/php-src/trunk/ext/mysqli/tests/mysqli_real_connect.phpt 2009-09-22 08:42:44 UTC (rev 288555) @@ -161,12 +161,13 @@ printf([025] Usage of mysqli.default_host=p: did not fail\n) ; mysqli_close($link); } + @mysqli_close($link); } @var_dump($link); - if (NULL === ($tmp = mysqli_real_connect($link, $host, $user, $passwd, $db, $port, $socket))) - printf([026] Expecting not NULL, got %s/%s\n, gettype($tmp), $tmp); + if (NULL !== ($tmp = mysqli_real_connect($link, $host, $user, $passwd, $db, $port, $socket))) + printf([026] Expecting NULL, got %s/%s\n, gettype($tmp), $tmp); print done!; ? @@ -180,17 +181,17 @@ [%u|b%affected_rows]= NULL [%u|b%client_info]= - %unicode|string%(%d) %s + %s [%u|b%client_version]= int(%d) [%u|b%connect_errno]= int(%d) [%u|b%connect_error]= - %unicode|string%(%d) %s + %unicode|string%(%d) %s [%u|b%errno]= - int(%d) + %s [%u|b%error]= - %unicode|string%(%d) %s + %s [%u|b%field_count]= NULL [%u|b%host_info]= @@ -212,4 +213,6 @@ [%u|b%warning_count]= NULL } -done! + +Warning: mysqli_real_connect(): Couldn't fetch mysqli in %s on line %d +done! \ No newline at end of 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_2/ext/xmlwriter/tests/ bug48204.phpt
dmitry Tue, 22 Sep 2009 08:47:30 + Revision: http://svn.php.net/viewvc?view=revisionrevision=288556 Log: Fixed test Changed paths: U php/php-src/branches/PHP_5_2/ext/xmlwriter/tests/bug48204.phpt Modified: php/php-src/branches/PHP_5_2/ext/xmlwriter/tests/bug48204.phpt === --- php/php-src/branches/PHP_5_2/ext/xmlwriter/tests/bug48204.phpt 2009-09-22 08:42:44 UTC (rev 288555) +++ php/php-src/branches/PHP_5_2/ext/xmlwriter/tests/bug48204.phpt 2009-09-22 08:47:30 UTC (rev 288556) @@ -2,8 +2,16 @@ xmlwriter_open_uri with PHP_MAXPATHLEN + 1 --SKIPIF-- ?php if (!extension_loaded(xmlwriter)) print skip; ? +?php if (!defined('PHP_MAXPATHLEN') !substr(PHP_OS, 0, 3) == WIN !stristr(PHP_OS, 'linux')) print skip unknown PHP_MAXPATHLEN; ? --FILE-- ?php +if (!defined('PHP_MAXPATHLEN')) { + if (substr(PHP_OS, 0, 3) == WIN) { + define('PHP_MAXPATHLEN', 260); + } else if (stristr(PHP_OS, 'linux')) { + define('PHP_MAXPATHLEN', 4096); + } +} $path = str_repeat('a', PHP_MAXPATHLEN + 1); var_dump(xmlwriter_open_uri('file:///' . $path)); ? -- 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_2/ext/xmlwriter/tests/ bug48204.phpt
Hi Dmitry +?php if (!defined('PHP_MAXPATHLEN') !substr(PHP_OS, 0, 3) == WIN !stristr(PHP_OS, 'linux')) print skip unknown PHP_MAXPATHLEN; ? This looks wrong: !substr(PHP_OS, 0, 3) == WIN The substr will always be false unless the value returned by substr() is 0 -- regrads, Kalle Sommer Nielsen ka...@php.net -- 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_2/ext/date/tests/sunfuncts.phpt branches/PHP_5_2/ext/standard/tests/general_functions/sunfuncts.phpt branches/PHP_5_3/ext/date/tests/sunfuncts.phpt branches
jani Tue, 22 Sep 2009 09:41:39 + Revision: http://svn.php.net/viewvc?view=revisionrevision=288557 Log: - Move tests in the right location Changed paths: A + php/php-src/branches/PHP_5_2/ext/date/tests/sunfuncts.phpt (from php/php-src/branches/PHP_5_2/ext/standard/tests/general_functions/sunfuncts.phpt:r288556) D php/php-src/branches/PHP_5_2/ext/standard/tests/general_functions/sunfuncts.phpt A + php/php-src/branches/PHP_5_3/ext/date/tests/sunfuncts.phpt (from php/php-src/branches/PHP_5_3/ext/standard/tests/general_functions/sunfuncts.phpt:r288556) D php/php-src/branches/PHP_5_3/ext/standard/tests/general_functions/sunfuncts.phpt A + php/php-src/trunk/ext/date/tests/sunfuncts.phpt (from php/php-src/trunk/ext/standard/tests/general_functions/sunfuncts.phpt:r288549) D php/php-src/trunk/ext/standard/tests/general_functions/sunfuncts.phpt Copied: php/php-src/branches/PHP_5_2/ext/date/tests/sunfuncts.phpt (from rev 288556, php/php-src/branches/PHP_5_2/ext/standard/tests/general_functions/sunfuncts.phpt) === --- php/php-src/branches/PHP_5_2/ext/date/tests/sunfuncts.phpt (rev 0) +++ php/php-src/branches/PHP_5_2/ext/date/tests/sunfuncts.phpt 2009-09-22 09:41:39 UTC (rev 288557) @@ -0,0 +1,44 @@ +--TEST-- +date_sunrise() and date_sunset() functions +--INI-- +precision=13 +--FILE-- +?php + +putenv (TZ=Asia/Jerusalem); + +for($a=1;$a=12;$a++){ + echo date_sunrise(mktime(1,1,1,$a,1,2003),SUNFUNCS_RET_TIMESTAMP,31.76670,35.23330,90.83,2). ; + echo date_sunrise(mktime(1,1,1,$a,1,2003),SUNFUNCS_RET_STRING,31.76670,35.23330,90.83,2). ; + echo date_sunrise(mktime(1,1,1,$a,1,2003),SUNFUNCS_RET_DOUBLE,31.76670,35.23330,90.83,2).\n; + + echo date_sunset(mktime(1,1,1,$a,1,2003),SUNFUNCS_RET_TIMESTAMP,31.76670,35.23330,90.83,2). ; + echo date_sunset(mktime(1,1,1,$a,1,2003),SUNFUNCS_RET_STRING,31.76670,35.23330,90.83,2). ; + echo date_sunset(mktime(1,1,1,$a,1,2003),SUNFUNCS_RET_DOUBLE,31.76670,35.23330,90.83,2).\n; +} +? +--EXPECTF-- +1041395864 06:37 6.6290131458%d +1041432452 16:47 16.792451114%d +1044073855 06:30 6.5154089279%d +1044112463 17:14 17.239870289%d +1046491495 06:04 6.0822145033%d +1046533075 17:37 17.632011035%d +1049167581 05:26 5.4394438111%d +1049212774 17:59 17.993035729%d +1051757532 04:52 4.8701934126%d +1051806007 18:20 18.335390508%d +1054434776 04:32 4.5489827182%d +1054485647 18:40 18.679812949%d +1057026949 04:35 4.5971956372%d +1057078197 18:49 18.832563396%d +1059706409 04:53 4.8916575089%d +1059755837 18:37 18.621440704%d +1062385999 05:13 5.2220951121%d +1062432291 18:04 18.080957168%d +1064979098 05:31 5.5273199215%d +1065021952 17:25 17.431339135%d +1067658845 05:54 5.9016292870%d +1067698274 16:51 16.853902453%d +1070252387 06:19 6.3299242689%d +1070289382 16:36 16.606312600%d Deleted: php/php-src/branches/PHP_5_2/ext/standard/tests/general_functions/sunfuncts.phpt === --- php/php-src/branches/PHP_5_2/ext/standard/tests/general_functions/sunfuncts.phpt 2009-09-22 08:47:30 UTC (rev 288556) +++ php/php-src/branches/PHP_5_2/ext/standard/tests/general_functions/sunfuncts.phpt 2009-09-22 09:41:39 UTC (rev 288557) @@ -1,44 +0,0 @@ ---TEST-- -date_sunrise() and date_sunset() functions ---INI-- -precision=13 ---FILE-- -?php - -putenv (TZ=Asia/Jerusalem); - -for($a=1;$a=12;$a++){ - echo date_sunrise(mktime(1,1,1,$a,1,2003),SUNFUNCS_RET_TIMESTAMP,31.76670,35.23330,90.83,2). ; - echo date_sunrise(mktime(1,1,1,$a,1,2003),SUNFUNCS_RET_STRING,31.76670,35.23330,90.83,2). ; - echo date_sunrise(mktime(1,1,1,$a,1,2003),SUNFUNCS_RET_DOUBLE,31.76670,35.23330,90.83,2).\n; - - echo date_sunset(mktime(1,1,1,$a,1,2003),SUNFUNCS_RET_TIMESTAMP,31.76670,35.23330,90.83,2). ; - echo date_sunset(mktime(1,1,1,$a,1,2003),SUNFUNCS_RET_STRING,31.76670,35.23330,90.83,2). ; - echo date_sunset(mktime(1,1,1,$a,1,2003),SUNFUNCS_RET_DOUBLE,31.76670,35.23330,90.83,2).\n; -} -? ---EXPECTF-- -1041395864 06:37 6.6290131458%d -1041432452 16:47 16.792451114%d -1044073855 06:30 6.5154089279%d -1044112463 17:14 17.239870289%d -1046491495 06:04 6.0822145033%d -1046533075 17:37 17.632011035%d -1049167581 05:26 5.4394438111%d -1049212774 17:59 17.993035729%d -1051757532 04:52 4.8701934126%d -1051806007 18:20 18.335390508%d -1054434776 04:32 4.5489827182%d -1054485647 18:40 18.679812949%d -1057026949 04:35 4.5971956372%d -1057078197 18:49 18.832563396%d -1059706409 04:53 4.8916575089%d -1059755837 18:37 18.621440704%d -1062385999 05:13 5.2220951121%d -1062432291 18:04 18.080957168%d -1064979098 05:31 5.5273199215%d -1065021952 17:25 17.431339135%d -1067658845 05:54 5.9016292870%d -1067698274 16:51 16.853902453%d -1070252387 06:19 6.3299242689%d -1070289382 16:36 16.606312600%d Copied: php/php-src/branches/PHP_5_3/ext/date/tests/sunfuncts.phpt (from rev 288556,
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/ext/openssl/tests/bug48182.phpt branches/PHP_5_3/ext/openssl/tests/bug48182.phpt trunk/ext/openssl/tests/bug48182.phpt
dmitry Tue, 22 Sep 2009 10:15:10 + Revision: http://svn.php.net/viewvc?view=revisionrevision=288558 Log: Fixed test (it failed from time to time because of very small timeouts) Changed paths: U php/php-src/branches/PHP_5_2/ext/openssl/tests/bug48182.phpt U php/php-src/branches/PHP_5_3/ext/openssl/tests/bug48182.phpt U php/php-src/trunk/ext/openssl/tests/bug48182.phpt Modified: php/php-src/branches/PHP_5_2/ext/openssl/tests/bug48182.phpt === --- php/php-src/branches/PHP_5_2/ext/openssl/tests/bug48182.phpt 2009-09-22 09:41:39 UTC (rev 288557) +++ php/php-src/branches/PHP_5_2/ext/openssl/tests/bug48182.phpt 2009-09-22 10:15:10 UTC (rev 288558) @@ -28,12 +28,12 @@ $r = array($link); $w = array(); $e = array(); - if (stream_select($r, $w, $e, 0, 1000) != 0) + if (stream_select($r, $w, $e, 1, 0) != 0) $data .= fread($link, 8192); $r = array(); $w = array($link); - if (stream_select($r, $w, $e, 0, 1000) != 0) + if (stream_select($r, $w, $e, 1, 0) != 0) $wrote = fwrite($link, $data, strlen($data)); // close stuff @@ -59,7 +59,7 @@ $r = array($socket); $w = array(); $e = array(); - if (stream_select($r, $w, $e, 0, 10) != 0) + if (stream_select($r, $w, $e, 1, 0) != 0) { $data .= fread($socket, 1024); } Modified: php/php-src/branches/PHP_5_3/ext/openssl/tests/bug48182.phpt === --- php/php-src/branches/PHP_5_3/ext/openssl/tests/bug48182.phpt 2009-09-22 09:41:39 UTC (rev 288557) +++ php/php-src/branches/PHP_5_3/ext/openssl/tests/bug48182.phpt 2009-09-22 10:15:10 UTC (rev 288558) @@ -28,12 +28,12 @@ $r = array($link); $w = array(); $e = array(); - if (stream_select($r, $w, $e, 0, 1000) != 0) + if (stream_select($r, $w, $e, 1, 0) != 0) $data .= fread($link, 8192); $r = array(); $w = array($link); - if (stream_select($r, $w, $e, 0, 1000) != 0) + if (stream_select($r, $w, $e, 1, 0) != 0) $wrote = fwrite($link, $data, strlen($data)); // close stuff @@ -59,7 +59,7 @@ $r = array($socket); $w = array(); $e = array(); - if (stream_select($r, $w, $e, 0, 10) != 0) + if (stream_select($r, $w, $e, 1, 0) != 0) { $data .= fread($socket, 1024); } Modified: php/php-src/trunk/ext/openssl/tests/bug48182.phpt === --- php/php-src/trunk/ext/openssl/tests/bug48182.phpt 2009-09-22 09:41:39 UTC (rev 288557) +++ php/php-src/trunk/ext/openssl/tests/bug48182.phpt 2009-09-22 10:15:10 UTC (rev 288558) @@ -28,12 +28,12 @@ $r = array($link); $w = array(); $e = array(); - if (stream_select($r, $w, $e, 0, 1000) != 0) + if (stream_select($r, $w, $e, 1, 0) != 0) $data .= fread($link, 8192); $r = array(); $w = array($link); - if (stream_select($r, $w, $e, 0, 1000) != 0) + if (stream_select($r, $w, $e, 1, 0) != 0) $wrote = fwrite($link, $data, strlen($data)); // close stuff @@ -59,7 +59,7 @@ $r = array($socket); $w = array(); $e = array(); - if (stream_select($r, $w, $e, 0, 10) != 0) + if (stream_select($r, $w, $e, 1, 0) != 0) { $data .= fread($socket, 1024); } -- 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_pconn_max_links.phpt trunk/ext/mysql/tests/mysql_pconn_max_links.phpt
uw Tue, 22 Sep 2009 11:58:46 + Revision: http://svn.php.net/viewvc?view=revisionrevision=288562 Log: Fixing test Changed paths: U php/php-src/branches/PHP_5_3/ext/mysql/tests/mysql_pconn_max_links.phpt U php/php-src/trunk/ext/mysql/tests/mysql_pconn_max_links.phpt Modified: php/php-src/branches/PHP_5_3/ext/mysql/tests/mysql_pconn_max_links.phpt === --- php/php-src/branches/PHP_5_3/ext/mysql/tests/mysql_pconn_max_links.phpt 2009-09-22 11:32:40 UTC (rev 288561) +++ php/php-src/branches/PHP_5_3/ext/mysql/tests/mysql_pconn_max_links.phpt 2009-09-22 11:58:46 UTC (rev 288562) @@ -18,26 +18,35 @@ if (!mysql_select_db($db, $link)) die(sprintf(skip [%d] %s, mysql_errno($link), mysql_error($link))); + if (!$res = mysql_query(SELECT CURRENT_USER() AS _user, $link)) + die(sprintf(skip [%d] %s, mysql_errno($link), mysql_error($link))); + + $row = mysql_fetch_assoc($res); + mysql_free_result($res); + $host = substr($row['_user'], strrpos($row['_user'], @) + 1, strlen($row['_user'])); + mysql_query('DROP USER pcontest', $link); - if (!mysql_query('CREATE USER pcontest IDENTIFIED BY pcontest', $link)) { + mysql_query(sprintf('DROP USER pcontest@%s', mysql_real_escape_string($host, $link)), $link); + if (!mysql_query(sprintf('CREATE USER pcontest@%s IDENTIFIED BY pcontest', mysql_real_escape_string($host, $link)), $link)) { printf(skip Cannot create second DB user [%d] %s, mysql_errno($link), mysql_error($link)); mysql_close($link); die(); } // we might be able to specify the host using CURRENT_USER(), but... - if (!mysql_query(sprintf(GRANT SELECT ON TABLE %s.test TO pcontest@'%%', $db), $link)) { + if (!mysql_query(sprintf('GRANT SELECT ON TABLE %s.test TO pcontest@%s', $db, mysql_real_escape_string($host, $link)), $link)) { printf(skip Cannot GRANT SELECT to second DB user [%d] %s, mysql_errno($link), mysql_error($link)); - mysql_query('REVOKE ALL PRIVILEGES, GRANT OPTION FROM pcontest', $link); - mysql_query('DROP USER pcontest', $link); + mysql_query(sprintf('REVOKE ALL PRIVILEGES, GRANT OPTION FROM pcontest@%s', mysql_real_escape_string($host, $link)), $link); + mysql_query(sprintf('DROP USER pcontest@%s', mysql_real_escape_string($host, $link)), $link); mysql_close($link); die(); } + mysql_close($link); ? --INI-- -mysql.max_links=2 -mysql.max_persistent=1 +mysql.max_links=3 +mysql.max_persistent=2 mysql.allow_persistent=1 --FILE-- ?php @@ -76,18 +85,26 @@ var_dump($row); // change the password for the second DB user and kill the persistent connection - if (!mysql_query('SET PASSWORD FOR pcontest = PASSWORD(newpass)', $link)) - printf([006] Cannot change PW of second DB user, [%d] %s\n, mysql_errno($link), mysql_error($link)); + if (!$res = mysql_query(SELECT CURRENT_USER() AS _user, $link)) + printf([006] [%d] %s, mysql_errno($link), mysql_error($link)); + $row = mysql_fetch_assoc($res); + mysql_free_result($res); + $host = substr($row['_user'], strrpos($row['_user'], @) + 1, strlen($row['_user'])); + + $sql = sprintf('SET PASSWORD FOR pcontest@%s = PASSWORD(newpass)', mysql_real_escape_string($host, $link)); + if (!mysql_query($sql, $link)) + printf([007] Cannot change PW of second DB user, [%d] %s\n, mysql_errno($link), mysql_error($link)); + // persistent connections cannot be closed but only be killed $pthread_id = mysql_thread_id($plink); if (!mysql_query(sprintf('KILL %d', $pthread_id), $link)) - printf([007] Cannot KILL persistent connection of second DB user, [%d] %s\n, mysql_errno($link), mysql_error($link)); + printf([008] Cannot KILL persistent connection of second DB user, [%d] %s\n, mysql_errno($link), mysql_error($link)); // give the server a second to really kill the thread sleep(1); if (!$res = mysql_query(SHOW FULL PROCESSLIST, $link)) - printf([008] [%d] %s\n, mysql_errno($link), mysql_error($link)); + printf([009] [%d] %s\n, mysql_errno($link), mysql_error($link)); $running_threads = array(); while ($row = mysql_fetch_assoc($res)) @@ -95,11 +112,11 @@ mysql_free_result($res); if (isset($running_threads[$pthread_id])) - printf([009] Persistent connection has not been killed); + printf([010] Persistent connection has not been killed\n); // we might get the old handle if ($plink = @mysql_pconnect($host, 'pcontest', 'pcontest')) - printf([010] Can connect using the old password, [%d] %s\n, + printf([011] Can connect using the old password, [%d] %s\n, mysql_errno(), mysql_error()); ob_start(); @@ -108,34 +125,34 @@ ob_end_clean(); $phpinfo = substr($phpinfo, strpos($phpinfo, 'MySQL Support = enabled'), 500); if (!preg_match('@Active Persistent Links\s+=\s+(\d+)@ismU', $phpinfo, $matches)) - printf([011] Cannot get # active persistent links from phpinfo()); + printf([012] Cannot get # active persistent links from phpinfo()\n); $num_plinks_kill = $matches[1]; - if
[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/
nlopess Tue, 22 Sep 2009 12:12:43 + Revision: http://svn.php.net/viewvc?view=revisionrevision=288565 Log: spread some svn:ignore love Changed paths: _U php/php-src/branches/PHP_5_3/ext/bcmath/libbcmath/src/ _U php/php-src/branches/PHP_5_3/ext/snmp/ _U php/php-src/branches/PHP_5_3/ext/soap/tests/interop/Round3/GroupD/ _U php/php-src/branches/PHP_5_3/ext/soap/tests/interop/Round3/GroupF/ _U php/php-src/branches/PHP_5_3/ext/sockets/ _U php/php-src/branches/PHP_5_3/ext/sqlite/tests/pdo/ _U php/php-src/branches/PHP_5_3/ext/standard/ _U php/php-src/branches/PHP_5_3/ext/standard/tests/file/windows_acls/ _U php/php-src/branches/PHP_5_3/ext/sysvshm/ _U php/php-src/branches/PHP_5_3/tests/lang/operators/ _U php/php-src/branches/PHP_5_3/tests/run-test/ _U php/php-src/branches/PHP_5_3/tests/strings/ Property changes on: php/php-src/branches/PHP_5_3/ext/bcmath/libbcmath/src ___ Added: svn:ignore + *.gcno *.gcda Property changes on: php/php-src/branches/PHP_5_3/ext/snmp ___ Added: svn:ignore + *.gcno *.gcda Property changes on: php/php-src/branches/PHP_5_3/ext/soap/tests/interop/Round3/GroupD ___ Added: svn:ignore + *.php Property changes on: php/php-src/branches/PHP_5_3/ext/soap/tests/interop/Round3/GroupF ___ Added: svn:ignore + *.php Property changes on: php/php-src/branches/PHP_5_3/ext/sockets ___ Added: svn:ignore + *.gcno *.gcda Property changes on: php/php-src/branches/PHP_5_3/ext/sqlite/tests/pdo ___ Added: svn:ignore + *.php Property changes on: php/php-src/branches/PHP_5_3/ext/standard ___ Added: svn:ignore + *.gcno *.gcda Property changes on: php/php-src/branches/PHP_5_3/ext/standard/tests/file/windows_acls ___ Added: svn:ignore + *.php Property changes on: php/php-src/branches/PHP_5_3/ext/sysvshm ___ Added: svn:ignore + *.gcno *.gcda Property changes on: php/php-src/branches/PHP_5_3/tests/lang/operators ___ Added: svn:ignore + *.php Property changes on: php/php-src/branches/PHP_5_3/tests/run-test ___ Added: svn:ignore + *.php Property changes on: php/php-src/branches/PHP_5_3/tests/strings ___ Added: svn:ignore + *.php -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/
nlopess Tue, 22 Sep 2009 12:14:47 + Revision: http://svn.php.net/viewvc?view=revisionrevision=288566 Log: spread more svn:ignore love Changed paths: _U php/php-src/trunk/ext/standard/tests/file/windows_acls/ _U php/php-src/trunk/tests/lang/operators/ Property changes on: php/php-src/trunk/ext/standard/tests/file/windows_acls ___ Added: svn:ignore + *.php Property changes on: php/php-src/trunk/tests/lang/operators ___ Added: svn:ignore + *.php -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] Re: svn: /php/php-src/ branches/PHP_5_3/ext/phar/tests/zip/phar_stub.phpt trunk/ext/phar/tests/zip/phar_stub.phpt
Dmitry Stogov wrote: dmitry Mon, 21 Sep 2009 15:23:25 + Revision: http://svn.php.net/viewvc?view=revisionrevision=288535 Log: Fixed tests (removed irrelevant check which makes test to fail from time to time) Changed paths: U php/php-src/branches/PHP_5_3/ext/phar/tests/zip/phar_stub.phpt U php/php-src/trunk/ext/phar/tests/zip/phar_stub.phpt you forgot pecl. Also, this is not an irrelevant check because a bug in the past stored the wrong mtime. Greg -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/ext/mysqli/ mysqli_api.c
andrey Tue, 22 Sep 2009 13:58:52 + Revision: http://svn.php.net/viewvc?view=revisionrevision=288570 Log: Fix handling of BIT fields in mysqli, when libmysql is used We need to use macros from mysqlnd to be able to read the bit fields, as they are specially encoded. mysqlnd is always there, 5.3+, so its macros can be used, even if mysqlnd is not compiled as library of choice. Changed paths: U php/php-src/trunk/ext/mysqli/mysqli_api.c Modified: php/php-src/trunk/ext/mysqli/mysqli_api.c === --- php/php-src/trunk/ext/mysqli/mysqli_api.c 2009-09-22 13:22:57 UTC (rev 288569) +++ php/php-src/trunk/ext/mysqli/mysqli_api.c 2009-09-22 13:58:52 UTC (rev 288570) @@ -31,6 +31,7 @@ #include php_globals.h #include ext/standard/info.h #include php_mysqli_structs.h +#include ext/mysqlnd/mysqlnd_portability.h /* {{{ proto mixed mysqli_affected_rows(object link) U Get number of affected rows in previous MySQL operation */ @@ -356,6 +357,7 @@ bind[ofs].is_null = stmt-result.is_null[ofs]; bind[ofs].buffer_length = stmt-result.buf[ofs].buflen; bind[ofs].is_unsigned = (stmt-stmt-fields[ofs].flags UNSIGNED_FLAG) ? 1 : 0; + bind[ofs].length = stmt-result.buf[ofs].output_len; break; case MYSQL_TYPE_DATE: @@ -921,9 +923,29 @@ ZVAL_DOUBLE(stmt-result.vars[i], *(double *)stmt-result.buf[i].val); break; case IS_STRING: - if (stmt-stmt-bind[i].buffer_type == MYSQL_TYPE_LONGLONG) { + if (stmt-stmt-bind[i].buffer_type == MYSQL_TYPE_LONGLONG +#if MYSQL_VERSION_ID 50002 +|| stmt-stmt-bind[i].buffer_type == MYSQL_TYPE_BIT +#endif +) { my_bool uns= (stmt-stmt-fields[i].flags UNSIGNED_FLAG)? 1:0; - llval= *(my_ulonglong *) stmt-result.buf[i].val; +#if MYSQL_VERSION_ID 50002 + if (stmt-stmt-bind[i].buffer_type == MYSQL_TYPE_BIT) { + switch (stmt-result.buf[i].output_len) { + case 8:llval = (my_ulonglong) bit_uint8korr(stmt-result.buf[i].val);break; + case 7:llval = (my_ulonglong) bit_uint7korr(stmt-result.buf[i].val);break; + case 6:llval = (my_ulonglong) bit_uint6korr(stmt-result.buf[i].val);break; + case 5:llval = (my_ulonglong) bit_uint5korr(stmt-result.buf[i].val);break; + case 4:llval = (my_ulonglong) bit_uint4korr(stmt-result.buf[i].val);break; + case 3:llval = (my_ulonglong) bit_uint3korr(stmt-result.buf[i].val);break; + case 2:llval = (my_ulonglong) bit_uint2korr(stmt-result.buf[i].val);break; + case 1:llval = (my_ulonglong) uint1korr(stmt-result.buf[i].val);break; + } + } else +#endif + { + llval= *(my_ulonglong *) stmt-result.buf[i].val; + } #if SIZEOF_LONG==8 if (uns llval 9223372036854775807L) { #elif SIZEOF_LONG==4 @@ -942,14 +964,7 @@ } else { ZVAL_LONG(stmt-result.vars[i], llval); } - } -#if MYSQL_VERSION_ID 50002 - else if (stmt-stmt-bind[i].buffer_type == MYSQL_TYPE_BIT) { - llval = *(my_ulonglong *)stmt-result.buf[i].val; - ZVAL_LONG(stmt-result.vars[i], llval); -
[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ext/mysqli/ mysqli_api.c
andrey Tue, 22 Sep 2009 13:59:29 + Revision: http://svn.php.net/viewvc?view=revisionrevision=288571 Log: MFH: Fix handling of BIT fields in mysqli, when libmysql is used We need to use macros from mysqlnd to be able to read the bit fields, as they are specially encoded. mysqlnd is always there, 5.3+, so its macros can be used, even if mysqlnd is not compiled as library of choice. Changed paths: U php/php-src/branches/PHP_5_3/ext/mysqli/mysqli_api.c Modified: php/php-src/branches/PHP_5_3/ext/mysqli/mysqli_api.c === --- php/php-src/branches/PHP_5_3/ext/mysqli/mysqli_api.c2009-09-22 13:58:52 UTC (rev 288570) +++ php/php-src/branches/PHP_5_3/ext/mysqli/mysqli_api.c2009-09-22 13:59:29 UTC (rev 288571) @@ -31,6 +31,7 @@ #include php_globals.h #include ext/standard/info.h #include php_mysqli_structs.h +#include ext/mysqlnd/mysqlnd_portability.h /* {{{ proto mixed mysqli_affected_rows(object link) Get number of affected rows in previous MySQL operation */ @@ -356,6 +357,7 @@ bind[ofs].is_null = stmt-result.is_null[ofs]; bind[ofs].buffer_length = stmt-result.buf[ofs].buflen; bind[ofs].is_unsigned = (stmt-stmt-fields[ofs].flags UNSIGNED_FLAG) ? 1 : 0; + bind[ofs].length = stmt-result.buf[ofs].output_len; break; case MYSQL_TYPE_DATE: @@ -880,9 +882,29 @@ ZVAL_DOUBLE(stmt-result.vars[i], *(double *)stmt-result.buf[i].val); break; case IS_STRING: - if (stmt-stmt-bind[i].buffer_type == MYSQL_TYPE_LONGLONG) { + if (stmt-stmt-bind[i].buffer_type == MYSQL_TYPE_LONGLONG +#if MYSQL_VERSION_ID 50002 +|| stmt-stmt-bind[i].buffer_type == MYSQL_TYPE_BIT +#endif +) { my_bool uns= (stmt-stmt-fields[i].flags UNSIGNED_FLAG)? 1:0; - llval= *(my_ulonglong *) stmt-result.buf[i].val; +#if MYSQL_VERSION_ID 50002 + if (stmt-stmt-bind[i].buffer_type == MYSQL_TYPE_BIT) { + switch (stmt-result.buf[i].output_len) { + case 8:llval = (my_ulonglong) bit_uint8korr(stmt-result.buf[i].val);break; + case 7:llval = (my_ulonglong) bit_uint7korr(stmt-result.buf[i].val);break; + case 6:llval = (my_ulonglong) bit_uint6korr(stmt-result.buf[i].val);break; + case 5:llval = (my_ulonglong) bit_uint5korr(stmt-result.buf[i].val);break; + case 4:llval = (my_ulonglong) bit_uint4korr(stmt-result.buf[i].val);break; + case 3:llval = (my_ulonglong) bit_uint3korr(stmt-result.buf[i].val);break; + case 2:llval = (my_ulonglong) bit_uint2korr(stmt-result.buf[i].val);break; + case 1:llval = (my_ulonglong) uint1korr(stmt-result.buf[i].val);break; + } + } else +#endif + { + llval= *(my_ulonglong *) stmt-result.buf[i].val; + } #if SIZEOF_LONG==8 if (uns llval 9223372036854775807L) { #elif SIZEOF_LONG==4 @@ -901,14 +923,7 @@ } else { ZVAL_LONG(stmt-result.vars[i], llval); } - } -#if MYSQL_VERSION_ID 50002 - else if (stmt-stmt-bind[i].buffer_type == MYSQL_TYPE_BIT) { - llval = *(my_ulonglong *)stmt-result.buf[i].val; -
[PHP-CVS] svn: /SVNROOT/ global_avail
pajoye Tue, 22 Sep 2009 14:22:05 + Revision: http://svn.php.net/viewvc?view=revisionrevision=288572 Log: - Give Ken access to pres Changed paths: U SVNROOT/global_avail Modified: SVNROOT/global_avail === --- SVNROOT/global_avail2009-09-22 13:59:29 UTC (rev 288571) +++ SVNROOT/global_avail2009-09-22 14:22:05 UTC (rev 288572) @@ -57,7 +57,7 @@ # The PHP Presentation Group has access to the presentations on the # conf.php.net site. -avail|toby,sterling,jon,graeme,derick,imajes,wez,iliaa,jmcastagnetto,shiflett,nohn,sebastian,vmarshall,alan_k,lhl,eru,sklar,wenz,zak,gschlossnagle,jacques,pollita,amt,john,hholzgra,pajoye,helly,dbs,vrana,kore,philip|web/pres2,web/presentations +avail|toby,sterling,jon,graeme,derick,imajes,wez,iliaa,jmcastagnetto,shiflett,nohn,sebastian,vmarshall,alan_k,lhl,eru,sklar,wenz,zak,gschlossnagle,jacques,pollita,amt,john,hholzgra,pajoye,helly,dbs,vrana,kore,philip,kguest|web/pres2,web/presentations # The PHP Quality Assurance Team maintains their own website. -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/ext/mysqlnd/ config9.m4
andrey Tue, 22 Sep 2009 14:43:37 + Revision: http://svn.php.net/viewvc?view=revisionrevision=288574 Log: Check for the different types and create the corresponding configuration file, so it can be used by mysqli, even if mysqlnd is not enabled at all. Changed paths: U php/php-src/trunk/ext/mysqlnd/config9.m4 Modified: php/php-src/trunk/ext/mysqlnd/config9.m4 === --- php/php-src/trunk/ext/mysqlnd/config9.m42009-09-22 14:43:16 UTC (rev 288573) +++ php/php-src/trunk/ext/mysqlnd/config9.m42009-09-22 14:43:37 UTC (rev 288574) @@ -18,8 +18,6 @@ PHP_NEW_EXTENSION(mysqlnd, $mysqlnd_sources, no) PHP_ADD_BUILD_DIR([ext/mysqlnd], 1) - PHP_INSTALL_HEADERS([ext/mysqlnd]) - PHP_INSTALL_HEADERS([$ext_builddir/php_mysqlnd_config.h]) dnl Windows uses config.w32 thus this code is safe for now if test $PHP_MYSQLND_THREADING = yes; then @@ -27,6 +25,10 @@ AC_DEFINE([MYSQLND_THREADED], 1, [Use mysqlnd internal threading]) fi +fi + PHP_INSTALL_HEADERS([ext/mysqlnd]) + PHP_INSTALL_HEADERS([$ext_builddir/php_mysqlnd_config.h]) + dnl This creates a file so it has to be after above macros PHP_CHECK_TYPES([int8 uint8 int16 uint16 int32 uint32 uchar ulong int8_t uint8_t int16_t uint16_t int32_t uint32_t int64_t uint64_t], [ $ext_builddir/php_mysqlnd_config.h @@ -38,4 +40,3 @@ #include stdint.h #endif ]) -fi -- 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/mysqlnd/ config9.m4
andrey Tue, 22 Sep 2009 14:44:11 + Revision: http://svn.php.net/viewvc?view=revisionrevision=288575 Log: MFH:Check for the different types and create the corresponding configuration file, so it can be used by mysqli, even if mysqlnd is not enabled at all. Changed paths: U php/php-src/branches/PHP_5_3/ext/mysqlnd/config9.m4 Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/config9.m4 === --- php/php-src/branches/PHP_5_3/ext/mysqlnd/config9.m4 2009-09-22 14:43:37 UTC (rev 288574) +++ php/php-src/branches/PHP_5_3/ext/mysqlnd/config9.m4 2009-09-22 14:44:11 UTC (rev 288575) @@ -18,8 +18,6 @@ PHP_NEW_EXTENSION(mysqlnd, $mysqlnd_sources, no) PHP_ADD_BUILD_DIR([ext/mysqlnd], 1) - PHP_INSTALL_HEADERS([ext/mysqlnd]) - PHP_INSTALL_HEADERS([$ext_builddir/php_mysqlnd_config.h]) dnl Windows uses config.w32 thus this code is safe for now if test $PHP_MYSQLND_THREADING = yes; then @@ -27,6 +25,10 @@ AC_DEFINE([MYSQLND_THREADED], 1, [Use mysqlnd internal threading]) fi +fi + PHP_INSTALL_HEADERS([ext/mysqlnd]) + PHP_INSTALL_HEADERS([$ext_builddir/php_mysqlnd_config.h]) + dnl This creates a file so it has to be after above macros PHP_CHECK_TYPES([int8 uint8 int16 uint16 int32 uint32 uchar ulong int8_t uint8_t int16_t uint16_t int32_t uint32_t int64_t uint64_t], [ $ext_builddir/php_mysqlnd_config.h @@ -38,4 +40,3 @@ #include stdint.h #endif ]) -fi -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/ext/mysqlnd/ php_mysqlnd.c
andrey Tue, 22 Sep 2009 14:52:12 + Revision: http://svn.php.net/viewvc?view=revisionrevision=288576 Log: sync with branch, after Ulf's commits Changed paths: U php/php-src/trunk/ext/mysqlnd/php_mysqlnd.c Modified: php/php-src/trunk/ext/mysqlnd/php_mysqlnd.c === --- php/php-src/trunk/ext/mysqlnd/php_mysqlnd.c 2009-09-22 14:44:11 UTC (rev 288575) +++ php/php-src/trunk/ext/mysqlnd/php_mysqlnd.c 2009-09-22 14:52:12 UTC (rev 288576) @@ -107,6 +107,8 @@ php_info_print_table_row(2, Command buffer size, buf); snprintf(buf, sizeof(buf), %ld, MYSQLND_G(net_read_buffer_size)); php_info_print_table_row(2, Read buffer size, buf); + snprintf(buf, sizeof(buf), %ld, MYSQLND_G(net_read_timeout)); + php_info_print_table_row(2, Read timeout, buf); php_info_print_table_row(2, Collecting statistics, MYSQLND_G(collect_statistics)? Yes:No); php_info_print_table_row(2, Collecting memory statistics, MYSQLND_G(collect_memory_statistics)? Yes:No); php_info_print_table_end(); @@ -150,7 +152,7 @@ STD_PHP_INI_ENTRY(mysqlnd.debug, NULL, PHP_INI_SYSTEM, OnUpdateString, debug, zend_mysqlnd_globals, mysqlnd_globals) STD_PHP_INI_ENTRY(mysqlnd.net_cmd_buffer_size,2048, PHP_INI_ALL,OnUpdateLong, net_cmd_buffer_size,zend_mysqlnd_globals, mysqlnd_globals) STD_PHP_INI_ENTRY(mysqlnd.net_read_buffer_size, 32768,PHP_INI_ALL,OnUpdateLong, net_read_buffer_size, zend_mysqlnd_globals, mysqlnd_globals) - STD_PHP_INI_ENTRY(mysqlnd.net_read_timeout, 31536000, PHP_INI_SYSTEM, OnUpdateLong, net_read_timeout, zend_mysqlnd_globals, mysqlnd_globals) + STD_PHP_INI_ENTRY(mysqlnd.net_read_timeout, 31536000, PHP_INI_SYSTEM, OnUpdateLong, net_read_timeout, zend_mysqlnd_globals, mysqlnd_globals) STD_PHP_INI_ENTRY(mysqlnd.log_mask, 0, PHP_INI_ALL,OnUpdateLong, log_mask, zend_mysqlnd_globals, mysqlnd_globals) PHP_INI_END() /* }}} */ -- 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_2/ext/standard/tests/mail/mail_basic2.phpt branches/PHP_5_2/ext/standard/tests/mail/mail_variation2.phpt branches/PHP_5_3/ext/standard/tests/mail/mail_basic
dmitry Tue, 22 Sep 2009 14:52:47 + Revision: http://svn.php.net/viewvc?view=revisionrevision=288578 Log: Fixed tests which fail from time to time because of race conditions (echo command didn't wait for all the data php tried to send and as result php got a SIGPIPE) Changed paths: U php/php-src/branches/PHP_5_2/ext/standard/tests/mail/mail_basic2.phpt U php/php-src/branches/PHP_5_2/ext/standard/tests/mail/mail_variation2.phpt U php/php-src/branches/PHP_5_3/ext/standard/tests/mail/mail_basic2.phpt U php/php-src/branches/PHP_5_3/ext/standard/tests/mail/mail_variation2.phpt U php/php-src/trunk/ext/standard/tests/mail/mail_basic2.phpt U php/php-src/trunk/ext/standard/tests/mail/mail_variation2.phpt Modified: php/php-src/branches/PHP_5_2/ext/standard/tests/mail/mail_basic2.phpt === --- php/php-src/branches/PHP_5_2/ext/standard/tests/mail/mail_basic2.phpt 2009-09-22 14:52:32 UTC (rev 288577) +++ php/php-src/branches/PHP_5_2/ext/standard/tests/mail/mail_basic2.phpt 2009-09-22 14:52:47 UTC (rev 288578) @@ -6,7 +6,7 @@ die(skip Won't run on Windows); ? --INI-- -sendmail_path=echo --- /tmp/php_test_mailBasic2.out +sendmail_path=sed /tmp/php_test_mailBasic2.out --FILE-- ?php /* Prototype : int mail(string to, string subject, string message [, string additional_headers [, string additional_parameters]]) @@ -23,7 +23,7 @@ $subject = 'Test Subject'; $message = 'A Message'; $additional_headers = 'KHeaders'; -$additional_parameters = Extras; +$additional_parameters = -e '5 a--- Extras'; $outFile = /tmp/php_test_mailBasic2.out; @unlink($outFile); @@ -31,11 +31,6 @@ // Calling mail() with all possible arguments var_dump( mail($to, $subject, $message, $additional_headers, $additional_parameters) ); -//This test is just using a shell command (see the INI setting). The sleep() -//is used because that can take a while. If you see the test failing sometimes try -//increasing the length of the sleep. - -sleep(5); echo file_get_contents($outFile); unlink($outFile); ? @@ -44,5 +39,10 @@ *** Testing mail() : basic functionality *** -- extra parameters -- bool(true) +To: u...@company.com +Subject: Test Subject +KHeaders + +A Message --- Extras ===DONE=== Modified: php/php-src/branches/PHP_5_2/ext/standard/tests/mail/mail_variation2.phpt === --- php/php-src/branches/PHP_5_2/ext/standard/tests/mail/mail_variation2.phpt 2009-09-22 14:52:32 UTC (rev 288577) +++ php/php-src/branches/PHP_5_2/ext/standard/tests/mail/mail_variation2.phpt 2009-09-22 14:52:47 UTC (rev 288578) @@ -1,8 +1,8 @@ --TEST-- Test mail() function : variation force extra parameters --INI-- -sendmail_path=echo --- /tmp/php_test_mailVariation2.out -mail.force_extra_parameters=forced params +sendmail_path=sed /tmp/php_test_mailVariation2.out +mail.force_extra_parameters=-e4a---forced-params --SKIPIF-- ?php if(substr(PHP_OS, 0, 3) == WIN) @@ -35,5 +35,9 @@ --EXPECT-- *** Testing mail() : basic functionality *** bool(true) forced params +To: u...@company.com +Subject: Test Subject + +A Message +---forced-params ===DONE=== Modified: php/php-src/branches/PHP_5_3/ext/standard/tests/mail/mail_basic2.phpt === --- php/php-src/branches/PHP_5_3/ext/standard/tests/mail/mail_basic2.phpt 2009-09-22 14:52:32 UTC (rev 288577) +++ php/php-src/branches/PHP_5_3/ext/standard/tests/mail/mail_basic2.phpt 2009-09-22 14:52:47 UTC (rev 288578) @@ -6,7 +6,7 @@ die(skip Won't run on Windows); ? --INI-- -sendmail_path=echo --- /tmp/php_test_mailBasic2.out +sendmail_path=sed /tmp/php_test_mailBasic2.out --FILE-- ?php /* Prototype : int mail(string to, string subject, string message [, string additional_headers [, string additional_parameters]]) @@ -23,7 +23,7 @@ $subject = 'Test Subject'; $message = 'A Message'; $additional_headers = 'KHeaders'; -$additional_parameters = Extras; +$additional_parameters = -e '5 a--- Extras'; $outFile = /tmp/php_test_mailBasic2.out; @unlink($outFile); @@ -31,11 +31,6 @@ // Calling mail() with all possible arguments var_dump( mail($to, $subject, $message, $additional_headers, $additional_parameters) ); -//This test is just using a shell command (see the INI setting). The sleep() -//is used because that can take a while. If you see the test failing sometimes try -//increasing the length of the sleep. - -sleep(5); echo file_get_contents($outFile); unlink($outFile); ? @@ -44,5 +39,10 @@ *** Testing mail() : basic functionality *** -- extra parameters -- bool(true) +To: u...@company.com +Subject: Test Subject +KHeaders + +A Message --- Extras ===DONE=== Modified: php/php-src/branches/PHP_5_3/ext/standard/tests/mail/mail_variation2.phpt
[PHP-CVS] svn: /php/php-src/trunk/ext/mysqli/ mysqli.c
andrey Tue, 22 Sep 2009 15:07:39 + Revision: http://svn.php.net/viewvc?view=revisionrevision=288579 Log: Fix handling of BIT fields for non-PS. We need macros from mysqlnd to be able to convert a bit stream to a number. BIT is binary data thus the result is a string, and not unicode Changed paths: U php/php-src/trunk/ext/mysqli/mysqli.c Modified: php/php-src/trunk/ext/mysqli/mysqli.c === --- php/php-src/trunk/ext/mysqli/mysqli.c 2009-09-22 14:52:47 UTC (rev 288578) +++ php/php-src/trunk/ext/mysqli/mysqli.c 2009-09-22 15:07:39 UTC (rev 288579) @@ -32,6 +32,7 @@ #include ext/standard/php_string.h #include php_mysqli_structs.h #include zend_exceptions.h +#include ext/mysqlnd/mysqlnd_portability.h ZEND_DECLARE_MODULE_GLOBALS(mysqli) static PHP_GINIT_FUNCTION(mysqli); @@ -1218,14 +1219,40 @@ zval *res; MAKE_STD_ZVAL(res); - if (!IS_BINARY_DATA(fields[i])) { - UChar *ustr; - int ulen; - zend_string_to_unicode(UG(utf8_conv), ustr, ulen, row[i], field_len[i] TSRMLS_CC); - ZVAL_UNICODEL(res, ustr, ulen, 0); - } else { - ZVAL_STRINGL(res, row[i], field_len[i], 1); +#if MYSQL_VERSION_ID 50002 + if (mysql_fetch_field_direct(result, i)-type == MYSQL_TYPE_BIT) { + my_ulonglong llval; + char tmp[22]; + switch (field_len[i]) { + case 8:llval = (my_ulonglong) bit_uint8korr(row[i]);break; + case 7:llval = (my_ulonglong) bit_uint7korr(row[i]);break; + case 6:llval = (my_ulonglong) bit_uint6korr(row[i]);break; + case 5:llval = (my_ulonglong) bit_uint5korr(row[i]);break; + case 4:llval = (my_ulonglong) bit_uint4korr(row[i]);break; + case 3:llval = (my_ulonglong) bit_uint3korr(row[i]);break; + case 2:llval = (my_ulonglong) bit_uint2korr(row[i]);break; + case 1:llval = (my_ulonglong) uint1korr(row[i]);break; + } + /* even though lval is declared as unsigned, the value +* may be negative. Therefor we cannot use MYSQLI_LLU_SPEC and must +* use MYSQLI_LL_SPEC. +*/ + snprintf(tmp, sizeof(tmp), (mysql_fetch_field_direct(result, i)-flags UNSIGNED_FLAG)? MYSQLI_LLU_SPEC : MYSQLI_LL_SPEC, llval); + /* numbers are latin1 and thus utf8, so no need to convert them with zend_string_to_unicode */ + ZVAL_STRING(res, tmp, 1); + } else +#endif + { + if (!IS_BINARY_DATA(fields[i])) { + UChar *ustr; + int ulen; + + zend_string_to_unicode(UG(utf8_conv), ustr, ulen, row[i], field_len[i] TSRMLS_CC); + ZVAL_UNICODEL(res, ustr, ulen, 0); + } else { + ZVAL_STRINGL(res, row[i], field_len[i], 1); + } } if (fetchtype MYSQLI_NUM) { -- 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/ mysqli.c
andrey Tue, 22 Sep 2009 15:08:11 + Revision: http://svn.php.net/viewvc?view=revisionrevision=288580 Log: MFH:Fix handling of BIT fields for non-PS. We need macros from mysqlnd to be able to convert a bit stream to a number. Changed paths: U php/php-src/branches/PHP_5_3/ext/mysqli/mysqli.c Modified: php/php-src/branches/PHP_5_3/ext/mysqli/mysqli.c === --- php/php-src/branches/PHP_5_3/ext/mysqli/mysqli.c2009-09-22 15:07:39 UTC (rev 288579) +++ php/php-src/branches/PHP_5_3/ext/mysqli/mysqli.c2009-09-22 15:08:11 UTC (rev 288580) @@ -32,6 +32,7 @@ #include ext/standard/php_string.h #include php_mysqli_structs.h #include zend_exceptions.h +#include ext/mysqlnd/mysqlnd_portability.h ZEND_DECLARE_MODULE_GLOBALS(mysqli) static PHP_GINIT_FUNCTION(mysqli); @@ -1201,12 +1202,37 @@ MAKE_STD_ZVAL(res); - /* check if we need magic quotes */ - if (PG(magic_quotes_runtime)) { - Z_TYPE_P(res) = IS_STRING; - Z_STRVAL_P(res) = php_addslashes(row[i], field_len[i], Z_STRLEN_P(res), 0 TSRMLS_CC); - } else { - ZVAL_STRINGL(res, row[i], field_len[i], 1); +#if MYSQL_VERSION_ID 50002 + if (mysql_fetch_field_direct(result, i)-type == MYSQL_TYPE_BIT) { + my_ulonglong llval; + char tmp[22]; + switch (field_len[i]) { + case 8:llval = (my_ulonglong) bit_uint8korr(row[i]);break; + case 7:llval = (my_ulonglong) bit_uint7korr(row[i]);break; + case 6:llval = (my_ulonglong) bit_uint6korr(row[i]);break; + case 5:llval = (my_ulonglong) bit_uint5korr(row[i]);break; + case 4:llval = (my_ulonglong) bit_uint4korr(row[i]);break; + case 3:llval = (my_ulonglong) bit_uint3korr(row[i]);break; + case 2:llval = (my_ulonglong) bit_uint2korr(row[i]);break; + case 1:llval = (my_ulonglong) uint1korr(row[i]);break; + } + /* even though lval is declared as unsigned, the value +* may be negative. Therefor we cannot use MYSQLI_LLU_SPEC and must +* use MYSQLI_LL_SPEC. +*/ + snprintf(tmp, sizeof(tmp), (mysql_fetch_field_direct(result, i)-flags UNSIGNED_FLAG)? MYSQLI_LLU_SPEC : MYSQLI_LL_SPEC, llval); + ZVAL_STRING(res, tmp, 1); + } else +#endif + { + + /* check if we need magic quotes */ + if (PG(magic_quotes_runtime)) { + Z_TYPE_P(res) = IS_STRING; + Z_STRVAL_P(res) = php_addslashes(row[i], field_len[i], Z_STRLEN_P(res), 0 TSRMLS_CC); + } else { + ZVAL_STRINGL(res, row[i], field_len[i], 1); + } } if (fetchtype MYSQLI_NUM) { -- 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/pdo_mysql/mysql_driver.c branches/PHP_5_3/ext/pdo_mysql/pdo_mysql.c branches/PHP_5_3/ext/pdo_mysql/php_pdo_mysql_int.h branches/PHP_5_3/ext/pdo_mysql/
uw Tue, 22 Sep 2009 15:31:35 + Revision: http://svn.php.net/viewvc?view=revisionrevision=288583 Log: mysqlnd supports INIT_COMMAND and so we can add it to PDO_MYSQL @ mysqlnd Changed paths: U php/php-src/branches/PHP_5_3/ext/pdo_mysql/mysql_driver.c U php/php-src/branches/PHP_5_3/ext/pdo_mysql/pdo_mysql.c U php/php-src/branches/PHP_5_3/ext/pdo_mysql/php_pdo_mysql_int.h U php/php-src/branches/PHP_5_3/ext/pdo_mysql/tests/pdo_mysql_attr_init_command.phpt U php/php-src/trunk/ext/pdo_mysql/mysql_driver.c U php/php-src/trunk/ext/pdo_mysql/pdo_mysql.c U php/php-src/trunk/ext/pdo_mysql/php_pdo_mysql_int.h U php/php-src/trunk/ext/pdo_mysql/tests/pdo_mysql_attr_init_command.phpt Modified: php/php-src/branches/PHP_5_3/ext/pdo_mysql/mysql_driver.c === --- php/php-src/branches/PHP_5_3/ext/pdo_mysql/mysql_driver.c 2009-09-22 15:16:42 UTC (rev 288582) +++ php/php-src/branches/PHP_5_3/ext/pdo_mysql/mysql_driver.c 2009-09-22 15:31:35 UTC (rev 288583) @@ -620,8 +620,9 @@ if (driver_options) { long connect_timeout = pdo_attr_lval(driver_options, PDO_ATTR_TIMEOUT, 30 TSRMLS_CC); long local_infile = pdo_attr_lval(driver_options, PDO_MYSQL_ATTR_LOCAL_INFILE, 0 TSRMLS_CC); + char *init_cmd = NULL; #ifndef PDO_USE_MYSQLND - char *init_cmd = NULL, *default_file = NULL, *default_group = NULL; + char *default_file = NULL, *default_group = NULL; long compress = 0; #endif H-buffered = pdo_attr_lval(driver_options, PDO_MYSQL_ATTR_USE_BUFFERED_QUERY, 1 TSRMLS_CC); @@ -670,7 +671,6 @@ mysql_options(H-server, MYSQL_OPT_RECONNECT, (const char*)reconnect); } #endif -#ifndef PDO_USE_MYSQLND init_cmd = pdo_attr_strval(driver_options, PDO_MYSQL_ATTR_INIT_COMMAND, NULL TSRMLS_CC); if (init_cmd) { if (mysql_options(H-server, MYSQL_INIT_COMMAND, (const char *)init_cmd)) { @@ -680,7 +680,7 @@ } efree(init_cmd); } - +#ifndef PDO_USE_MYSQLND default_file = pdo_attr_strval(driver_options, PDO_MYSQL_ATTR_READ_DEFAULT_FILE, NULL TSRMLS_CC); if (default_file) { if (mysql_options(H-server, MYSQL_READ_DEFAULT_FILE, (const char *)default_file)) { Modified: php/php-src/branches/PHP_5_3/ext/pdo_mysql/pdo_mysql.c === --- php/php-src/branches/PHP_5_3/ext/pdo_mysql/pdo_mysql.c 2009-09-22 15:16:42 UTC (rev 288582) +++ php/php-src/branches/PHP_5_3/ext/pdo_mysql/pdo_mysql.c 2009-09-22 15:31:35 UTC (rev 288583) @@ -75,9 +75,9 @@ REGISTER_PDO_CLASS_CONST_LONG(MYSQL_ATTR_USE_BUFFERED_QUERY, (long)PDO_MYSQL_ATTR_USE_BUFFERED_QUERY); REGISTER_PDO_CLASS_CONST_LONG(MYSQL_ATTR_LOCAL_INFILE, (long)PDO_MYSQL_ATTR_LOCAL_INFILE); + REGISTER_PDO_CLASS_CONST_LONG(MYSQL_ATTR_INIT_COMMAND, (long)PDO_MYSQL_ATTR_INIT_COMMAND); #ifndef PDO_USE_MYSQLND REGISTER_PDO_CLASS_CONST_LONG(MYSQL_ATTR_MAX_BUFFER_SIZE, (long)PDO_MYSQL_ATTR_MAX_BUFFER_SIZE); - REGISTER_PDO_CLASS_CONST_LONG(MYSQL_ATTR_INIT_COMMAND, (long)PDO_MYSQL_ATTR_INIT_COMMAND); REGISTER_PDO_CLASS_CONST_LONG(MYSQL_ATTR_READ_DEFAULT_FILE, (long)PDO_MYSQL_ATTR_READ_DEFAULT_FILE); REGISTER_PDO_CLASS_CONST_LONG(MYSQL_ATTR_READ_DEFAULT_GROUP, (long)PDO_MYSQL_ATTR_READ_DEFAULT_GROUP); REGISTER_PDO_CLASS_CONST_LONG(MYSQL_ATTR_COMPRESS, (long)PDO_MYSQL_ATTR_COMPRESS); Modified: php/php-src/branches/PHP_5_3/ext/pdo_mysql/php_pdo_mysql_int.h === --- php/php-src/branches/PHP_5_3/ext/pdo_mysql/php_pdo_mysql_int.h 2009-09-22 15:16:42 UTC (rev 288582) +++ php/php-src/branches/PHP_5_3/ext/pdo_mysql/php_pdo_mysql_int.h 2009-09-22 15:31:35 UTC (rev 288583) @@ -153,8 +153,8 @@ enum { PDO_MYSQL_ATTR_USE_BUFFERED_QUERY = PDO_ATTR_DRIVER_SPECIFIC, PDO_MYSQL_ATTR_LOCAL_INFILE, + PDO_MYSQL_ATTR_INIT_COMMAND, #ifndef PDO_USE_MYSQLND - PDO_MYSQL_ATTR_INIT_COMMAND, PDO_MYSQL_ATTR_READ_DEFAULT_FILE, PDO_MYSQL_ATTR_READ_DEFAULT_GROUP, PDO_MYSQL_ATTR_MAX_BUFFER_SIZE, Modified: php/php-src/branches/PHP_5_3/ext/pdo_mysql/tests/pdo_mysql_attr_init_command.phpt === --- php/php-src/branches/PHP_5_3/ext/pdo_mysql/tests/pdo_mysql_attr_init_command.phpt 2009-09-22 15:16:42 UTC (rev 288582) +++ php/php-src/branches/PHP_5_3/ext/pdo_mysql/tests/pdo_mysql_attr_init_command.phpt 2009-09-22 15:31:35 UTC (rev 288583) @@ -6,8 +6,6 @@ require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); $db = MySQLPDOTest::factory(); -if (MySQLPDOTest::isPDOMySQLnd()) - die(skip PDO::MYSQL_ATTR_MAX_INIT_COMMAND not supported with mysqlnd); ? --INI-- error_reporting=E_ALL @@ -27,7 +25,8 @@ var_dump($create); $db = new PDO($dsn, $user, $pass, array(PDO::MYSQL_ATTR_INIT_COMMAND = $create)); - var_dump($db-errorInfo()); + $info = $db-errorInfo(); + var_dump($info[0]); $db-exec(sprintf('INSERT INTO
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/NEWS branches/PHP_5_2/ext/imap/php_imap.c branches/PHP_5_3/NEWS branches/PHP_5_3/ext/imap/php_imap.c trunk/ext/imap/php_imap.c
felipe Tue, 22 Sep 2009 18:18:57 + Revision: http://svn.php.net/viewvc?view=revisionrevision=288585 Log: - Fixed bug #49630 (imap_listscan function missing) # Missing PHP_FE(), though nowdays it is used through of two aliases. (imap_scan() and imap_scanmailbox()) Bug: http://bugs.php.net/49630 (Open) imap_listscan function missing Changed paths: U php/php-src/branches/PHP_5_2/NEWS U php/php-src/branches/PHP_5_2/ext/imap/php_imap.c U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/imap/php_imap.c U php/php-src/trunk/ext/imap/php_imap.c Modified: php/php-src/branches/PHP_5_2/NEWS === --- php/php-src/branches/PHP_5_2/NEWS 2009-09-22 18:04:06 UTC (rev 288584) +++ php/php-src/branches/PHP_5_2/NEWS 2009-09-22 18:18:57 UTC (rev 288585) @@ -1,6 +1,7 @@ PHPNEWS ||| ?? ??? , PHP 5.2.12 +- Fixed bug #49630 (imap_listscan function missing). (Felipe) - Fixed bug #49578 (make install-pear fails). (Hannes) 17 Sep 2009, PHP 5.2.11 Modified: php/php-src/branches/PHP_5_2/ext/imap/php_imap.c === --- php/php-src/branches/PHP_5_2/ext/imap/php_imap.c2009-09-22 18:04:06 UTC (rev 288584) +++ php/php-src/branches/PHP_5_2/ext/imap/php_imap.c2009-09-22 18:18:57 UTC (rev 288585) @@ -115,6 +115,7 @@ PHP_FE(imap_delete, NULL) PHP_FE(imap_undelete, NULL) PHP_FE(imap_check, NULL) + PHP_FE(imap_listscan, NULL) PHP_FE(imap_mail_copy, NULL) PHP_FE(imap_mail_move, NULL) PHP_FE(imap_mail_compose, NULL) Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2009-09-22 18:04:06 UTC (rev 288584) +++ php/php-src/branches/PHP_5_3/NEWS 2009-09-22 18:18:57 UTC (rev 288585) @@ -5,6 +5,8 @@ through the Reflection API. (Sebastian) - Implemented FR #49253 (added support for libcurl's CERTINFO option). (Linus Nielsen Feltzing li...@haxx.se) + +- Fixed bug #49630 (imap_listscan function missing). (Felipe) ?? ??? 2009, PHP 5.3.1RC? - WHY IS THIS HERE? Gonna be released after 5.3.1 or what?? Modified: php/php-src/branches/PHP_5_3/ext/imap/php_imap.c === --- php/php-src/branches/PHP_5_3/ext/imap/php_imap.c2009-09-22 18:04:06 UTC (rev 288584) +++ php/php-src/branches/PHP_5_3/ext/imap/php_imap.c2009-09-22 18:18:57 UTC (rev 288585) @@ -487,6 +487,7 @@ PHP_FE(imap_delete, arginfo_imap_delete) PHP_FE(imap_undelete, arginfo_imap_undelete) PHP_FE(imap_check, arginfo_imap_check) + PHP_FE(imap_listscan, arginfo_imap_listscan) PHP_FE(imap_mail_copy, arginfo_imap_mail_copy) PHP_FE(imap_mail_move, arginfo_imap_mail_move) PHP_FE(imap_mail_compose, arginfo_imap_mail_compose) Modified: php/php-src/trunk/ext/imap/php_imap.c === --- php/php-src/trunk/ext/imap/php_imap.c 2009-09-22 18:04:06 UTC (rev 288584) +++ php/php-src/trunk/ext/imap/php_imap.c 2009-09-22 18:18:57 UTC (rev 288585) @@ -487,6 +487,7 @@ PHP_FE(imap_delete, arginfo_imap_delete) PHP_FE(imap_undelete, arginfo_imap_undelete) PHP_FE(imap_check, arginfo_imap_check) + PHP_FE(imap_listscan, arginfo_imap_listscan) PHP_FE(imap_mail_copy, arginfo_imap_mail_copy) PHP_FE(imap_mail_move, arginfo_imap_mail_move) PHP_FE(imap_mail_compose, arginfo_imap_mail_compose) -- PHP CVS Mailing List (http://www.php.net/) To
Re: [PHP-CVS] svn: /php/php-src/trunk/ext/mysqli/ mysqli.c
Could you please commit to all branches in single commit and avoid the (now) unnecessary MFH commits? (everyone else is doing that.. :) --Jani Andrey Hristov wrote: andrey Tue, 22 Sep 2009 15:07:39 + Revision: http://svn.php.net/viewvc?view=revisionrevision=288579 Log: Fix handling of BIT fields for non-PS. We need macros from mysqlnd to be able to convert a bit stream to a number. BIT is binary data thus the result is a string, and not unicode Changed paths: U php/php-src/trunk/ext/mysqli/mysqli.c Modified: php/php-src/trunk/ext/mysqli/mysqli.c === --- php/php-src/trunk/ext/mysqli/mysqli.c 2009-09-22 14:52:47 UTC (rev 288578) +++ php/php-src/trunk/ext/mysqli/mysqli.c 2009-09-22 15:07:39 UTC (rev 288579) @@ -32,6 +32,7 @@ #include ext/standard/php_string.h #include php_mysqli_structs.h #include zend_exceptions.h +#include ext/mysqlnd/mysqlnd_portability.h ZEND_DECLARE_MODULE_GLOBALS(mysqli) static PHP_GINIT_FUNCTION(mysqli); @@ -1218,14 +1219,40 @@ zval *res; MAKE_STD_ZVAL(res); - if (!IS_BINARY_DATA(fields[i])) { - UChar *ustr; - int ulen; - zend_string_to_unicode(UG(utf8_conv), ustr, ulen, row[i], field_len[i] TSRMLS_CC); - ZVAL_UNICODEL(res, ustr, ulen, 0); - } else { - ZVAL_STRINGL(res, row[i], field_len[i], 1); +#if MYSQL_VERSION_ID 50002 + if (mysql_fetch_field_direct(result, i)-type == MYSQL_TYPE_BIT) { + my_ulonglong llval; + char tmp[22]; + switch (field_len[i]) { + case 8:llval = (my_ulonglong) bit_uint8korr(row[i]);break; + case 7:llval = (my_ulonglong) bit_uint7korr(row[i]);break; + case 6:llval = (my_ulonglong) bit_uint6korr(row[i]);break; + case 5:llval = (my_ulonglong) bit_uint5korr(row[i]);break; + case 4:llval = (my_ulonglong) bit_uint4korr(row[i]);break; + case 3:llval = (my_ulonglong) bit_uint3korr(row[i]);break; + case 2:llval = (my_ulonglong) bit_uint2korr(row[i]);break; + case 1:llval = (my_ulonglong) uint1korr(row[i]);break; + } + /* even though lval is declared as unsigned, the value +* may be negative. Therefor we cannot use MYSQLI_LLU_SPEC and must +* use MYSQLI_LL_SPEC. +*/ + snprintf(tmp, sizeof(tmp), (mysql_fetch_field_direct(result, i)-flags UNSIGNED_FLAG)? MYSQLI_LLU_SPEC : MYSQLI_LL_SPEC, llval); + /* numbers are latin1 and thus utf8, so no need to convert them with zend_string_to_unicode */ + ZVAL_STRING(res, tmp, 1); + } else +#endif + { + if (!IS_BINARY_DATA(fields[i])) { + UChar *ustr; + int ulen; + + zend_string_to_unicode(UG(utf8_conv), ustr, ulen, row[i], field_len[i] TSRMLS_CC); + ZVAL_UNICODEL(res, ustr, ulen, 0); + } else { + ZVAL_STRINGL(res, row[i], field_len[i], 1); + } } if (fetchtype MYSQLI_NUM) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/trunk/ext/mysqli/ mysqli.c
Jani Taskinen wrote: Could you please commit to all branches in single commit and avoid the (now) unnecessary MFH commits? (everyone else is doing that.. :) --Jani I don't have a terabyte hard disk, and the time, to clone 5 times the repository with all pendants. Just two branches are enough for me. What kind of problems does separate commits create? :) And I am sick of 3-4 levels deep hierarchies. Andrey Andrey Hristov wrote: andrey Tue, 22 Sep 2009 15:07:39 + Revision: http://svn.php.net/viewvc?view=revisionrevision=288579 Log: Fix handling of BIT fields for non-PS. We need macros from mysqlnd to be able to convert a bit stream to a number. BIT is binary data thus the result is a string, and not unicode Changed paths: U php/php-src/trunk/ext/mysqli/mysqli.c Modified: php/php-src/trunk/ext/mysqli/mysqli.c === --- php/php-src/trunk/ext/mysqli/mysqli.c2009-09-22 14:52:47 UTC (rev 288578) +++ php/php-src/trunk/ext/mysqli/mysqli.c2009-09-22 15:07:39 UTC (rev 288579) @@ -32,6 +32,7 @@ #include ext/standard/php_string.h #include php_mysqli_structs.h #include zend_exceptions.h +#include ext/mysqlnd/mysqlnd_portability.h ZEND_DECLARE_MODULE_GLOBALS(mysqli) static PHP_GINIT_FUNCTION(mysqli); @@ -1218,14 +1219,40 @@ zval *res; MAKE_STD_ZVAL(res); -if (!IS_BINARY_DATA(fields[i])) { -UChar *ustr; -int ulen; -zend_string_to_unicode(UG(utf8_conv), ustr, ulen, row[i], field_len[i] TSRMLS_CC); -ZVAL_UNICODEL(res, ustr, ulen, 0); -} else { -ZVAL_STRINGL(res, row[i], field_len[i], 1); +#if MYSQL_VERSION_ID 50002 +if (mysql_fetch_field_direct(result, i)-type == MYSQL_TYPE_BIT) { +my_ulonglong llval; +char tmp[22]; +switch (field_len[i]) { +case 8:llval = (my_ulonglong) bit_uint8korr(row[i]);break; +case 7:llval = (my_ulonglong) bit_uint7korr(row[i]);break; +case 6:llval = (my_ulonglong) bit_uint6korr(row[i]);break; +case 5:llval = (my_ulonglong) bit_uint5korr(row[i]);break; +case 4:llval = (my_ulonglong) bit_uint4korr(row[i]);break; +case 3:llval = (my_ulonglong) bit_uint3korr(row[i]);break; +case 2:llval = (my_ulonglong) bit_uint2korr(row[i]);break; +case 1:llval = (my_ulonglong) uint1korr(row[i]);break; +} +/* even though lval is declared as unsigned, the value + * may be negative. Therefor we cannot use MYSQLI_LLU_SPEC and must + * use MYSQLI_LL_SPEC. + */ +snprintf(tmp, sizeof(tmp), (mysql_fetch_field_direct(result, i)-flags UNSIGNED_FLAG)? MYSQLI_LLU_SPEC : MYSQLI_LL_SPEC, llval); +/* numbers are latin1 and thus utf8, so no need to convert them with zend_string_to_unicode */ +ZVAL_STRING(res, tmp, 1); +} else +#endif +{ +if (!IS_BINARY_DATA(fields[i])) { +UChar *ustr; +int ulen; + +zend_string_to_unicode(UG(utf8_conv), ustr, ulen, row[i], field_len[i] TSRMLS_CC); +ZVAL_UNICODEL(res, ustr, ulen, 0); +} else { +ZVAL_STRINGL(res, row[i], field_len[i], 1); +} } if (fetchtype MYSQLI_NUM) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/trunk/ext/mysqli/ mysqli.c
Andrey Hristov wrote: Jani Taskinen wrote: Could you please commit to all branches in single commit and avoid the (now) unnecessary MFH commits? (everyone else is doing that.. :) --Jani I don't have a terabyte hard disk, and the time, to clone 5 times the repository with all pendants. Just two branches are enough for me. What kind of problems does separate commits create? :) And I am sick of 3-4 levels deep hierarchies. You don't need to. Just check out the branches you want. See the Sparse Directory Checkout Instructions instructions I posted to internals and added to the wiki at http://wiki.php.net/vcs/svnfaq Disk space is a terrible excuse, especially since it takes absolutely no more disk space to have a proper sparse checkout. And if you are sick of the deep directory structure, just symlink it appropriately. Another terrible excuse. And the reasons for doing it should be obvious. All these MFH commits are completely untrackable. There is no way to relate them back to the original commit message, and they are also much harder to deal with when it comes to reversing a change. Hunting around looking for the commits in all the branches as opposed to having a single change in a single commit. -Rasmus -- 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/curl/interface.c trunk/ext/curl/interface.c
iliaaWed, 23 Sep 2009 00:18:32 + Revision: http://svn.php.net/viewvc?view=revisionrevision=288597 Log: Fixed compiler warning Changed paths: U php/php-src/branches/PHP_5_3/ext/curl/interface.c U php/php-src/trunk/ext/curl/interface.c Modified: php/php-src/branches/PHP_5_3/ext/curl/interface.c === --- php/php-src/branches/PHP_5_3/ext/curl/interface.c 2009-09-22 23:44:57 UTC (rev 288596) +++ php/php-src/branches/PHP_5_3/ext/curl/interface.c 2009-09-23 00:18:32 UTC (rev 288597) @@ -2191,7 +2191,7 @@ char *s_code; longl_code; double d_code; -#if LIBCURL_VERSION_NUM 0x071202 +#if LIBCURL_VERSION_NUM 0x071301 struct curl_certinfo *ci = NULL; zval *listcode; #endif Modified: php/php-src/trunk/ext/curl/interface.c === --- php/php-src/trunk/ext/curl/interface.c 2009-09-22 23:44:57 UTC (rev 288596) +++ php/php-src/trunk/ext/curl/interface.c 2009-09-23 00:18:32 UTC (rev 288597) @@ -2257,7 +2257,7 @@ char *s_code; longl_code; double d_code; -#if LIBCURL_VERSION_NUM 0x071202 +#if LIBCURL_VERSION_NUM 0x071301 struct curl_certinfo *ci = NULL; zval *listcode; #endif -- 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_2/NEWS branches/PHP_5_2/ext/curl/interface.c branches/PHP_5_3/NEWS branches/PHP_5_3/ext/curl/interface.c trunk/ext/curl/interface.c
felipe Wed, 23 Sep 2009 02:08:19 + Revision: http://svn.php.net/viewvc?view=revisionrevision=288598 Log: - Fixed bug #49531 (CURLOPT_INFILESIZE sometimes causes warning CURLPROTO_FILE cannot be set ...) Bug: http://bugs.php.net/49531 (Open) CURLOPT_INFILESIZE sometimes causes warning CURLPROTO_FILE cannot be set Changed paths: U php/php-src/branches/PHP_5_2/NEWS U php/php-src/branches/PHP_5_2/ext/curl/interface.c U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/curl/interface.c U php/php-src/trunk/ext/curl/interface.c Modified: php/php-src/branches/PHP_5_2/NEWS === --- php/php-src/branches/PHP_5_2/NEWS 2009-09-23 00:18:32 UTC (rev 288597) +++ php/php-src/branches/PHP_5_2/NEWS 2009-09-23 02:08:19 UTC (rev 288598) @@ -3,6 +3,8 @@ ?? ??? , PHP 5.2.12 - Fixed bug #49630 (imap_listscan function missing). (Felipe) - Fixed bug #49578 (make install-pear fails). (Hannes) +- Fixed bug #49531 (CURLOPT_INFILESIZE sometimes causes warning CURLPROTO_FILE + cannot be set). (Felipe) 17 Sep 2009, PHP 5.2.11 - Fixed certificate validation inside php_openssl_apply_verification_policy. Modified: php/php-src/branches/PHP_5_2/ext/curl/interface.c === --- php/php-src/branches/PHP_5_2/ext/curl/interface.c 2009-09-23 00:18:32 UTC (rev 288597) +++ php/php-src/branches/PHP_5_2/ext/curl/interface.c 2009-09-23 02:08:19 UTC (rev 288598) @@ -1361,7 +1361,8 @@ #endif convert_to_long_ex(zvalue); #if LIBCURL_VERSION_NUM = 0x71304 - if (((PG(open_basedir) *PG(open_basedir)) || PG(safe_mode)) (Z_LVAL_PP(zvalue) CURLPROTO_FILE)) { + if ((option == CURLOPT_PROTOCOLS || option == CURLOPT_REDIR_PROTOCOLS) + ((PG(open_basedir) *PG(open_basedir)) || PG(safe_mode)) (Z_LVAL_PP(zvalue) CURLPROTO_FILE)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, CURLPROTO_FILE cannot be activated when in safe_mode or an open_basedir is set); RETVAL_FALSE; return 1; Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2009-09-23 00:18:32 UTC (rev 288597) +++ php/php-src/branches/PHP_5_3/NEWS 2009-09-23 02:08:19 UTC (rev 288598) @@ -7,6 +7,8 @@ (Linus Nielsen Feltzing li...@haxx.se) - Fixed bug #49630 (imap_listscan function missing). (Felipe) +- Fixed bug #49531 (CURLOPT_INFILESIZE sometimes causes warning CURLPROTO_FILE + cannot be set). (Felipe) ?? ??? 2009, PHP 5.3.1RC? - WHY IS THIS HERE? Gonna be released after 5.3.1 or what?? Modified: php/php-src/branches/PHP_5_3/ext/curl/interface.c === --- php/php-src/branches/PHP_5_3/ext/curl/interface.c 2009-09-23 00:18:32 UTC (rev 288597) +++ php/php-src/branches/PHP_5_3/ext/curl/interface.c 2009-09-23 02:08:19 UTC (rev 288598) @@ -1649,7 +1649,8 @@ #endif convert_to_long_ex(zvalue); #if LIBCURL_VERSION_NUM = 0x71304 - if (((PG(open_basedir) *PG(open_basedir)) || PG(safe_mode)) (Z_LVAL_PP(zvalue) CURLPROTO_FILE)) { + if ((option == CURLOPT_PROTOCOLS || option == CURLOPT_REDIR_PROTOCOLS) + ((PG(open_basedir) *PG(open_basedir)) || PG(safe_mode)) (Z_LVAL_PP(zvalue) CURLPROTO_FILE)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, CURLPROTO_FILE cannot be activated when in safe_mode or an open_basedir is set); RETVAL_FALSE; return 1; Modified: php/php-src/trunk/ext/curl/interface.c === --- php/php-src/trunk/ext/curl/interface.c 2009-09-23 00:18:32 UTC (rev 288597) +++ php/php-src/trunk/ext/curl/interface.c 2009-09-23 02:08:19 UTC (rev 288598) @@ -1665,7 +1665,8 @@ #endif convert_to_long_ex(zvalue); #if LIBCURL_VERSION_NUM = 0x71304 - if ((PG(open_basedir) *PG(open_basedir)) (Z_LVAL_PP(zvalue) CURLPROTO_FILE)) { + if ((option == CURLOPT_PROTOCOLS || option == CURLOPT_REDIR_PROTOCOLS) + (PG(open_basedir) *PG(open_basedir)) (Z_LVAL_PP(zvalue) CURLPROTO_FILE)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, CURLPROTO_FILE cannot be activated when open_basedir is set); RETVAL_FALSE; return 1; -- PHP CVS Mailing List (http://www.php.net/) To