Op zondag 25-05-2008 om 08:01 uur [tijdzone -0300], schreef Joao Morais:
Show quoted text 20 lines
Michael Van Canneyt wrote:
>
> On Sat, 24 May 2008, Joao Morais wrote:
>
>> The following patches fixes the lack of sqlscale var when writing decimal and
>> numeric fields to ib/fb databases. I've used the same approach used to read
>> such fields, ie, intpower.
>
> I looked at the patch. It looks good.
> I have applied the patch to trunk, and merged it to fixes branch.
Thanks.
One thing have concerned me about this patch. I don't use sqldb as the
majority (I only use the sql statement and params, open and close the
query and the transaction within the same milissecond), once this is a
very trivial bug (ie anyone storing a scalar integer field would see the
problem), this could have breaked something elsewhere (and if so, imho
this 'elsewhere' is what should be fixed). Lazarus and MSE teams can
confirm that everything is ok?
You could use the db-testsuite for this. In packages/fcl-db/tests there is a 'dbtestframework.pp' application. Compile it, copy Database.ini.txt to Database.ini and change this ini file so that it can connect to a test-database. (you have to set host, dbname, username and so on)
Then you can run it. Compare the results with and without your changes. This program is also runned every night, you can find the results here: http://www.freepascal.org/tests.cgi
For example:
http://www.freepascal.org/tests.cgi?action=1&failedonly=1&run1id=22485
And maybe you could add a test for your fix? That way it's also checked that it works for other connections, and we can't break it in the future.
Joost.