Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [dtp-dev] delimiter and stored procedures

Yep, I see the problem.

The generic parser cuts statements according to a specified delimiter (can be any character or a word), but I couldn’t allocate a scope mode which is required by your example to nest the “begin”/”end” tokens.

I suggest you open a bug against the data tools SQLTools sub-project, or maybe someone else have another idea?

 

Regards,

Roy

From: dtp-dev-bounces@xxxxxxxxxxx [mailto:dtp-dev-bounces@xxxxxxxxxxx] On Behalf Of Kirill Kranke
Sent: Wednesday, December 23, 2009 1:10 PM
To: DTP development mailing list
Subject: Re: [dtp-dev] delimiter and stored procedures

 

Hi Roy,

sure! The problem is that statements inside of stored procedure in MySQL should be delimited using ";". I do not know if I can change inner delimiter for MySQL. There is code:

DROP PROCEDURE IF EXISTS `ats`.`p_ins_rdata`;
CREATE DEFINER = 'ATS'@'%'
PROCEDURE ats.p_ins_rdata(
  IN  _symbol        varchar(16),
  IN _value INT
)
BEGIN
  DECLARE object_id int ;
 
  ... some more code ...
END ;

This code is executed as follows:
1. DROP PROCEDURE IF EXISTS `ats`.`p_ins_rdata`

2. CREATE DEFINER = 'ATS'@'%'
PROCEDURE ats.p_ins_rdata(
  IN  _symbol        varchar(16),
  IN _value INT
)
BEGIN
  DECLARE object_id int

3. ...

2-nd point giving an error, what is not surprising.

Best regards, Kirill

2009/12/23 Roy Ganor <roy@xxxxxxxx>

Hi Kirill,

MySql scrapbook uses the generic SQL parser, and the default delimiter is “;”.

Can you provide a sample of your script so it will be easier to pinpoint the problem?

 

Regards,

Roy

From: dtp-dev-bounces@xxxxxxxxxxx [mailto:dtp-dev-bounces@xxxxxxxxxxx] On Behalf Of Kirill Kranke
Sent: Wednesday, December 23, 2009 1:11 AM
To: dtp-dev@xxxxxxxxxxx
Subject: [dtp-dev] delimiter and stored procedures

 

Hi All,

I am new to Eclipse DTP. I am trying to make a simple MySQL 5.1 database using it and fail to create simple stored procedure.

The problem is that I cannot change default Delimiter. Does anyone know how and where I can change it?

Best regards, Kirill


_______________________________________________
dtp-dev mailing list
dtp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dtp-dev

 


Back to the top