Problems with MyScript

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
lucasbarao
Posts: 6
Joined: Thu 20 Dec 2012 18:58

Problems with MyScript

Post by lucasbarao » Fri 01 Mar 2013 14:37

Hi,

During the execution of the MyScript.ExecuteFromFile, I'm having problems when the script file has triggers and procedures creation statements.

I am using MySQL server 5.5.6rc for 64bit, MyDAC 7.1 and Delphi 2010.

It seems that the ExecuteFromFile is ignoring the DELIMITER statement in my script and it gives me an error during the execution of the script.

Here is the script file: https://dl.dropbox.com/u/19709075/script.sql
Here is the error message: https://dl.dropbox.com/u/19709075/mysqlerror.sql

The error only occurs during the execution in MyScript component. If I take this script and execute it in HeidiSQL program for example, all run OK without errors.

What can I do do fix this?

Thanks

DemetrionQ
Devart Team
Posts: 271
Joined: Wed 23 Jan 2013 11:21

Re: Problems with MyScript

Post by DemetrionQ » Mon 04 Mar 2013 12:52

Hello.

Bug with executing a SQL script that contains a DELIMITER keyword was fixed in MyDAC 7.2.7. Please download the MyDAC version 7.2.7 or higher and check whether the error repeats.

andrea.m86
Posts: 25
Joined: Thu 26 May 2011 10:36

Re: Problems with MyScript

Post by andrea.m86 » Mon 04 Mar 2013 14:20

hi,
i have the version 7.6 of the components and i also have a problem with tmyscript.
if i use '^' as delimiter i get this error from myclasses:
exception message : #42000You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '^' at line 1.
if i use (for example) '#' everything works.

here is the code to reproduce the issue:

Code: Select all

  d := '^';
  script.delimiter := d;
  script.sql.text := 'create procedure test() begin select * from art; end' + d;
  script.execute;

DemetrionQ
Devart Team
Posts: 271
Joined: Wed 23 Jan 2013 11:21

Re: Problems with MyScript

Post by DemetrionQ » Thu 07 Mar 2013 16:06

Hello.

We have reproduced the problem and been investigating it.
Presently, for TMyScript.Delimiter you can use only ";" or "/" symbols. If delimiter = "/" , then, when writing SQL scripts, the "/" delimiter must be a single character in a line.

Post Reply