Fixed handling of NUMERIC type, when it contains numbers that could

potentially exceed the interger limit.
This commit is contained in:
Ilia Alshanetsky 2003-01-11 23:06:35 +00:00
parent 7fa0970567
commit 48f2ad4703

View File

@ -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++;