Bug #54167 [Opn->Fbk]: PDO_DBLIB returns null on SQLUNIQUE field
| From: | felipe@php.net | Date: | Sat, 05 Mar 2011 23:09:24 +0000 |
| Subject: | Bug #54167 [Opn->Fbk]: PDO_DBLIB returns null on SQLUNIQUE field | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-159258@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=54167&edit=1
ID: 54167
Updated by: felipe@php.net
Reported by: mjh at hodginsmedia dot com
Summary: PDO_DBLIB returns null on SQLUNIQUE field
-Status: Open
+Status: Feedback
Type: Bug
Package: PDO related
Operating System: Linux
PHP Version: 5.3.5
-Assigned To:
+Assigned To: felipe
Block user comment: N
Private report: N
New Comment:
I've committed your patch with a trunk version as well (based in your
patch)
Can you test it, please?
Thanks for the patch! :)
Previous Comments:
------------------------------------------------------------------------
[2011-03-06 00:07:47] felipe@php.net
Automatic comment from SVN on behalf of felipe
Revision: http://svn.php.net/viewvc/?view=revision&revision=308948
Log: - Fixed bug #54167 (PDO_DBLIB returns null on SQLUNIQUE field)
# initial patch by: mjh at hodginsmedia dot com (5.3)
# trunk version by me
------------------------------------------------------------------------
[2011-03-05 21:17:50] mjh at hodginsmedia dot com
Value is returned from dbconvert in lowercase. The call to
php_strtoupper() normalizes the value to make it consistent with other
tools.
For example the MS SQL client tools always show the value as a string in
uppercase. Also php_mssql.c PHP function mssql_guid_string() does the
same thing.
------------------------------------------------------------------------
[2011-03-05 14:19:21] felipe@php.net
Why php_strtoupper(val->data, val->len); is needed?
------------------------------------------------------------------------
[2011-03-05 08:15:58] mjh at hodginsmedia dot com
Description:
------------
SQLUNIQUE (type 36) is a uniqueidentifier field in Microsoft SQL server.
It is
presently unhandled by PDO_DBLIB, so returns NULL rather than the actual
column
value for all queries.
Patch to ext/pdo_dblib/dblib_stmt.c is attached which fixes the issue so
that
PDO_DBLIB returns the uniqueidentifier as a string.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=54167&edit=1