简体   繁体   English

eclipse dtp mysql分隔符语句损坏。

[英]eclipse dtp mysql delimiter statement broken.

all. 所有。 I'm trying to use the eclipse dtp to work on a mySQL DB. 我正在尝试使用Eclipse DTP在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; 您的SQL语法有误; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DELIMITER // 查看与您的MySQL服务器版本相对应的手册,以获取在'DELIMITER //附近使用的正确语法

create function checkTypedness(nom varchar(255)) returns int ' at line 1 创建函数checkTypedness(nom varchar(255))在第1行返回int'

Elapsed Time: 0 hr, 0 min, 0 sec, 0 ms. 经过的时间:0小时,0分钟,0秒,0毫秒。

I was really hoping to not have to use phpmyadmin to build the database... Cheers, Charles. 我真的希望不必使用phpmyadmin来建立数据库...干杯,查尔斯。

I have the same problem. 我也有同样的问题。 It seems that there is no solution, because: 似乎没有解决办法,因为:

  1. Eclipse dtp doesn't recognize "delimiter" statements. Eclipse dtp无法识别“定界符”语句。 (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. 您可以在“ SQL编辑器”的首选项中设置定界符字符串,但这仅对“执行当前文本”命令有效。
  3. Eclipse always recognize "go" as a delimiter, but still it breaks statements at semicolons. Eclipse始终将“ go”视为分隔符,但仍会中断分号的语句。

I think it's a bug. 我认为这是一个错误。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM