Bug #65950 [NEW]: Field name truncation if the field name is bigger than 32 characters
| From: | michael dot y at zend dot com | Date: | Wed, 23 Oct 2013 11:49:01 +0000 |
| Subject: | Bug #65950 [NEW]: Field name truncation if the field name is bigger than 32 characters | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-182406@lists.php.net to get a copy of this message | ||
From: michael dot y at zend dot com
Operating system: Linux
PHP version: 5.4.21
Package: ODBC related
Bug Type: Bug
Bug description:Field name truncation if the field name is bigger than 32 characters
Description:
------------
Field names are truncated to 30 charactes if they are bigger than 32
bytes in MS SQL Server. If i am using odbc php extension that connects
to unixodbc + freetds.
Test script:
---------------
<?php
$cnx = odbc_connect("Driver=FreeTDS;
Server=10.9.178.47;port=1433;Database=AdventureWorks;CHARSET=UTF-8;TDS_Version=8.0;",
"sa", "pass");
$query = "SELECT * FROM dbo.Roman";
$res = odbc_exec($cnx,$query);
while( $row = odbc_fetch_array($res) ) {
print_r($row);
}
echo $cnx;
?>
Expected result:
----------------
Roman table there is a field which name is
hello_one_two_three_four_five_six_seven_eight_nine_ten_eleven.
Actual result:
--------------
It is truncated to hello_one_two_three_four_five_ .
--
Edit bug report at https://bugs.php.net/bug.php?id=65950&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=65950&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=65950&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=65950&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=65950&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=65950&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=65950&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=65950&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=65950&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=65950&r=support
Expected behavior: https://bugs.php.net/fix.php?id=65950&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=65950&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=65950&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=65950&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=65950&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=65950&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=65950&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=65950&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=65950&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=65950&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=65950&r=mysqlcfg