SHOW FULL COLUMNS on MySQL 8 returns 'blob' for 'Type' and 'Default'

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
upscene
Posts: 306
Joined: Thu 19 Oct 2006 08:13

SHOW FULL COLUMNS on MySQL 8 returns 'blob' for 'Type' and 'Default'

Post by upscene » Mon 29 Oct 2018 14:50

Hi there,

Is there any reason why the latest version of MyDAC returns BLOBs for the columns 'type' and 'default' if I issue a SHOW FULL COLUMNS-statement?

These used to be returned as (var)char.

With regards,

Martijn Tonies

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: SHOW FULL COLUMNS on MySQL 8 returns 'blob' for 'Type' and 'Default'

Post by ViktorV » Fri 02 Nov 2018 14:15

This behavior is correct. The fields are created based on the information sent by the MySQL server and if the server returns a BINARY flag for a field of the MYSQL_TYPE_BLOB type, a field of the ftBLOB type will be created. For TYPE and DEFAULT fields, the MySQl 8 server will return a BINARY flag and MYSQL_TYPE_BLOB field.
You can use Data Type Mapping for the needed columns. For example:

Code: Select all

MyQuery.DataTypeMap.AddFieldNameRule('Type', ftString);
MyQuery.DataTypeMap.AddFieldNameRule('Default', ftString);

upscene
Posts: 306
Joined: Thu 19 Oct 2006 08:13

Re: SHOW FULL COLUMNS on MySQL 8 returns 'blob' for 'Type' and 'Default'

Post by upscene » Mon 05 Nov 2018 08:19

For TYPE and DEFAULT fields, the MySQl 8 server will return a BINARY flag and MYSQL_TYPE_BLOB field
In MySQL Workbench, using a MySQL 8 database, 'type', 'default' and 'comment' is listed as TEXT, not as a binary BLOB, with charset utf8mb4.

In version 5.7, these are returned as TEXT, 'comment' is returned as VARCHAR, all with char set utf8.

How come you're returning it as a binary blob?

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: SHOW FULL COLUMNS on MySQL 8 returns 'blob' for 'Type' and 'Default'

Post by ViktorV » Wed 07 Nov 2018 09:15

Thank you for the information. We have reproduced the issue and it will be fixed in the next build.

upscene
Posts: 306
Joined: Thu 19 Oct 2006 08:13

Re: SHOW FULL COLUMNS on MySQL 8 returns 'blob' for 'Type' and 'Default'

Post by upscene » Wed 07 Nov 2018 10:04

Hello Viktor,

That's good to hear - looking forward to it.

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: SHOW FULL COLUMNS on MySQL 8 returns 'blob' for 'Type' and 'Default'

Post by ViktorV » Wed 07 Nov 2018 14:10

Thank you for the interest to our product.
Feel free to contact us if you have any further questions about our products.

Post Reply