This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 136833

Summary: Not all strings can be delimiter for stored procedures
Product: db Reporter: Roman Mostyka <romanmostyka>
Component: SQL EditorAssignee: Jiri Skrivanek <jskrivanek>
Status: RESOLVED FIXED    
Severity: blocker    
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

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.