Icon View Incident Report

Serious Serious
Reported By: Jose Eduardo Helminsky
Reported On: 10/3/2013
For: Version 4.36 Build 3
# 3907 CAST Function Not Working Properly with 64-bit DBISAM Database Server

I am migrating to 4.36 build 3 and after some tests I realize it has a bug. The SQL statement, when it runs without C/S, the results are ok, (the column V1 is equal V2) but when it runs in C/S mode the results were wrong. Note: I know the v1 is a string field and v2 is an integer field

After investigating the case, I narrow down the situation to cast on cast in the "v2" column. And the interesting thing is that problem only happens in some records (the results are ok after v1 is greather than 99).

select usi, mes, qui, ano, tot, 
       cast(mes as char(2)) as _mes, 
       cast(qui as char(1)) as _qui, 
       cast(mes as char(2))+cast(qui as char(1)) as v1,
       cast(cast(mes as char(2))+cast(qui as char(1)) as integer) as v2 
from hcqui
inner join hcfpu on(hcfpu.ano=2012 and hcqui.key=hcfpu.key and
coalesce(hcfpu.ftc,0) > 0)
where tip='Normal' and reg='Calculado'



Comments Comments
The issue was with some questionable string memory fills that worked for terminating strings on 32-bit when they shouldn't have.


Resolution Resolution
Fixed Problem on 10/11/2013 in version 4.37 build 1


Products Affected Products Affected
DBISAM Additional Software and Utilities
DBISAM CLX Client-Server
DBISAM CLX Client-Server with Source
DBISAM CLX Standard
DBISAM CLX Standard with Source
DBISAM ODBC Client-Server
DBISAM ODBC Client-Server with Source
DBISAM ODBC Standard
DBISAM ODBC Standard with Source
DBISAM ODBC Trial
DBISAM VCL Client-Server
DBISAM VCL Client-Server with Source
DBISAM VCL Standard
DBISAM VCL Standard with Source
DBISAM VCL Trial

Image