Bug 136833 - Not all strings can be delimiter for stored procedures
Not all strings can be delimiter for stored procedures
Status: RESOLVED FIXED
Product: db
Classification: Unclassified
Component: SQL Editor
6.x
All All
: P3 (vote)
: 6.x
Assigned To: Jiri Skrivanek
issues@db
:
: 149609 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-06-09 15:44 UTC by Roman Mostyka
Modified: 2009-09-11 21:39 UTC (History)
0 users

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Roman Mostyka 2008-06-09 15:44:43 UTC
1. Connect to DB and open Query Editor.
2. Write following code:
"
delimiter //
create procedure test()
begin
select * from PERSON;
end//
delimiter ;
"
3. Execute statement.

Result: Following message appears in Output window:
"Error code 1064, SQL state 42000: 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' at line 4
Line 2, column 1

Execution finished after 0 s, 1 error(s) occurred."

If delimiter is changed from '//' to for example '\\' everything works fine. So not all strings can be delimiter.
Why this issue is P2. Because string "delimiter //" I found in MySQL stored procedures tutorial.
Comment 1 David Vancouvering 2008-06-09 18:04:19 UTC
Sorry, the workaround is simple - don't use this delimiter, there are many other choices. I don't believe this is a P2.
Comment 2 Andrei Badea 2008-08-04 14:43:48 UTC
Not exactly trivial to fix: the code which checks for the delimiter doesn't get to process all characters. For example
'/' is processed separately, because it also has other meanings (beginning of a block comment).
Comment 3 Roman Mostyka 2008-10-09 12:17:11 UTC
*** Issue 149609 has been marked as a duplicate of this issue. ***
Comment 4 Jiri Rechtacek 2009-02-10 15:14:36 UTC
Reassigned to new owner.
Comment 5 Jiri Skrivanek 2009-09-07 13:13:23 UTC
Fixed.
core-main #1c56dd8a7a80
Comment 6 Quality Engineering 2009-09-11 21:39:05 UTC
Integrated into 'main-golden', will be available in build *200909111401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/1c56dd8a7a80
User: Jiri Skrivanek <jskrivanek@netbeans.org>
Log: #136833 - Support double-slash delimiter.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo