Bug 25858: Don't attempt to set flag if already set
authorAleisha Amohia <aleishaamohia@hotmail.com>
Thu, 16 Jul 2020 04:23:07 +0000 (16:23 +1200)
committerVictor Grousset/tuxayo <victor@tuxayo.net>
Wed, 22 Jul 2020 21:08:57 +0000 (23:08 +0200)
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>

(cherry picked from commit 6d6132777bc1dfd35e990ac469799ece679e4899)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>

installer/data/mysql/updatedatabase.pl

index 415c68d..10acce2 100755 (executable)
@@ -18960,7 +18960,7 @@ if( CheckVersion( $DBversion ) ) {
     });
 
     $dbh->do(q{
-        UPDATE borrowers SET flags = flags + (1<<12) WHERE flags & (1 << 11)
+        UPDATE borrowers SET flags = flags + (1<<12) WHERE flags & (1 << 11) AND !(flags & (1 << 12))
     });
 
     SetVersion( $DBversion );