Result Return Up To 8193 Characters Only When use MySQL Built In Function

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
chintatlim
Posts: 22
Joined: Tue 09 Nov 2004 00:31

Result Return Up To 8193 Characters Only When use MySQL Built In Function

Post by chintatlim » Tue 30 Aug 2005 08:05

If field value more than 8193 characters (Text field), when you use MYSQL built in function (Concat, Hex...) , result will be return up to 8193 characters only.

example:
Select TextField From TestData;

Select Concat(TextField, '--END--') From TestData;

Please fix it can return more than 8193 charaters when use MySQL built in function.

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Thu 01 Sep 2005 11:33

We reproduced your problem, this is MySQL server limitation. MyDAC can't change this behavior.

chintatlim
Posts: 22
Joined: Tue 09 Nov 2004 00:31

Why MySQL Command Line Client and MySQl Query Browser Can Return More Than 8193 Characters?

Post by chintatlim » Thu 01 Sep 2005 14:26

I already used MySQL Command Line Client and MySQl Query Browser to testing return result, two programs can be return more than 8193 chracters.

I think is client problem, not server.

GEswin
Posts: 186
Joined: Wed 03 Nov 2004 16:57
Location: Spain
Contact:

Post by GEswin » Fri 02 Sep 2005 08:53

mysql cmd line gives correct result. Problem is when you open a query with a text field using concat, it sets size of field to 8192, while other text fields size is 0. Even when you set it to 0, when opening query it goes back to 8192. As chintatlim states, i would say it's some problem with compos or delphi db.

Also under this query:

select *,concat(texto, '--END--') as texto2 from test_table

texto is a TMemoField and texto2 is a TStringField.

Remark: I just looked at db.pas from delphi7 , and there is this:

Code: Select all

  dsMaxStringSize = 8192; { Maximum string field size }
So problem is delphi.

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Fri 02 Sep 2005 14:48

MySQL Server describes this field as a string field rather than a text field.
You can avoid this problem by setting Options.LongStrings to False.

Post Reply