eclipse dtp mysql delimiter statement broken.

498 Views Asked by At

all. I'm trying to use the eclipse dtp to work on a mySQL DB. Here's the code that's giving an issue:

drop function if exists checkTypedness;

DELIMITER //

create function checkTypedness(nom varchar(255)) 
returns int
reads sql data
    begin
    declare hits int;
    set hits = 0;
    [.....]
end 
//

gives:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DELIMITER //

create function checkTypedness(nom varchar(255)) returns int ' at line 1

Elapsed Time: 0 hr, 0 min, 0 sec, 0 ms.

I was really hoping to not have to use phpmyadmin to build the database... Cheers, Charles.

1

There are 1 best solutions below

0
On

I have the same problem. It seems that there is no solution, because:

  1. Eclipse dtp doesn't recognize "delimiter" statements. (it's a command interpreted by the client not by the server)
  2. you can set a delimiter string in the preferences for "sql editor", but that is valid only for the "execute current text" command.
  3. Eclipse always recognize "go" as a delimiter, but still it breaks statements at semicolons.

I think it's a bug.