Page 1 of 1

SetSchemaInfo bug with column of type 'bit'

Posted: Wed 25 Apr 2012 13:38
by marciopontes
Hi, I have been using dbExpress driver for MySQL version 5.1.3 trial. It has been working fine so far, except for one bug:
If a table has a column of type 'bit', I can insert and update data normally, but if I try to use SetSchemaInfo in Delphi 7 to get information about the table's columns and their datatypes, like:

Code: Select all

procedure GetTableStructure(tableName: string);
var
  sqd: TSQLDataSet;
begin
  sqd := TSQLDataSet.Create;
  { set connection etc. }
  sqd.SetSchemaInfo(stColumns, tableName, '');
  sqd.Open;
  {...}
end;
Then if the table has one or more colums of type 'bit', the call to Open raises an exception:

Code: Select all

Assertion failure (D:\Projects\Delphi\Dbx\MySql\Source\dbxmda.pas, line 1542)
I worked around the bug for now by changing all my 'bit' columns to 'tinyint', but I would prefer not to do that, to use less space.

Posted: Thu 26 Apr 2012 09:12
by AlexP
Hello,

Thank you for the information, we have reproduced and fixed the problem.
This fix will be included in the next product version.