Your message dated Tue, 26 Apr 2011 10:17:25 +0100
with message-id <[email protected]>
and subject line Great!
has caused the Debian Bug report #390173,
regarding libdbd-mysql-perl:  fetchrow_array() misbehaving with null primary key
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
390173: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=390173
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: libdbd-mysql-perl
Version: 3.0007-1

My setup:
---------

$ uname -a
Linux crocus 2.6.15-1-486 #2 Mon Mar 6 15:19:16 UTC 2006 i686 GNU/Linux

~$ dpkg -l | grep mysql
ii  libdbd-mysql-perl                3.0007-1                    A Perl5 
database interface to the MySQL d       ata
ii  libmysqlclient15off              5.0.24a-4                   mysql database 
client library
ii  mysql-client                     5.0.24a-4                   mysql database 
client (current version)
ii  mysql-client-5.0                 5.0.24a-4                   mysql database 
client binaries
ii  mysql-common                     5.0.24a-4                   mysql database 
common files (e.g. /etc/my       sql

$ dpkg -l | grep dbi
ii  libdbi-perl                      1.52-1                      Perl5 database 
interface by Tim Bunce

The server: mysql-standard-5.0.21-linux-x86_64-glibc23 (Not a debian package). 


The problem:
------------

The server allows null values in primary key columns. If there is such a value 
(I have checked int and varchar(16)) a 
select of just the primary key returns no values when the data are retreived 
with $sth->fetchrow_array() even though 
the table is populated with thousands of rows. Using the interactive mysql 
client the data can be retrieved without
a problem, including the null value. If $sth->fetchrow_hashref() is used 
instead of $sth->fetchrow_array() the PK
data are returned correctly.  If the select attempts to retrieve more than one 
column, but including the primary key
(e.g. select * from...) then a small subset of rows are returned. Again, 
fetchrow_hashref() functions correctly.

The problem might not be in libdbd-mysql-perl but maybe libdbi-perl?





--- End Message ---
--- Begin Message ---
Keith,
I agree with your analysis. Here is the exact link: http://dev.mysql.com/doc/refman/5.1/en/create-table.html#id759670 .

Thanks for your work.

--
Nicholas Bamber | http://www.periapt.co.uk/
PGP key 3BFFE73C from pgp.mit.edu


--- End Message ---

Reply via email to