(2.6.1) Behavior change for update statement affecting no rows
See original GitHub issueFor the past year or two we’ve had this statement running without issue:
update ORGANIZATION set created = 0 where created is NULL
As of 2.6.1, this now produces the following warning as an exception:
[IBM][CLI Driver][DB2/LINUXX8664] SQL0100W No row was found for FETCH, UPDATE or DELETE; or the result of a query is an empty table. SQLSTATE=02000
Is there a way to restore the original behavior? If not, how should we detect warnings like this to distinguish them from actual errors?
This seems to have also worked with 2.6.0. In the meantime, we have locked our version to 2.5.3 even though 2.5.1 is marked as the current release. Not sure what’s up there.
Thanks!
Issue Analytics
- State:
- Created 4 years ago
- Comments:13 (2 by maintainers)
Top Results From Across the Web
sql server - UPDATE statement behavior - DBA Stack Exchange
I have a question regarding inner workings of UPDATE statements with regards to SQL Server. The statement describes a desired logical change ......
Read more >Why UPDATE statement affecting less rows than SELECT
Affected rows in UPDATE is the amount of the rows updated by fact. If new value is equal to old one then this...
Read more >TimescaleDB release notes and future plans - Timescale Docs
New features and fixes are released regularly.
Read more >Firebase Android SDK Release Notes
Libraries that were versioned with this release are in highlighted rows. ... BREAKING CHANGE: With this release, the BoM no longer contains the...
Read more >Changelog | Meteor API Docs
TinyTest package without Future PR by matheusccastroo. ... ddp-client@2.6.1 ... update/insert/remove behavior is maintained in the Meteor way, documented in ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Ibm_db should definately return succes on warnings because the sql statement is executed succesfully (in our case at least). There is no reason not to return the fetched data. As for the warning itself, it could be helpfull to have access to it. Just not as an error. To be fair, we are using a 3rd party package that acts as a wrapper around ibm_db. That package now throws an exception.
Thanks for opening this @dongryphon I agree that it should by default not throw an exception for warning, but it can be an option when creating the DB2 connection.
The SQL is executed successfully, and the warning is not really an error, but rather more information. For now we are going to stay on version 2.5.3.