#48724 [Opn]: getColumnMeta() doesn't return native_type for BIT, TINYINT and YEAR
From: an0nym at narod dot ru Date: Tue, 30 Jun 2009 15:33:29 +0000 Subject: #48724 [Opn]: getColumnMeta() doesn't return native_type for BIT, TINYINT and YEAR References: 1 Groups: php.bugs Request: Send a blank email to php-bugs+get-139005@lists.php.net to get a copy of this message
ID: 48724
User updated by: an0nym at narod dot ru
Reported By: an0nym at narod dot ru
Status: Open
Bug Type: PDO related
Operating System: *
-PHP Version: 5.2.10
+PHP Version: 5.3.0
New Comment:
Tested - this bug remains actual with PHP 5.3.0 and mysqlnd.
Previous Comments:
------------------------------------------------------------------------
[2009-06-29 18:02:58] an0nym at narod dot ru
Description:
------------
PDOStatement::getColumnMeta() doesn't return native_type for BIT,
TINYINT and YEAR type columns (these should be 'BIT', 'TINY' and
'YEAR'
respectively).
This bug was partly discussed within bug #46533, but that bug is
generally about another thing.
Reproduce code:
---------------
$DB=new PDO('mysql:host=localhost;dbname=test','anyone','anyone');
$DB->exec('CREATE TABLE test(
bit bit(1)
,tinyint tinyint
,year year)');
$DB->exec('INSERT INTO test VALUES(1,1,2000)');
$statement=$DB->query('SELECT bit,tinyint,year FROM
test');
$bit=$statement->getColumnMeta(0);
$tinyint=$statement->getColumnMeta(1);
$year=$statement->getColumnMeta(2);
var_dump(isset($bit['native_type']),isset($tinyint['native_type']),isset($year['native_type']));
Expected result:
----------------
bool(true) bool(true) bool(true)
Actual result:
--------------
bool(false) bool(false) bool(false)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=48724&edit=1
Thread (14 messages)
- #48724 [Opn]: getColumnMeta() doesn't return native_type for BIT, TINYINT and YEAR
- #48724 [Opn]: getColumnMeta() doesn't return native_type for BIT, TINYINT and YEAR
- #48724 [Opn]: getColumnMeta() doesn't return native_type for BIT, TINYINT and YEAR
- #48724 [Opn]: getColumnMeta() doesn't return native_type for BIT, TINYINT and YEAR
- #48724 [Opn]: getColumnMeta() doesn't return native_type for BIT, TINYINT and YEAR
- #48724 [Opn]: getColumnMeta() doesn't return native_type for BIT, TINYINT and YEAR
- #48724 [Opn]: getColumnMeta() doesn't return native_type for BIT, TINYINT and YEAR
- #48724 [Opn]: getColumnMeta() doesn't return native_type for BIT, TINYINT and YEAR
- #48724 [Opn]: getColumnMeta() doesn't return native_type for BIT, TINYINT and YEAR
- #48724 [Opn]: getColumnMeta() doesn't return native_type for BIT, TINYINT and YEAR
- Bug #48724 [PATCH]: getColumnMeta() doesn't return native_type for BIT, TINYINT and YEAR
- Bug #48724 [Opn->Asn]: getColumnMeta() doesn't return native_type for BIT, TINYINT and YEAR
- Bug #48724 [Asn->Csd]: getColumnMeta() doesn't return native_type for BIT, TINYINT and YEAR
| « previous | php.bugs (#139005) | next » |
|---|