Skip to Content.
Sympa Menu

freetds - [freetds] Problem with message handler

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Chris Kings-Lynne <Chris.Kings-Lynne AT navitas.com>
  • To: "freetds AT lists.ibiblio.org" <freetds AT lists.ibiblio.org>
  • Subject: [freetds] Problem with message handler
  • Date: Fri, 13 Sep 2013 06:51:53 +0000

Hi Guys,

I'm trying to fix the PHP pdo_dblib driver. The issue is it never returns
the actual database error message. It always says "Check SQL server
messages". I've identified the problem in the message handler code here:

https://github.com/php/php-src/blob/master/ext/pdo_dblib/pdo_dblib.c#L140

The problem is that the msgno always comes through as the correct underlying
sql error number (eg. 208), instead of the magic one that's being expected
(20018). (As seen here
http://gitorious.org/freetds/freetds/source/39af613d554743ef79a4eff64e9a517f0d3db20d:include/sybdb.h#L845)

So what's changed in FreeTDS because the way PHP is handling this message, it
looks like it must have been returning 20018 at some stage? Ie. See how they
are processing here:

https://github.com/php/php-src/blob/master/ext/pdo_dblib/dblib_driver.c#L51

Cheers,

Chris




Archive powered by MHonArc 2.6.24.

Top of Page