#43912 [Opn->Csd]: Interbase column names are truncated to 31 characters
| From: | iliaa@php.net | Date: | Wed, 23 Jan 2008 01:23:20 +0000 |
| Subject: | #43912 [Opn->Csd]: Interbase column names are truncated to 31 characters | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-121465@lists.php.net to get a copy of this message | ||
ID: 43912
Updated by: iliaa@php.net
Reported By: virtue at rocketmonkeys dot com
-Status: Open
+Status: Closed
Bug Type: InterBase related
Operating System: Windows XP SP2
PHP Version: 5.2.5
New Comment:
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2008-01-22 21:27:36] virtue at rocketmonkeys dot com
From the documentation with Interbase 8.1, object names can be up to 67
characters long, plus a NULL terminator.
----
Valid names for InterBase objects must use the 7-bit ASCII character
set (character set ID
2) and must have the following characteristics:
no spaces
not case sensitive
not InterBase keywords
a maximum of 68 bytes long: 67 bytes plus a null terminator
------------------------------------------------------------------------
[2008-01-22 21:14:13] virtue at rocketmonkeys dot com
Description:
------------
The PHP interbase functions seem not to support column names that are
longer than 31 characters with Interbase 8.1. Interbase 5.5 through 6.5
are supposedly limited to 31 character names, but later version are
not.
I can query the field with PHP using the full name. The correct value
is returned, but the returned name is incorrectly truncated to 31
characters. The Interbase IBConsole program returns the correct field
name, untruncated.
Reproduce code:
---------------
<?
ibase_connect(...);
ibase_query( "create table TEST1 (
A_________B_________C_________D_________E_________F_________ integer );"
);
ibase_query( "insert into TEST1 values ( 1 );" );
$result = ibase_query( "select * from TEST1;" );
$object = ibase_fetch_object( $result );
var_dump( $object );
?>
Expected result:
----------------
object(stdClass)#2 (1) {
["A_________B_________C_________D_________E_________F_________"]=>
int(1)
}
Actual result:
--------------
object(stdClass)#2 (1) {
["A_________B_________C_________D"]=>
int(1)
}
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=43912&edit=1