Page 1 of 1

Error with MySQL 4.0.18

Posted: Mon 16 Apr 2007 19:46
by patyi
Hi,

I have some projects running on MySQL 4.0.18 and 4.0.24, and the following query produce an error : In func IsBreacketPresent delimited value not allowed (d:\project\delphi\mydac\source\myclasses.pas, line 947)

SELECT F.orgdok, F.orgdat, F.partner, F.gyarto,
F.lezarva, N.dokument, N.sorszam, N.bemegrsz,
N.bemegrd, N.cikksz, N.lebont
FROM munkafej F, munkalap N
WHERE F.dokument = N.dokument AND
N.bemegrsz = "20/0256-001"
GROUP BY F.orgdok
ORDER BY N.dokument

The prablem is "/" character in comparation string in WHERE ... N.bemegrsz = "20/0256-001" !
This error occures only with MyDAC 5, I have to return back to the MyDAC 4.0.24 to solve this problem. My projects is ported 100% to MyDAC 5 and whenewer I have to chage something in this project I have to deinstall MyDAC 5, install MyDAC 4 after finishing, again deninstall MyDAC 4 and install MyDAC 5 and so on ...

The interesting is theath with MySQL 5.0.037 and MyDAC 5 this error is
not present !!?? Everithing is seams to be OK !

I plane to upgrade thise databases to MySQL 5 buth I can't for a while
for several reasons, so pleas chech it and if posible correct it in next build.

Thanks for Your time.

Posted: Tue 17 Apr 2007 13:50
by Jackson
Is the problem that you get assertion failure in MyClasses.pas at line 947 when trying to execute such query?
Please specify SQL script for creating your database objects.

Error with MySQL 4.0.18 and MyDAC 5.0.00.5

Posted: Wed 18 Apr 2007 19:41
by patyi
Hi,

Here is a sample data dump and project sample to reproduce an error :

/*
SQLyog Community Edition- MySQL GUI v5.28
Host - 4.0.18-nt : Database - mydactest
*********************************************************************
Server version : 4.0.18-nt
*/


create database if not exists `mydactest`;

USE `mydactest`;

/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;

/*Table structure for table `table1` */

CREATE TABLE `table1` (
`dok` int(10) NOT NULL default '0',
`aktiv` int(10) NOT NULL default '0',
`orgdok` varchar(10) NOT NULL default '?',
PRIMARY KEY (`dok`)
) TYPE=MyISAM;

/*Table structure for table `table2` */

CREATE TABLE `table2` (
`dok` int(10) NOT NULL default '0',
`sor` int(10) NOT NULL auto_increment,
`igeny` decimal(13,2) NOT NULL default '0.00',
`kiadva` decimal(13,2) NOT NULL default '0.00',
PRIMARY KEY (`dok`,`sor`)
) TYPE=MyISAM;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;

procedure TForm1.FormShow(Sender: TObject);
begin
with MyQuery1 do begin
Close;
SQL.Clear;
SQL.Add('SELECT SUM(T2.igeny-T2.kiadva), T1.aktiv '+
'FROM table1 T1, table2 T2 '+
'WHERE T1.orgdok = "20/01607" AND '+
'T1.dok = T2.dok '+
'GROUP BY T1.orgdok');
Open;
end;
end;

When Open the query both design or run time the fallowing error message is given : In func IsBreacketPresent delimited value not allowed (d:\project\delphi\mydac\source\myclasses.pas, line 947)

The error occures only on MySQL 4.0.18 and MyDAC 5 !
With MySQL 5.0.37 and MyDAC 5 is no error !!!

Sory I forgat data ...

Posted: Wed 18 Apr 2007 19:45
by patyi
I made dump without data, sory, here is the data :

/*Data for the table `table1` */

insert into `table1`(`dok`,`aktiv`,`orgdok`) values (1,1,'20/01607');

/*Data for the table `table2` */

insert into `table2`(`dok`,`sor`,`igeny`,`kiadva`) values (1,1,10.00,5.00);
insert into `table2`(`dok`,`sor`,`igeny`,`kiadva`) values (1,2,5.00,1.00);
insert into `table2`(`dok`,`sor`,`igeny`,`kiadva`) values (1,3,2.00,2.00);

Posted: Thu 19 Apr 2007 07:01
by Jackson
Thank you for information.
We have reproduced the problem and fixed it.
This fix will be included in the next build of MyDAC 5.
Please watch for announcements at the forum.