Issues

ZF-3624: float(10,8) is handled in wrong way

Issue Type: Bug Created: 2008-07-11T01:59:41.000+0000 Last Updated: 2008-12-21T05:59:34.000+0000 Status: Resolved Fix version(s): - 1.7.1 (01/Dec/08)

Reporter: Fabrizio Balliano (balliano) Assignee: Mickael Perraud (mikaelkael) Tags: - Zend_Db_Table

Related issues: Attachments: - ZF-ver-1.7-my-changes

Description

i'm using pdo_mysql, instance a zend_db_table to get table metadata (with zend_db_table::info() method), the bug is that, if on the db, a column is a float(n,n), the info() method returns DATA_TYPE = 'float(n,n)' instead of "float"

this was already solved for the "decimal" data type time ago

Comments

Posted by Fabrizio Balliano (balliano) on 2008-07-11T02:03:53.000+0000

the fix should be done in Zend_Db_Adapter_Pdo_Mysql::describeTable() using something like the same code used for the "decimal" detection (line 160 for ZF 1.5.2)

if (preg_match('/^decimal((\d+),(\d+))/', $row[$type], $matches)) { $row[$type] = 'decimal'; $precision = $matches[1]; $scale = $matches[2]; }

maybe replacing "decimal" with "float" would fix

Posted by Fabrizio Balliano (balliano) on 2008-07-15T11:34:04.000+0000

any news?

Posted by Fabrizio Balliano (balliano) on 2008-07-15T11:34:49.000+0000

any news?

Posted by Fabrizio Balliano (balliano) on 2008-09-23T02:58:18.000+0000

was not fixed in 1.5.3 nor in 1.6.1

Posted by Fabrizio Balliano (balliano) on 2008-10-15T01:47:27.000+0000

again not fixed in 1.6.2, please it's 1 line of code and I already gave that line! you need less than a minute to fix this bug and you wait for months

Posted by Fabrizio Balliano (balliano) on 2008-11-18T03:26:36.000+0000

1.7 is out, without my patch!

it's one line of code, I wrote it and sent it to you, could you please integrate it?

Posted by Nick Belhomme (nbelhomme) on 2008-11-18T11:29:44.000+0000

Issue ZF-3624: library/.../Mysql.php fix for float(n,n) data type return now float

tests/.../MysqlTest.php testAdapterDescribeTableAttributeColumn

tests/.../Common.php added a column in zfprice with the type float(10,8)

Posted by Nick Belhomme (nbelhomme) on 2008-11-18T11:31:49.000+0000

Issue ZF-3624: library/.../Mysql.php fix for float(n,n) data type return now float

tests/.../MysqlTest.php testAdapterDescribeTableAttributeColumn

tests/.../Common.php added a column in zfprice with the type float(10,8)

Posted by Mickael Perraud (mikaelkael) on 2008-11-23T07:27:46.000+0000

Fixed in SVN12788. But not merged to 1.7-branch.

Posted by Mickael Perraud (mikaelkael) on 2008-11-25T14:20:15.000+0000

Merged to 1.7-branch with SVN12842

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts