You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "simmi iyer (JIRA)" <de...@db.apache.org> on 2005/07/08 09:38:14 UTC
[jira] Created: (DERBY-448) delete on an empty table generates warning
delete on an empty table generates warning
------------------------------------------
Key: DERBY-448
URL: http://issues.apache.org/jira/browse/DERBY-448
Project: Derby
Type: Bug
Components: Build tools
Versions: 10.0.2.1
Environment: Solaris
Reporter: simmi iyer
1. Launch ij to connect to Derby using embedded driver.
2. Issue delete command at ij prompt
ij>delete from table ;
3. This generates a warning
0 rows inserted/updated/deleted
WARNING 02000: No row was found for FETCH, UPDATE or DELETE; or the result of a query is an empty table.
There are two issues here:
1. It should say 0 rows deleted instead of 0 rows inserted/deleted/updated.
2. WARNING should not be shown.
thx
Simmi.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
Re: [jira] Created: (DERBY-448) delete on an empty table generates
warning
Posted by Shreyas Kaushik <Sh...@Sun.COM>.
simmi iyer (JIRA) wrote:
>delete on an empty table generates warning
>------------------------------------------
>
> Key: DERBY-448
> URL: http://issues.apache.org/jira/browse/DERBY-448
> Project: Derby
> Type: Bug
> Components: Build tools
> Versions: 10.0.2.1
> Environment: Solaris
> Reporter: simmi iyer
>
>
>1. Launch ij to connect to Derby using embedded driver.
>2. Issue delete command at ij prompt
>
>ij>delete from table ;
>
>3. This generates a warning
>
>0 rows inserted/updated/deleted
>WARNING 02000: No row was found for FETCH, UPDATE or DELETE; or the result of a query is an empty table.
>
>There are two issues here:
>
>1. It should say 0 rows deleted instead of 0 rows inserted/deleted/updated.
>
>
See, http://issues.apache.org/jira/browse/DERBY-105
thanks
Shreyas
>2. WARNING should not be shown.
>
>thx
>Simmi.
>
>
>
>
>
[jira] Commented: (DERBY-448) delete on an empty table generates warning
Posted by "Jeremy Boynes (JIRA)" <de...@db.apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-448?page=comments#action_12315317 ]
Jeremy Boynes commented on DERBY-448:
-------------------------------------
The SQL spec says the no data condition must be raised if no rows are deleted so the engine is correct here.
The definition of <direct select statement: multiple rows> also says that a no data condition is raised if the result of the query is empty so if we aren't raising a warning there I think we should.
> delete on an empty table generates warning
> ------------------------------------------
>
> Key: DERBY-448
> URL: http://issues.apache.org/jira/browse/DERBY-448
> Project: Derby
> Type: Bug
> Components: Build tools
> Versions: 10.0.2.1
> Environment: Solaris
> Reporter: simmi iyer
>
> 1. Launch ij to connect to Derby using embedded driver.
> 2. Issue delete command at ij prompt
> ij>delete from table ;
> 3. This generates a warning
> 0 rows inserted/updated/deleted
> WARNING 02000: No row was found for FETCH, UPDATE or DELETE; or the result of a query is an empty table.
> There are two issues here:
> 1. It should say 0 rows deleted instead of 0 rows inserted/deleted/updated.
> 2. WARNING should not be shown.
> thx
> Simmi.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Updated: (DERBY-448) delete on an empty table generates warning
Posted by "Andrew McIntyre (JIRA)" <de...@db.apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-448?page=all ]
Andrew McIntyre updated DERBY-448:
----------------------------------
Component: Tools
(was: Build tools)
> delete on an empty table generates warning
> ------------------------------------------
>
> Key: DERBY-448
> URL: http://issues.apache.org/jira/browse/DERBY-448
> Project: Derby
> Type: Bug
> Components: Tools
> Versions: 10.0.2.1
> Environment: Solaris
> Reporter: simmi iyer
>
> 1. Launch ij to connect to Derby using embedded driver.
> 2. Issue delete command at ij prompt
> ij>delete from table ;
> 3. This generates a warning
> 0 rows inserted/updated/deleted
> WARNING 02000: No row was found for FETCH, UPDATE or DELETE; or the result of a query is an empty table.
> There are two issues here:
> 1. It should say 0 rows deleted instead of 0 rows inserted/deleted/updated.
> 2. WARNING should not be shown.
> thx
> Simmi.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (DERBY-448) delete on an empty table generates
warning
Posted by "Daniel John Debrunner (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12564946#action_12564946 ]
Daniel John Debrunner commented on DERBY-448:
---------------------------------------------
Syntax errors (and any error that causes the statement to fail to complete) are SQLExceptions and are thrown. Thus they are not returned through the getWarnings() mechanism.
The multiple 01003 issue is probably a bug, most likely the engine (not ij) should not be creating multiple warnings, that should be a separate issue.
> delete on an empty table generates warning
> ------------------------------------------
>
> Key: DERBY-448
> URL: https://issues.apache.org/jira/browse/DERBY-448
> Project: Derby
> Issue Type: Bug
> Components: Tools
> Affects Versions: 10.0.2.1
> Environment: Solaris
> Reporter: simmi iyer
>
> 1. Launch ij to connect to Derby using embedded driver.
> 2. Issue delete command at ij prompt
> ij>delete from table ;
> 3. This generates a warning
> 0 rows inserted/updated/deleted
> WARNING 02000: No row was found for FETCH, UPDATE or DELETE; or the result of a query is an empty table.
> There are two issues here:
> 1. It should say 0 rows deleted instead of 0 rows inserted/deleted/updated.
> 2. WARNING should not be shown.
> thx
> Simmi.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (DERBY-448) delete on an empty table generates warning
Posted by "simmi iyer (JIRA)" <de...@db.apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-448?page=comments#action_12315283 ]
simmi iyer commented on DERBY-448:
----------------------------------
Sorry the component should be Tools not Build Tools.
Not able to find out how to edit an issue.
> delete on an empty table generates warning
> ------------------------------------------
>
> Key: DERBY-448
> URL: http://issues.apache.org/jira/browse/DERBY-448
> Project: Derby
> Type: Bug
> Components: Build tools
> Versions: 10.0.2.1
> Environment: Solaris
> Reporter: simmi iyer
>
> 1. Launch ij to connect to Derby using embedded driver.
> 2. Issue delete command at ij prompt
> ij>delete from table ;
> 3. This generates a warning
> 0 rows inserted/updated/deleted
> WARNING 02000: No row was found for FETCH, UPDATE or DELETE; or the result of a query is an empty table.
> There are two issues here:
> 1. It should say 0 rows deleted instead of 0 rows inserted/deleted/updated.
> 2. WARNING should not be shown.
> thx
> Simmi.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (DERBY-448) delete on an empty table generates warning
Posted by "simmi iyer (JIRA)" <de...@db.apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-448?page=comments#action_12315460 ]
simmi iyer commented on DERBY-448:
----------------------------------
Design wise, ij might be doing the right thing but from a user's perspective, the message is really misleading.
The message should be just "0 rows deleted".
Getting an output with inserted/updated/deleted when a delete was issued and generating a WARNING does not seem to be the right thing . Technically it might be just displaying the JDBC output but some filtering needs to be done to make the message apt.
> delete on an empty table generates warning
> ------------------------------------------
>
> Key: DERBY-448
> URL: http://issues.apache.org/jira/browse/DERBY-448
> Project: Derby
> Type: Bug
> Components: Build tools
> Versions: 10.0.2.1
> Environment: Solaris
> Reporter: simmi iyer
>
> 1. Launch ij to connect to Derby using embedded driver.
> 2. Issue delete command at ij prompt
> ij>delete from table ;
> 3. This generates a warning
> 0 rows inserted/updated/deleted
> WARNING 02000: No row was found for FETCH, UPDATE or DELETE; or the result of a query is an empty table.
> There are two issues here:
> 1. It should say 0 rows deleted instead of 0 rows inserted/deleted/updated.
> 2. WARNING should not be shown.
> thx
> Simmi.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Closed: (DERBY-448) delete on an empty table generates
warning
Posted by "Kristian Waagan (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-448?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kristian Waagan closed DERBY-448.
---------------------------------
As indicated in the previous comment, a new issue can be created if anyone want to follow up on this.
> delete on an empty table generates warning
> ------------------------------------------
>
> Key: DERBY-448
> URL: https://issues.apache.org/jira/browse/DERBY-448
> Project: Derby
> Issue Type: Bug
> Components: Tools
> Affects Versions: 10.0.2.1
> Environment: Solaris
> Reporter: simmi iyer
>
> 1. Launch ij to connect to Derby using embedded driver.
> 2. Issue delete command at ij prompt
> ij>delete from table ;
> 3. This generates a warning
> 0 rows inserted/updated/deleted
> WARNING 02000: No row was found for FETCH, UPDATE or DELETE; or the result of a query is an empty table.
> There are two issues here:
> 1. It should say 0 rows deleted instead of 0 rows inserted/deleted/updated.
> 2. WARNING should not be shown.
> thx
> Simmi.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (DERBY-448) delete on an empty table generates
warning
Posted by "Daniel John Debrunner (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-448?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Daniel John Debrunner resolved DERBY-448.
-----------------------------------------
Resolution: Invalid
Derby is correctly raising the warning as defined by the SQL standard.
Ij is behaving correctly as its purpose in a simple "interactive jdbc" scripting tool.
If anyone has the itch to develop a "smarter" scripting tool then it can be as a new Jira issue of type new feature.
Such a tool could be a wrapper around ij?
> delete on an empty table generates warning
> ------------------------------------------
>
> Key: DERBY-448
> URL: https://issues.apache.org/jira/browse/DERBY-448
> Project: Derby
> Issue Type: Bug
> Components: Tools
> Affects Versions: 10.0.2.1
> Environment: Solaris
> Reporter: simmi iyer
>
> 1. Launch ij to connect to Derby using embedded driver.
> 2. Issue delete command at ij prompt
> ij>delete from table ;
> 3. This generates a warning
> 0 rows inserted/updated/deleted
> WARNING 02000: No row was found for FETCH, UPDATE or DELETE; or the result of a query is an empty table.
> There are two issues here:
> 1. It should say 0 rows deleted instead of 0 rows inserted/deleted/updated.
> 2. WARNING should not be shown.
> thx
> Simmi.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (DERBY-448) delete on an empty table generates
warning
Posted by "Stan Bradbury (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12564932#action_12564932 ]
Stan Bradbury commented on DERBY-448:
-------------------------------------
I think I understand a little better now about this issue and why IJ should display warnings - I assume that syntax errors are Warnings and it would be a pain not get get those.
My real problem is with how IJ handles multiple Warning generated by the same statement. This is not shown by this JIRA issue but, I now believe, is what I observed when working with DERBY-3219. With a smaller set of data than provided with the DERBY-3219 reproduction the query did not fail but returned data and the following warning for each of the ~1000 records:
WARNING 01003: Null values were eliminated from the argument of a column function.
I would find it helpful to display a warning only once and not to iterate over the entire stack of duplicate Warnings. Does this seem like a reasonable statement for an enhancement request?
> delete on an empty table generates warning
> ------------------------------------------
>
> Key: DERBY-448
> URL: https://issues.apache.org/jira/browse/DERBY-448
> Project: Derby
> Issue Type: Bug
> Components: Tools
> Affects Versions: 10.0.2.1
> Environment: Solaris
> Reporter: simmi iyer
>
> 1. Launch ij to connect to Derby using embedded driver.
> 2. Issue delete command at ij prompt
> ij>delete from table ;
> 3. This generates a warning
> 0 rows inserted/updated/deleted
> WARNING 02000: No row was found for FETCH, UPDATE or DELETE; or the result of a query is an empty table.
> There are two issues here:
> 1. It should say 0 rows deleted instead of 0 rows inserted/deleted/updated.
> 2. WARNING should not be shown.
> thx
> Simmi.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (DERBY-448) delete on an empty table generates warning
Posted by "Daniel John Debrunner (JIRA)" <de...@db.apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-448?page=comments#action_12315314 ]
Daniel John Debrunner commented on DERBY-448:
---------------------------------------------
For some background, ij is just doing its job as a simple JDBC scripting tool.
JDBC reports an update count for DML statements, such as your delete, this is what ij is reporting, and since it's just a count of modified rows ij (through JDBC) cannot know if the rows were inserted/updated or deleted, so it reports the generic message.
For the warnings, ij displays any warning that is raised through JDBC, e.g. ResultSet,getWarnings(), Statement.getWarnings() etc. So if the JDBC driver (and it can be any JDBC driver, not just Derby's) raises an exception, ij will display it. That is correct, the driver raised the warning for a reason and so ij displays it.
If you think the warning should not be raised at all, that is not an ij (tools) issue, but a Derby engine issue. This SQLState (02000) is part of the SQLStandard ('no data') and certain conditions require it to be raised. I do think some cleanup & investigation is needed in this area, e.g. Derby does not have a FETCH statement so the text of the warning is misleading. The warning does not seem to be raised 'if the result of a query is an empty table' so again the text is misleading, it doesn't seem like an empty SELECT statement should raise such a warning.
> delete on an empty table generates warning
> ------------------------------------------
>
> Key: DERBY-448
> URL: http://issues.apache.org/jira/browse/DERBY-448
> Project: Derby
> Type: Bug
> Components: Build tools
> Versions: 10.0.2.1
> Environment: Solaris
> Reporter: simmi iyer
>
> 1. Launch ij to connect to Derby using embedded driver.
> 2. Issue delete command at ij prompt
> ij>delete from table ;
> 3. This generates a warning
> 0 rows inserted/updated/deleted
> WARNING 02000: No row was found for FETCH, UPDATE or DELETE; or the result of a query is an empty table.
> There are two issues here:
> 1. It should say 0 rows deleted instead of 0 rows inserted/deleted/updated.
> 2. WARNING should not be shown.
> thx
> Simmi.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira