andrey Mon, 30 Aug 2010 18:10:23 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=302901
Log: Fix for MySQL Bug #49406 Binding params doesn't work when selecting a date inside a CASE-WHEN (http://bugs.mysql.com/bug.php?id=49406) The MySQL server sends MYSQL_TYPE_NEWDATE values as clear text, even when PS are used and thus the binary protocol are used. Changing the handler for the type. Bug: http://bugs.php.net/49406 (Bogus) utf8_decode(): Include "caution" note that it destroys 99.9% of all characters Changed paths: U php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_ps_codec.c U php/php-src/trunk/ext/mysqlnd/mysqlnd_ps_codec.c Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_ps_codec.c =================================================================== --- php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_ps_codec.c 2010-08-30 17:08:34 UTC (rev 302900) +++ php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_ps_codec.c 2010-08-30 18:10:23 UTC (rev 302901) @@ -493,7 +493,7 @@ mysqlnd_ps_fetch_functions[MYSQL_TYPE_DATE].php_type = IS_STRING; mysqlnd_ps_fetch_functions[MYSQL_TYPE_DATE].can_ret_as_str_in_uni = TRUE; - mysqlnd_ps_fetch_functions[MYSQL_TYPE_NEWDATE].func = ps_fetch_date; + mysqlnd_ps_fetch_functions[MYSQL_TYPE_NEWDATE].func = ps_fetch_string; mysqlnd_ps_fetch_functions[MYSQL_TYPE_NEWDATE].pack_len = MYSQLND_PS_SKIP_RESULT_W_LEN; mysqlnd_ps_fetch_functions[MYSQL_TYPE_NEWDATE].php_type = IS_STRING; mysqlnd_ps_fetch_functions[MYSQL_TYPE_NEWDATE].can_ret_as_str_in_uni = TRUE; Modified: php/php-src/trunk/ext/mysqlnd/mysqlnd_ps_codec.c =================================================================== --- php/php-src/trunk/ext/mysqlnd/mysqlnd_ps_codec.c 2010-08-30 17:08:34 UTC (rev 302900) +++ php/php-src/trunk/ext/mysqlnd/mysqlnd_ps_codec.c 2010-08-30 18:10:23 UTC (rev 302901) @@ -493,7 +493,7 @@ mysqlnd_ps_fetch_functions[MYSQL_TYPE_DATE].php_type = IS_STRING; mysqlnd_ps_fetch_functions[MYSQL_TYPE_DATE].can_ret_as_str_in_uni = TRUE; - mysqlnd_ps_fetch_functions[MYSQL_TYPE_NEWDATE].func = ps_fetch_date; + mysqlnd_ps_fetch_functions[MYSQL_TYPE_NEWDATE].func = ps_fetch_string; mysqlnd_ps_fetch_functions[MYSQL_TYPE_NEWDATE].pack_len = MYSQLND_PS_SKIP_RESULT_W_LEN; mysqlnd_ps_fetch_functions[MYSQL_TYPE_NEWDATE].php_type = IS_STRING; mysqlnd_ps_fetch_functions[MYSQL_TYPE_NEWDATE].can_ret_as_str_in_uni = TRUE;
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php