Bug 25858: (bug 25858 follow-up) Don't attempt to set flag if already set
authorNick Clemens <nick@bywatersolutions.com>
Wed, 24 Jun 2020 10:06:57 +0000 (10:06 +0000)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 29 Jun 2020 10:36:51 +0000 (12:36 +0200)
Signed-off-by: Didier Gautheron <didier.gautheron@biblibre.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

installer/data/mysql/updatedatabase.pl

index 8cff553..303164d 100755 (executable)
@@ -20650,7 +20650,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))
     });
 
     NewVersion( $DBversion, 22868, 'Move suggestions_manage subpermission out of acquisition permission' );