[rt-users] RT 3.0.10 -> 3.0.12 upgrade; bug introduced
ben at atomicmatrix.net
ben at atomicmatrix.net
Mon Sep 20 14:34:07 EDT 2004
I'll preface this with the "Yeah, I'm running perl 5.6.1 and I know I
shouldn't be, and it COULD be the problem, BUT"
Was running 3.0.10 and upgraded to .12 recently. I noticed that my tweaked
"weekly.html" stopped working. The following code produces an invalid MySQL
query on .12 but not on .10:
my $startobj = RT::Date->new($RT::SystemUser);
my $endobj = RT::Date->new($RT::SystemUser);
$startobj->Set(Format => 'unix', Value => (time - (86400 * 7)));
$endobj->Set(Format => 'unix', Value => time);
my $Creator = 96;
my $queue = new RT::Queue($RT::SystemUser);
my $tickets = new RT::Tickets($RT::SystemUser);
$tickets->LimitTransactionDate( VALUE => $startobj->ISO, OPERATOR => '>');
$tickets->LimitTransactionDate( VALUE => $endobj->ISO, OPERATOR => '<');
$tickets->DEBUG(1);
$tickets->Next();
I'm testing on the same machine, simply switching my "use lib" statement at
the top between versions of RT3, so all my perl libraries are remaining the
same.
The two queries produced follows - first 3.0.10's and then 3.0.12's:
SELECT DISTINCT main.* FROM Tickets main , Transactions Transactions_1,
Attachments Attachments_2 WHERE ((Attachments_2.TransactionId =
Transactions_1.id)AND(Attachments_2.TransactionId = Transactions_1.id)) AND
((main.EffectiveId = main.id)) AND ((main.Type = 'ticket')) AND ((main.id =
Transactions_1.Ticket)AND(main.id = Transactions_1.Ticket)) AND ( ( (
(Attachments_2.Created > '2004-09-13 18:26:39') ) AND (
(Attachments_2.Created < '2004-09-20 18:26:39') ) ) )
SELECT DISTINCT main.* FROM Tickets main , Transactions Transactions_1,
Attachments Attachments_2 WHERE ((main.EffectiveId = main.id)) AND
((main.Type = 'ticket')) AND ( ( ( (Attachments_2.TransactionId =
Transactions_1.id)AND(main.id = Transactions_1.Ticket)(Attachments_2.Created
> '2004-09-13 18:26:58') ) AND ( (Attachments_2.TransactionId =
Transactions_1.id)AND(main.id =
Transactions_1.Ticket)AND(Attachments_2.Created < '2004-09-20 18:26:58') )
) )
I'll probably continue hunting (knowing me) but wanted to throw this out
there in case someone knows something ..
-=| Ben
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20040920/2f0accd8/attachment.htm>
More information about the rt-users
mailing list