MariaDB DefaultExpression

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
hh-cm
Posts: 6
Joined: Fri 23 Aug 2013 16:08

MariaDB DefaultExpression

Post by hh-cm » Fri 03 Nov 2017 05:27

Hello,

we are using Unidac for Delphi 10.2.
When we append a row in MariaDB > 10.2.6, the DefaultValues are broken. A empty string is written in quotes. A NULL value for a Integer-Field is written as String 'NULL'.
MariaDB < 10.2.7 it works fine.

I think we found the issue. The MariaDB Bug MDEV-13132.
Literals in the COLUMN_DEFAULT column in the Information Schema COLUMNS table are now quoted to distinguish them from expressions.
DefaultExpressionOldBehavior change nothing.

Is there any way to solve this issue? like a property or something?

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

Re: MariaDB DefaultExpression

Post by ViktorV » Fri 03 Nov 2017 12:12

Unfortunately, we cannot reproduce the issue.
In order to get a detailed answer, please compose a small sample demonstrating the issue and send it to us via form e-support: https://www.devart.com/company/contactform.html, including scripts for creating database objects.

hh-cm
Posts: 6
Joined: Fri 23 Aug 2013 16:08

Re: MariaDB DefaultExpression

Post by hh-cm » Fri 03 Nov 2017 13:00

Its too small for a example Project :)

UniConnection with MySQL Provider. UniQuery and following code

Code: Select all

UniConnection1.Server := 'localhost';
  UniConnection1.Database := 'test';
  UniConnection1.Port := 3309;
  UniConnection1.Username := 'root';
  UniConnection1.Password := '';
  UniConnection1.Connect;

  UniQuery1.Options.DefaultValues := true;
  UniQuery1.SQL.Text := 'SELECT * FROM testtable';
  UniQuery1.Open;
  UniQuery1.Append;
  // Exception
Create code for the table

Code: Select all

CREATE TABLE `testtable` (
	`column1` INT(11) NULL DEFAULT NULL,
	`column2` VARCHAR(50) NOT NULL DEFAULT ''
)
ENGINE=InnoDB
;
I send the example too.

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

Re: MariaDB DefaultExpression

Post by ViktorV » Fri 03 Nov 2017 15:18

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

redone
Posts: 6
Joined: Fri 18 Jan 2013 11:46

Re: MariaDB DefaultExpression

Post by redone » Mon 06 Nov 2017 08:05

Hello,

i have the same problem.
When will the update appear likely?

with best regards
Thoren

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

Re: MariaDB DefaultExpression

Post by ViktorV » Mon 06 Nov 2017 09:31

We plan to release a new build of MyDAC that includes the fix this month.

otomazeli
Posts: 10
Joined: Mon 22 Feb 2010 18:32

Re: MariaDB DefaultExpression

Post by otomazeli » Wed 22 Nov 2017 17:01

We have the same issue using UniDac in Delphi 10.1
Do you have a release date for this fix yet?
Thank you!

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

Re: MariaDB DefaultExpression

Post by ViktorV » Thu 23 Nov 2017 11:39

We are planning the next DAC build within 2 weeks.

otomazeli
Posts: 10
Joined: Mon 22 Feb 2010 18:32

Re: MariaDB DefaultExpression

Post by otomazeli » Tue 09 Jan 2018 13:43

Could you confirm that this issue was fixed and in which version?

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

Re: MariaDB DefaultExpression

Post by ViktorV » Tue 09 Jan 2018 14:24

The issue is fixed and this fix will be included in the next UniDAC build, which we are planning to release within a month.

hh-cm
Posts: 6
Joined: Fri 23 Aug 2013 16:08

Re: MariaDB DefaultExpression

Post by hh-cm » Wed 10 Jan 2018 07:49

06 Nov 2017
ViktorV wrote:We plan to release a new build of MyDAC that includes the fix this month.

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

Re: MariaDB DefaultExpression

Post by ViktorV » Fri 12 Jan 2018 13:06

Sorry for the delay on this. Unfortunately, the build release is postponed. It is planned for next week.

redone
Posts: 6
Joined: Fri 18 Jan 2013 11:46

Re: MariaDB DefaultExpression

Post by redone » Wed 25 Jul 2018 08:40

Hello,

tested with UniDAC 7.3.9 but the error with the empty string is still present or again.

Code: Select all

CREATE TABLE `testtable` (
	`column1` VARCHAR(50) NOT NULL DEFAULT ''
)
ENGINE=MyISAM;
The result of the query is a string with content ''
So a empty string is written in quotes. MariaDB < 10.2.7 it works fine.

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

Re: MariaDB DefaultExpression

Post by ViktorV » Wed 25 Jul 2018 12:35

Unfortunately, we could not reproduce the issue on the latest version of UniDAC 7.3.9.
In order for us to be able to give you a detailed answer, we need a sample demonstrating the behavior you mentioned. Therefore, please, compose a full sample demonstrating the described behavior and send it to us using the contact form https://devart.com/company/contactform.html including database objects creating scripts.
Please specify the value of the TUniConnection.ServerVersionFull property.

Post Reply