The mysql.pm implementations of fileindexed/filereferenced & setfileindexed/setfilereferenced have a weird ordering requirement that the getter must be called before the setter will work, as the setter only does an UPDATE on the database, not an INSERT. The INSERT is only performed by the getter.
While this works in practise because Tagger.pm always checks the status before setting, it is rather unnatural and should be removed. The cost will be an extra SELECT against the database to establish whether the file is already listed - this is very low cost compared to other db operations going on for each file being indexed/referenced.
Log in to post a comment.