Skip to Content.
Sympa Menu

freetds - [freetds] Found a bug with batch statements that don't contain a select.

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Jeff Farr <jefarr AT wayfair.com>
  • To: "freetds AT lists.ibiblio.org" <freetds AT lists.ibiblio.org>
  • Subject: [freetds] Found a bug with batch statements that don't contain a select.
  • Date: Thu, 17 Nov 2016 17:35:05 +0000

Hello all, a while back we found some unexpected behavior when sending
multiple queries in a statement and, initially, thought it was a bug with
PHPs PDO library (you can see the bug report here
https://bugs.php.net/bug.php?id=72969). I dug into the issue and found that
the underlying problem is that if you call dbresults on a result set that
doesn't contain TDS_ROW_RESULT or TDS_ROWFMT_RESULT then the for loop will
process every set of tokens in the data in one swoop and then return
NO_MORE_ROWS to the calling function.


I've made a small change to _dbresults and added a couple of unit tests that
demonstrate the issue and verify that it's fixed, review and feedback from
the list is much appreciated!


If it's easier, I also created a PR against Branch-1_00 here:
https://github.com/FreeTDS/freetds/pull/84


Thanks,

-Jeff

Attachment: batch_statements_without_select.diff
Description: batch_statements_without_select.diff



  • [freetds] Found a bug with batch statements that don't contain a select., Jeff Farr, 11/17/2016

Archive powered by MHonArc 2.6.24.

Top of Page