View Issue Details

IDProjectCategoryView StatusLast Update
0011732phpList 3 applicationBatch Processingpublic21-05-12 19:28
Reporterbhugh 
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Version2.11.3 
Target VersionFixed in Version 
Summary0011732: Processqueue malfunctions in certain situations, with easy fix
DescriptionBug #8478 was fixed with this code in processqueue.php:

  487 $query = sprintf('select distinct user.id from
  488 (%s as listuser,
  489 %s as user,
  490 %s as listmessage)
  491 left join %s as usermessage
  492 on (usermessage.messageid = %d and usermessage.userid = listuser.userid)
  493 where
  494 listmessage.messageid = %d and
  495 listmessage.listid = listuser.listid and
  496 user.id = listuser.userid and
  497 usermessage.userid IS NULL
  498 %s %s %s',
  499 $tables['listuser'], $tables['user'], $tables['listmessage'], $tables['usermessage'],
  500 $messageid, $messageid,
  501 $userconfirmed, $exclusion, $user_attribute_query);


When I incorporated this code into my PHP installation I found it routinely malfunctioned unless I also included another line as part of the "where" clause:

  message.id = %d and


Altogether with this fix, those lines look like this:


$query = sprintf('select distinct user.id from
      (%s as listuser,
      %s as user,
      %s as listmessage,
      %s as message)
      left join %s as usermessage
      on (usermessage.messageid = %d and usermessage.userid = listuser.userid)
      where
      listmessage.messageid = %d and
      message.id = %d and
      listmessage.listid = listuser.listid and
      user.id = listuser.userid and
      usermessage.userid IS NULL
      %s %s %s',
      $tables['listuser'], $tables['user'], $tables['listmessage'],$tables['message'],
      $tables['usermessage'], $messageid, $messageid, $messageid,
      $userconfirmed, $exclusion, $user_attribute_query);
TagsNo tags attached.

Relationships

related to 0002705 closed PHPList v2.11 release 
related to 0008478 resolvedmichiel processqueue.php creeates bad query if $doneusers large 

Activities

There are no notes attached to this issue.