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.
1. Connect to DB. 2. Open Query Editor. 3. Write and execute following statement: "delimiter \\". 4. Write and execute following statement: "CREATE PROCEDURE p1 () SELECT * FROM t; \\". 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 '\\' at line 1 Line 1, column 41". But procedure is created and it can be used.
I tried this delimiter \\ create procedure p1() begin select * from t; end\\ and it worked I tried this delimiter ?? create procedure p3 select * from t; ?? and got 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 'select * from t' at line 1 Line 2, column 1 I think it's not the delimiter but incorrect SQL syntax.
No, in your case you forgot brackets after p3. In my case following statement work fine: "delimiter \\ CREATE PROCEDURE p1 () SELECT * FROM t; \\". But if I set delimiter first and then try to create procedure, in the same editor, but without string "delimiter \\", then I get error. In other words: 1) Open SQL editor and execute statement "delimiter \\". 2) In the same editor remove everything and execute following statement: "CREATE PROCEDURE p1 () SELECT * FROM t; \\". And in 2) error arises. It arises because last signs are '\\' and without string "delimiter \\" in the beginning these signs are treated as incorrect syntax. If I set delimiter in particular SQL editor it will be good to have ability write what customer need without adding this additional string every time.
This is a feature request - to allow specifying delimiter that lasts longer than a single execution of a query editor. Currently you need to specify the delimiter as part of the text you are executing. I do think this may be a problem if you want to execute a single statement - you can't because we currently don't include the delimiter statement as part of that statement. I'll investigate as part of beta phase.
SQuirreL SQL has a field in the SQL editor where the user can set the statement delimiter. Perhaps we can do something similar.
Maybe I'm missing something but I thought we already had this - just say 'delimited XXX' and it should work
> SQuirreL SQL has a field in the SQL editor where the user can set the statement delimiter ... which both saves the user from puting a "delimiter XXX" statement in the script, and pleases Roman.
Reassigned to new owner.