Re: DECIMAL col type bug in DBD::mysql w/mysql 5

"Selke, Gisbert W." <[email protected]>
Newsgroups gmane.comp.db.mysql.perl
Message-ID <[email protected]>
> -----Ursprüngliche Nachricht-----
> Von: Ray Zimmerman [mailto:[email protected]]
> Gesendet: Donnerstag, 1. Dezember 2005 20:22
> I believe I have discovered a bug (I'm guessing it's in DBD::mysql).  
> When connecting to mysql 5, it returns the type of a decimal column  
> as SQL_VARCHAR, as opposed to SQL_DECIMAL returned when the mysql  
> server is version 4.1.
I don't think it's DBD::mysql. http://bugs.mysql.com/bug.php?id=14923 has an
entry from the MySQL people that may be an explanation. Base line: "There is
no standard C type for fixed point numeric type, so MySQL server
returns decimal as a string." This comes also up in MySQL QueryBrowser, so
it's not just DBD::mysql.

As a workaround, the entry suggests to cast the decimal to some other type
(like double). Which may, of course, lead to loss of accuracy.

\Gisbert

-- 
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe:    http://lists.mysql.com/[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.