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
commit2ab9513ff452f7e11bfa97875017141b5134f9cf (patch)
treec13c7dddce3631900a3820f2979e8ef8b3a752a6 /ext/mysqlnd/mysqlnd_ps_codec.c
parent2721bbfcf9937248e6f113549dc394f377d5f41c (diff)
downloadphp-git-2ab9513ff452f7e11bfa97875017141b5134f9cf.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;