PDO/MySQL column metadata native_type broken

php.internals

Timm Friebe

21 years ago
Hi, native_type (returned from PDOStatement::getColumnMeta()) was showing weird behaviour in PDO/MySQL, mostly not existing at all and showing incorrect values (e.g. "DECIMAL" for varchars). A small typo is why: Index: ext/pdo_mysql/mysql_statement.c =================================================================== RCS file: /repository/php-src/ext/pdo_mysql/mysql_statement.c,v retrieving revision 1.14 diff -u -r1.14 mysql_statement.c --- ext/pdo_mysql/mysql_statement.c 13 Feb 2005 00:48:00 -0000 1.14 +++ ext/pdo_mysql/mysql_statement.c 19 Feb 2005 17:48:00 -0000 @@ -228,7 +228,7 @@ if (IS_BLOB(F->flags)) { add_next_index_string(flags, "blob", 1); } - str = type_to_name_native(F->flags); + str = type_to_name_native(F->type); if (str) { add_assoc_string(return_value, "native_type", str, 1); }
-- Timm If it ain't broken, it doesn't have enough features yet

Wez Furlong

21 years ago
Please open a pecl bug for this too, Thanks --Wez. On Sat, 19 Feb 2005 18:52:47 +0100, Timm Friebe <thekid@thekid.de> wrote:

Timm Friebe

21 years ago
On Sun, 2005-02-20 at 04:32 -0500, Wez Furlong wrote:
> Please open a pecl bug for this too,
Done so: http://pecl.php.net/bugs/bug.php?id=3530
-- Timm If it ain't broken, it doesn't have enough features yet