[PHP-CVS] com php-src: add new charset, from MySQL 5.6: ext/mysqlnd/mysqlnd_charset.c
Commit:f45a85c3861325c0ec5f5f5f7af01e4de1545189 Author:Andrey Hristov and...@php.net Fri, 1 Feb 2013 17:21:50 +0100 Parents: 9d75bf35e96bfc5c8d629ecef6807a90b4c98be7 Branches: PHP-5.4 PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=f45a85c3861325c0ec5f5f5f7af01e4de1545189 Log: add new charset, from MySQL 5.6 Changed paths: M ext/mysqlnd/mysqlnd_charset.c Diff: diff --git a/ext/mysqlnd/mysqlnd_charset.c b/ext/mysqlnd/mysqlnd_charset.c index a36bb11..8766a4b 100644 --- a/ext/mysqlnd/mysqlnd_charset.c +++ b/ext/mysqlnd/mysqlnd_charset.c @@ -504,12 +504,14 @@ const MYSQLND_CHARSET mysqlnd_charsets[] = { 53, macroman, macroman_bin, 1, 1, , NULL, NULL}, { 54, utf16, utf16_general_ci, 2, 4, UTF-16 Unicode, mysqlnd_mbcharlen_utf16, check_mb_utf16}, { 55, utf16, utf16_bin, 2, 4, UTF-16 Unicode, mysqlnd_mbcharlen_utf16, check_mb_utf16}, + { 56, utf16le, utf16le_general_ci, 2, 4, UTF-16LE Unicode, mysqlnd_mbcharlen_utf16, check_mb_utf16}, { 58, cp1257, cp1257_bin, 1, 1, , NULL, NULL}, #ifdef USED_TO_BE_SO_BEFORE_MYSQL_5_5 { 60, armascii8, armascii8_bin, 1, 1, , NULL, NULL}, #endif /*55*/{ 60, utf32, utf32_general_ci, 4, 4, UTF-32 Unicode, mysqlnd_mbcharlen_utf32, check_mb_utf32}, /*55*/{ 61, utf32, utf32_bin, 4, 4, UTF-32 Unicode, mysqlnd_mbcharlen_utf32, check_mb_utf32}, + { 62, utf16le, utf16le_bin, 2, 4, UTF-16LE Unicode, mysqlnd_mbcharlen_utf16, check_mb_utf16}, { 65, ascii, ascii_bin, 1, 1, , NULL, NULL}, { 66, cp1250, cp1250_bin, 1, 1, , NULL, NULL}, { 67, cp1256, cp1256_bin, 1, 1, , NULL, NULL}, @@ -669,14 +671,15 @@ PHPAPI const MYSQLND_CHARSET * mysqlnd_find_charset_nr(unsigned int charsetnr) /* {{{ mysqlnd_find_charset_name */ PHPAPI const MYSQLND_CHARSET * mysqlnd_find_charset_name(const char * const name) { - const MYSQLND_CHARSET * c = mysqlnd_charsets; - - do { - if (!strcasecmp(c-name, name)) { - return c; - } - ++c; - } while (c[0].nr != 0); + if (name) { + const MYSQLND_CHARSET * c = mysqlnd_charsets; + do { + if (!strcasecmp(c-name, name)) { + return c; + } + ++c; + } while (c[0].nr != 0); + } return NULL; } /* }}} */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Merge branch 'PHP-5.4' into PHP-5.5: ext/mysqlnd/mysqlnd.c
Commit:c311884e5b7534f1a55c5bf95edb2add3bd04d0b Author:Andrey Hristov and...@php.net Mon, 4 Feb 2013 14:28:23 +0100 Parents: cb8b2dd2e0257f13eedb0bf6ea07944dd71679ad 740b823be80a29e4c6537d4053eb7bad0fae6c41 Branches: PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=c311884e5b7534f1a55c5bf95edb2add3bd04d0b Log: Merge branch 'PHP-5.4' into PHP-5.5 Changed paths: MM ext/mysqlnd/mysqlnd.c Diff: -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: check the validity of the parameter: ext/mysqlnd/mysqlnd.c
Commit:740b823be80a29e4c6537d4053eb7bad0fae6c41 Author:Andrey Hristov and...@php.net Mon, 4 Feb 2013 14:27:56 +0100 Parents: 643ce95b5bd80e744c7f5e6ac33138f40ed9a1f7 Branches: PHP-5.4 PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=740b823be80a29e4c6537d4053eb7bad0fae6c41 Log: check the validity of the parameter Changed paths: M ext/mysqlnd/mysqlnd.c Diff: diff --git a/ext/mysqlnd/mysqlnd.c b/ext/mysqlnd/mysqlnd.c index 0b81ac9..90c2b73 100644 --- a/ext/mysqlnd/mysqlnd.c +++ b/ext/mysqlnd/mysqlnd.c @@ -2321,7 +2321,14 @@ MYSQLND_METHOD(mysqlnd_conn_data, set_client_option)(MYSQLND_CONN_DATA * const c break; case MYSQL_SET_CHARSET_NAME: { - char * new_charset_name = mnd_pestrdup(value, conn-persistent); + char * new_charset_name; + if (!mysqlnd_find_charset_name(value)) { + SET_CLIENT_ERROR(*conn-error_info, CR_CANT_FIND_CHARSET, UNKNOWN_SQLSTATE, Unknown character set); + ret = FAIL; + break; + } + + new_charset_name = mnd_pestrdup(value, conn-persistent); if (!new_charset_name) { goto oom; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: NEWS: NEWS
Commit:6585a7bd7904fac22640eb38a7eab53fe8efc19a Author:Remi Collet r...@php.net Mon, 4 Feb 2013 15:27:43 +0100 Parents: 79956330fe17cfd5f60de456497541b21a89bddf Branches: PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=6585a7bd7904fac22640eb38a7eab53fe8efc19a Log: NEWS Changed paths: M NEWS Diff: diff --git a/NEWS b/NEWS index c343f43..cb1ec95 100644 --- a/NEWS +++ b/NEWS @@ -8,6 +8,7 @@ PHP NEWS . Implemented FR #60524 (specify temp dir by php.ini). (ALeX Kazik). . Fixed bug #63830 (Segfault on undefined function call in nested generator). (Nikita Popov) + . Fixed bug #64142 (dval to lval different behavior on ppc64). (Remi) - CLI server: . Fixed bug #64128 (buit-in web server is broken on ppc64). (Remi) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Fixed bug #64142 (dval to lval different behavior on ppc64): NEWS Zend/zend_operators.h
Commit:6533094d9e4d0c85044a170d9fad9a3986a68675 Author:Remi Collet r...@php.net Mon, 4 Feb 2013 15:19:32 +0100 Parents: 740b823be80a29e4c6537d4053eb7bad0fae6c41 Branches: PHP-5.4 PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=6533094d9e4d0c85044a170d9fad9a3986a68675 Log: Fixed bug #64142 (dval to lval different behavior on ppc64) On x86_64: (long)(double)9223372036854775807+1 = -9223372036854775808 On ppc64 (long)(double)9223372036854775807-1 = 9223372036854775807 Bugs: https://bugs.php.net/64142 Changed paths: M NEWS M Zend/zend_operators.h Diff: diff --git a/NEWS b/NEWS index 2aff180..0649d9d 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,9 @@ PHP NEWS - CLI server: . Fixed bug #64128 (buit-in web server is broken on ppc64). (Remi) +- Core: + . Fixed bug #64142 (dval to lval different behavior on ppc64). (Remi) + ?? ??? 2012, PHP 5.4.12 - Core: diff --git a/Zend/zend_operators.h b/Zend/zend_operators.h index 02a96dd..93b904f 100644 --- a/Zend/zend_operators.h +++ b/Zend/zend_operators.h @@ -79,7 +79,7 @@ static zend_always_inline long zend_dval_to_lval(double d) #else static zend_always_inline long zend_dval_to_lval(double d) { - if (d LONG_MAX) { + if (d = LONG_MAX) { return (long)(unsigned long) d; } return (long) d; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Merge branch 'PHP-5.4' into PHP-5.5: Zend/zend_operators.h
Commit:79956330fe17cfd5f60de456497541b21a89bddf Author:Remi Collet r...@php.net Mon, 4 Feb 2013 15:27:07 +0100 Parents: c311884e5b7534f1a55c5bf95edb2add3bd04d0b 6533094d9e4d0c85044a170d9fad9a3986a68675 Branches: PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=79956330fe17cfd5f60de456497541b21a89bddf Log: Merge branch 'PHP-5.4' into PHP-5.5 * PHP-5.4: Fixed bug #64142 (dval to lval different behavior on ppc64) Bugs: https://bugs.php.net/64142 Changed paths: MM Zend/zend_operators.h Diff: -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] com php-src: Fixed bug #64142 (dval to lval different behavior on ppc64): NEWS Zend/zend_operators.h
On 02/04/2013 06:19 AM, Remi Collet wrote: Commit:6533094d9e4d0c85044a170d9fad9a3986a68675 Author:Remi Collet r...@php.net Mon, 4 Feb 2013 15:19:32 +0100 Parents: 740b823be80a29e4c6537d4053eb7bad0fae6c41 Branches: PHP-5.4 PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=6533094d9e4d0c85044a170d9fad9a3986a68675 Maybe add a test case for this one? -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] com php-src: Fixed bug #64142 (dval to lval different behavior on ppc64): NEWS Zend/zend_operators.h
Hi! - if (d LONG_MAX) { + if (d = LONG_MAX) { return (long)(unsigned long) d; } return (long) d; Could you please explain this one? I thought LONG_MAX is a largest permissible long value, why when d==LONG_MAX we need to convert? Also, why this patch - which seems to be a BC break since it exhibits different behavior on 64-bit systems - needs to be in 5.4? -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php