question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

(2.6.1) Behavior change for update statement affecting no rows

See original GitHub issue

For 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:closed
  • Created 4 years ago
  • Comments:13 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
rbetjescommented, Sep 11, 2019

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.

1reaction
John-Kryspincommented, Sep 26, 2019

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found