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 Java DB, open SQL editor and run following: "delimiter \\ CREATE PROCEDURE p11 () BEGIN DECLARE x1 CHAR(5) DEFAULT 'outer'; BEGIN DECLARE x1 CHAR(5) DEFAULT 'inner'; SELECT x1; END; SELECT x1; END; \\". 2. Open "SQL History" dialog and look at executed statements. Result: The looks strange, I guess because of delimiter and because of statement isn't executed successfully.
as mentioned before, SQL History only captures what was executed. This could be how the Java DB executes or how execution is handled. Either SQL History should be changed to not capture failed SQL statements or we'll have to live with this
You can't even create a procedure like this in Java DB, it's not even supported. Java DB SQL syntax will never, ever require the use of specifying a delimiter. So in a way this is a very odd and unlikely issue, I'm relegating it to a P4.
Actually, I'll revert that. I can see you wanting to change the delimiter for some odd reason, but it's not needed because of the procedural use case. Java DB doesn't support SQL stored procedures, only Java procedures. We have an open issue to store delimiter statements. So I guess this issue boils down to "correctly" saving statements that were not correctly executed? Perhaps that is a P3, if this really isn't being done correctly. This issue doesn't have a screen shot to show what "looks strange" means.
Actually I tried with latest build, but without any success. Before, statement for creation of stored procedure was divided into several lines in SQL History. I think that every string with semicolon in the end was treated as particular statement. But now, even for Java DB, when statement isn't executed successfully, it appears in SQL History in the same form as for successfully executed statement. Probably this issue was fixed. I'll investigate further.
If we want to continue to save statements that failed to execute successfully, then to help resolve this issue, should there be Delete support to delete those statements that look bad in the history dialog?
I already filed such issue some time ago: issue #138853.
report says will investigate further
Created attachment 74754 [details] Screenshot of broken statement in "SQL Hisory" dialog.
In attach you can find a sample of broken statement. But actually I can't reproduce this issue anymore. I'll try with latest dev build and if I'm not able to reproduce, I'll close this issue.
I can't this issue anymore. I'll reopen it if I have more information.
Verified with build 081209.