Also, sometimes when using SUM() or COUNT(*) MySQL auto-creates a field that's
larger than INT(11), so it would be nice to have the following options:
Code: Select all
1. Options.OptimizedBigInt (convert ftLargeInt <= 11 to ftInteger)
2. Options.OptimizedBigIntEx (convert ALL ftLargeInt to ftInteger)
and maybe even
3. Options.IgnoreOptimizationOverflow default TRUE (to stay compatible)
false : a conversion exception is raised if value is out of bounds
true : overflow is ignored
Code: Select all
1. Drop a TMyConnection and a TMyQuery on a form
set option TOptimizedBigint to TRUE
2. Set TMyQuery.SQL to:
DROP TABLE IF EXISTS TEST.DABIGINT;
CREATE TABLE TEST.DABIGINT (
AUTO_INC_INT INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
NORMAL_INT INT(11),
UNSIGNED_INT INT(10) UNSIGNED,
PRIMARY KEY (AUTO_INC_INT)
) ENGINE=MyISAM;
INSERT INTO TEST.DABIGINT (AUTO_INC_INT,NORMAL_INT,UNSIGNED_INT) VALUES (0,0,0);
SELECT * FROM TEST.DABIGINT;
3. Execute the query and examine the returned datatypes:
MyQuery1.fieldbyname('NORMAL_INT').DataType = ftInteger as expected
MyQuery1.fieldbyname('AUTO_INC_INT').DataType = ftLargeInt NOT expexted
MyQuery1.fieldbyname('UNSIGNED_INT').DataType = ftLargeInt NOT expected
MyDAC v5.90.0.57 for Delphi 5 (Trial Edition)
Delphi v5.0 (build 6.18 ) update pack 1
MySQL server version: 5.1.46-community
MySQL client version: Direct
Thanks.