Skip to content
  • Dan McGee's avatar
    Always set ModifiedTS including new packages · 1f252eba
    Dan McGee authored
    
    
    Set it equal to the SubmittedTS field, which will be our indication the
    package is new when we show the logo on the front page of the AUR.
    
    This results in the ability to remove the use of the unindexable
    GREATEST() function from the AUR code everywhere we had to use it before
    to handle the 0 timestamp case.
    
    Note that there is no race condition here in calling UNIX_TIMESTAMP()
    twice- it always returns the time at the beginning of statment
    execution:
    
        mysql> select unix_timestamp(), sleep(2), unix_timestamp();
        +------------------+----------+------------------+
        | unix_timestamp() | sleep(2) | unix_timestamp() |
        +------------------+----------+------------------+
        |       1300851746 |        0 |       1300851746 |
        +------------------+----------+------------------+
        1 row in set (2.00 sec)
    
    Signed-off-by: default avatarDan McGee <dan@archlinux.org>
    Signed-off-by: default avatarLukas Fleischer <archlinux@cryptocrack.de>
    1f252eba