From 48f2ad4703b03cf8149702370485a74940f3da85 Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Sat, 11 Jan 2003 23:06:35 +0000 Subject: [PATCH] Fixed handling of NUMERIC type, when it contains numbers that could potentially exceed the interger limit. --- ext/sybase_ct/php_sybase_ct.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/sybase_ct/php_sybase_ct.c b/ext/sybase_ct/php_sybase_ct.c index 3fe65e9e627..a2b91a761d3 100644 --- a/ext/sybase_ct/php_sybase_ct.c +++ b/ext/sybase_ct/php_sybase_ct.c @@ -1168,7 +1168,7 @@ static sybase_result * php_sybase_fetch_result_set (sybase_link *sybase_ptr, int case CS_DECIMAL_TYPE: result->datafmt[i].maxlength = result->datafmt[i].precision + 3; /* numeric(10) vs numeric(10, 1) */ - result->numerics[i] = (result->datafmt[i].scale == 0) ? 1 : 2; + result->numerics[i] = (result->datafmt[i].scale == 0 && result->datafmt[i].precision <= 10) ? 1 : 2; break; default: result->datafmt[i].maxlength++;