select fails to find updates of from other connections

select fails to find updates of from other connections

am 14.11.2009 01:03:58 von Bob McGowan

Hello,

My apologies if this is a well known issue, I could not figure out a way
to search that didn't end up returning way too much irrelevant information.

I'm having trouble with retrieving data from mySQL, where the update or
create was done by another application connection and happened while my
Perl DBI/DBD connection was active.

If I disconnect/reconnect to the server, I can see the changes.

Is this expected behavior? Or is there some parameter that I'm missing?
Neither the standard 'mysql' client nor the Bugzilla GUI seem to have
this problem.

I'm connecting to a Bugzilla 'bugs' database, mySQL is 5.0.32 (Debian
etch package), Bugzilla is "Virtual Bugzilla Server 3.2.2 brought to you
by ALM Works", Perl is 5.8.8, DBI is v. 1.52, DBD::mysql is v. 4.013.

My connect string is "dbi:mysql:host=$_db_host;database=$_db_dbname",
and I'm using the Bugzilla::DB->db_new method to create the database
handle. I also set AutoCommit=>0 on the handle when it is created. I'm
connecting as the Bugzilla 'bugs' user.

This is the select that is built by my script and which works just fine
if I run it in the 'mysql' client:

select bug_id as seq_number,
date_format(delta_ts, '%Y/%m/%d %H:%i:%s') as datetime
from bugs
where product_id = (select id from products where name = 'XXXX')
and
bug_status != 'CLOSED'
and
delta_ts > str_to_date('2009/11/13 08:29:15', '%Y/%m/%d %H:%i:%s')
and
delta_ts <= str_to_date('2009/11/13 08:32:16', '%Y/%m/%d %H:%i:%s')
order by bug_id

This is the string as printed by the debugger just before the call to
'selectall_arrayref'.

The two date strings are substituted in as variables during the initial
processing.

Thank your for your help.

--
Bob McGowan
Symantec, Inc.

--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org