diff options
author | Matheus Degiovani <matheus@gigatron.com.br> | 2013-03-22 10:39:36 -0300 |
---|---|---|
committer | Matteo Beccati <matteo@beccati.com> | 2013-05-31 14:30:57 +0200 |
commit | df6ca450ce1bebb7a36c0d2eecb51a28ac2f5118 (patch) | |
tree | cc0c6f4e397cd2b489239f643e966d8ce9fb9fb7 /ext/pdo_firebird/firebird_statement.c | |
parent | 65d233f06c6e274f9559880a7c187b35932b1918 (diff) | |
download | php-git-df6ca450ce1bebb7a36c0d2eecb51a28ac2f5118.tar.gz |
Fixed bug #62024 (unable to run consecutive prepared querys with null values)
Credits to james@kenjim.com for the patch.
Diffstat (limited to 'ext/pdo_firebird/firebird_statement.c')
-rw-r--r-- | ext/pdo_firebird/firebird_statement.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/pdo_firebird/firebird_statement.c b/ext/pdo_firebird/firebird_statement.c index ffe9b3cb63..e172133c88 100644 --- a/ext/pdo_firebird/firebird_statement.c +++ b/ext/pdo_firebird/firebird_statement.c @@ -535,12 +535,12 @@ static int firebird_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_dat int force_null; case IS_LONG: - var->sqltype = sizeof(long) == 8 ? SQL_INT64 : SQL_LONG; + var->sqltype = (sizeof(long) == 8 ? SQL_INT64 : SQL_LONG) + (var->sqltype & 1); var->sqldata = (void*)&Z_LVAL_P(param->parameter); var->sqllen = sizeof(long); break; case IS_DOUBLE: - var->sqltype = SQL_DOUBLE; + var->sqltype = SQL_DOUBLE + (var->sqltype & 1); var->sqldata = (void*)&Z_DVAL_P(param->parameter); var->sqllen = sizeof(double); break; @@ -560,7 +560,7 @@ static int firebird_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_dat force_null = (Z_STRLEN_P(param->parameter) == 0); } if (!force_null) { - var->sqltype = SQL_TEXT; + var->sqltype = SQL_TEXT + (var->sqltype & 1); var->sqldata = Z_STRVAL_P(param->parameter); var->sqllen = Z_STRLEN_P(param->parameter); break; |