summaryrefslogtreecommitdiff
path: root/ext/mysqlnd/mysqlnd_ps_codec.c
diff options
context:
space:
mode:
authorAndrey Hristov <andrey@php.net>2010-08-30 18:10:23 +0000
committerAndrey Hristov <andrey@php.net>2010-08-30 18:10:23 +0000
commit72bef3491864b657dab8cf21585d4c977de428a9 (patch)
tree4863fb8e44586bb1005f762b8dd0c84f3d509789 /ext/mysqlnd/mysqlnd_ps_codec.c
parentc55632007e746fbdf7ff948aac64bb92eec1031a (diff)
downloadphp-git-72bef3491864b657dab8cf21585d4c977de428a9.tar.gz
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.
Diffstat (limited to 'ext/mysqlnd/mysqlnd_ps_codec.c')
-rw-r--r--ext/mysqlnd/mysqlnd_ps_codec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/mysqlnd/mysqlnd_ps_codec.c b/ext/mysqlnd/mysqlnd_ps_codec.c
index a0e6c0050e..dd6f7a620c 100644
--- a/ext/mysqlnd/mysqlnd_ps_codec.c
+++ b/ext/mysqlnd/mysqlnd_ps_codec.c
@@ -493,7 +493,7 @@ void _mysqlnd_init_ps_fetch_subsystem()
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;