https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8144

            Bug ID: 8144
           Summary: sql/txrep_sqlite.sql: suspicious trigger condition
                    fails to update last_hit
           Product: Spamassassin
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: spamassassin
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: Undefined

sql/txrep_sqlite.sql has "UpdateLastHit" trigger which is supposed to update
"last_hit" field each time a row gets updated by spamassassin.

However, this trigger has an extra condition "WHEN NEW.last_hit <
OLD.last_hit".
Since for normal txrep update "NEW.last_hit" has the same value as
"OLD.last_hit" in practice this trigger is never run and so "last_hit" field
never gets updated.

I'm currently using "WHEN NEW.last_hit <= OLD.last_hit" condition instead,
which  makes spamassassin update "last_hit" field successfully.

But since neither txrep_mysql.sql nor txrep_pg.sql have this extra condition in
their triggers I guess this condition should just be deleted from
txrep_sqlite.sql?

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to