From d602767ec5f24c94a213ba13e753878abaece76a Mon Sep 17 00:00:00 2001 From: Felipe Pena Date: Fri, 3 Apr 2009 22:14:05 +0000 Subject: [PATCH] - Backported fix for #35386 (originally commited in 5.3+), reported recently as 5.2 bug #47845 --- NEWS | 1 + ext/pdo_firebird/firebird_statement.c | 7 ++----- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/NEWS b/NEWS index 088f46d604..0237749890 100644 --- a/NEWS +++ b/NEWS @@ -7,6 +7,7 @@ PHP NEWS - Fixed memory corruptions while reading properties of zip files. (Ilia) - Fixed memory leak in ob_get_clean/ob_get_flush. (Christian) +- Fixed bug #47845 (PDO_Firebird omits first row from query). (Lars W) - Fixed bug #47831 (Compile warning for strnlen() in main/spprintf.c). (Ilia, rainer dot jung at kippdata dot de) - Fixed bug #47828 (openssl_x509_parse() segfaults when a UTF-8 conversion diff --git a/ext/pdo_firebird/firebird_statement.c b/ext/pdo_firebird/firebird_statement.c index 76972731e3..240c5d9a50 100644 --- a/ext/pdo_firebird/firebird_statement.c +++ b/ext/pdo_firebird/firebird_statement.c @@ -170,6 +170,7 @@ static int firebird_stmt_describe(pdo_stmt_t *stmt, int colno TSRMLS_DC) /* {{{ col->maxlen = var->sqllen; col->namelen = var->aliasname_length; col->name = estrndup(var->aliasname,var->aliasname_length); + col->param_type = PDO_PARAM_STR; return 1; } @@ -301,11 +302,7 @@ static int firebird_stmt_get_col(pdo_stmt_t *stmt, int colno, char **ptr, /* {{ /* A NULL value */ *ptr = NULL; *len = 0; - } else { - /* override the column param type */ - /* set_param_type(&stmt->columns[colno].param_type,var); */ - stmt->columns[colno].param_type = PDO_PARAM_STR; - + } else { if (var->sqlscale < 0) { static ISC_INT64 const scales[] = { 1, 10, 100, 1000, 10000, 100000, 1000000, 100000000, 1000000000, 1000000000, LL_LIT(10000000000),LL_LIT(100000000000), -- 2.50.1