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.
Summary: | Allow setting the statement delimiter externally | ||
---|---|---|---|
Product: | db | Reporter: | Roman Mostyka <romanmostyka> |
Component: | SQL Editor | Assignee: | Libor Fischmeistr <lfischmeistr> |
Status: | NEW --- | ||
Severity: | blocker | CC: | tremel |
Priority: | P3 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | Windows 8 | ||
Issue Type: | ENHANCEMENT | Exception Reporter: | |
Bug Depends on: | |||
Bug Blocks: | 152817 |
Description
Roman Mostyka
2008-06-09 15:59:04 UTC
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. |