← Back to team overview

randgen team mailing list archive

Re: [Branch ~randgen/randgen/rqg2] Rev 576: more robust ExecutionTimeComparator

 

Hi Philip,


I just have a couple of questions about this change...


On 10/26/10 09:56, noreply@xxxxxxxxxxxxx wrote:
------------------------------------------------------------
revno: 576
committer: eve<philips@eve>
branch nick: randgen-dsmrr-cpk
timestamp: Tue 2010-10-26 10:54:59 +0300
message:
   more robust ExecutionTimeComparator

Robust... against what? Faulty queries?

modified:
   lib/GenTest/Validator/ExecutionTimeComparator.pm

Part of the diff:

-------------------------------------------
@@ -47,6 +48,7 @@
 	my $query = $results->[0]->query();

 	return STATUS_WONT_HANDLE if $query !~ m{^\s*SELECT}sio;
+ return STATUS_WONT_HANDLE if $results->[0]->status() != STATUS_OK || $results->[0]->status() != STATUS_OK;

 	my @explains;
 	foreach my $executor_id (0..1) {
-------------------------------------------


I don't understand some detail here... is there a reason why the same thing ($results->[0]->status() != STATUS_OK) is on both sides of the "||" ?
Did you mean to remove "$query !~ m{^\s*SELECT}sio" entirely?


regards,

--
John



Follow ups