#48724 [NEW]: getColumnMeta() doesn't return native_type for BIT, TINYINT and YEAR
| From: | an0nym at narod dot ru | Date: | Mon, 29 Jun 2009 18:02:58 +0000 |
| Subject: | #48724 [NEW]: getColumnMeta() doesn't return native_type for BIT, TINYINT and YEAR | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-138953@lists.php.net to get a copy of this message | ||
From: an0nym at narod dot ru
Operating system: *
PHP version: 5.2.10
PHP Bug Type: PDO related
Bug description: getColumnMeta() doesn't return native_type for BIT, TINYINT and YEAR
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 bug report at http://bugs.php.net/?id=48724&edit=1
--
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=48724&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=48724&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=48724&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=48724&r=fixedcvs
Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=48724&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=48724&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=48724&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=48724&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=48724&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=48724&r=support
Expected behavior: http://bugs.php.net/fix.php?id=48724&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=48724&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=48724&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=48724&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=48724&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=48724&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=48724&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=48724&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=48724&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=48724&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=48724&r=mysqlcfg