AutoPrepare bug

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
swierzbicki
Posts: 451
Joined: Wed 19 Jan 2005 09:59

AutoPrepare bug

Post by swierzbicki » Thu 27 Sep 2007 17:44

Hi,

When setting AutoPrepare to true, retreived fields are no more from the same type.

Exemple

Code: Select all

SELECT 
myTable.*,
CASE WHEN myTable.ItemKind in ('CARS') THEN ifnull(myTable.Quantity,0) ELse 0 End As NumberOfCars,
CASE WHEN myTable.ItemKind in ('BIKES') THEN ifnull(myTable.Quantity,0) ELse 0 End As NumberOfBikes
From MyTable

Quantity is an integer type
Set MyQuery AutoPrepare option to true.
Retrieve your persistent fields.
NumberOfCars and NumberOfBikes are retreived as LargeInt

Set MyQuery AutoPrepare option to false.
Retrieve your persistent fields.
NumberOfCars and NumberOfBikes are retreived as Integer


Is this a MySQL Bug ? Is this a MyDAC Bug ?... Should I disable the AutoPrepare function ?

FWIW I'm running Win32 MySQL server v5.0.37-community-nt
I'm using the 5.10.0.10 MyDac version
I'm developping under Delphi 2007 update 3

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Fri 28 Sep 2007 11:38

It is likely that this is an issue of MySQL, but I cannot assert it as I could not reproduce the problem. Could you send me a complete small sample at mydac*crlab*com to reproduce it? Include the script to create and fill myTable.

Post Reply