[guest - Fri Nov 19 03:12:04 2004]:
Show quoted text> I recently upgraded to MySql 4.1.7 (with DBD 2.9004 and DBI 1.46).
> For some reason, I had some select queries returning empty sets or
> data structures with some garbage in them, depending on the
> spacing/quoting of my query. Sometimes switching double quotes to
> single quotes around a string in the query fixed the problem.
> Sometimes converting spaces to tabs or breaking a long line into
> multiple lines fixed the problem as well. All of my queries are
> embedded within qq() blocks. I don't know why the fetches are
> being picky as far as whitespace/quoting issues. Please look into
> this as it is a major problem. Here is an example of a problem I
> encountered:
>
Did you compile DBD::mysql against the 4.7.1 client librares or is the
DBD driver compiled against an older version of the client libararies.
Show quoted text> qq(select track_id from $track_info where
> track_code = "$track_code") <=== this query returned garbage
>
> qq(select track_id from $track_info where
> track_code = '$track_code') <=== this worked
>
Is this a mimimal test case, or is this some sql embedded in a larger
program? If not can you provide a minimal self-contained test case
Have you tried cutting and pasting the query into the mysql command line
client (that was compiled against the same client libraries that you
compiled DBD::mysql against)?
I have not had any problems with DBD::mysql with earlier version of
mysql, and I don't know of any API changes that would cause the behavour
that you are seeing, so, my guess is: either there is something screwey
with the client libraries or even more likely is that the server is
treating the queries differently than you expected either because of a
bug or because of a change in the server defaults (remember that
according to the SQL standard "s are only used for SQL delimited
identifiers, not for strings).