PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Database » MDB » Bug #1168

mysql manager getTableFieldDefinition() and listTableFields() bug

Details

Submitted2004-04-09 06:13 UTC
Fromthierry dot bo at netcourrier dot com
Assignedlsmith
StatusClosed
PackageMDB
PHP Version4.3.2
OSwin32 XP
Roadmaps(Not assigned)

Comments

[2004-04-09 06:13 UTC] thierry dot bo at netcourrier dot com

Description:
------------
Hey sorry,

I reported two bugs in Bug #1159, it is closed but you corrected only the first one:

in mysql v 1.44.4.7 code line 551 tand more, $columns :

if 'portability' is not set, column names have the first letter
capitalized, since getColumnName result is not lower cased ($columns['Field']) , so $column = 'field' never match.
(This is the reverse effect of bug fix #963)

You have the same problem in listTableFields line 509 and more.

My thought is that getTableFieldDefinition() and listTableFields() should not be affected by portability, so result keys from getColumnNames should be always lower cased.

TB

Reproduce code:
---------------
$columns = $db->getColumnNames($result);
if(MDB::isError($columns)) {
$db->freeResult($columns);
return($columns);
}
if (!isset($columns[$column = 'field'])
|| !isset($columns[$column = 'type']))
(.....................)

[2004-04-10 07:42 UTC] smith at backendmedia dot com

This bug has been fixed in CVS.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on pear.php.net.

In case this was a pear.php.net website problem, the change will show
up on the website in short time.

Thank you for the report, and for helping us make PEAR better.