From 58742967d761f9266f5370d827492c6bec6bc5af Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 16 Apr 2015 09:46:26 +0200 Subject: [PATCH] Bug 7976: Update borrowers.flags The borrowers.flags values need to be updated to prevent side effects. Test plan: Set the borrow permission flags for some borrowers Execute the updatedb entry and verify the flags has been updated (-128) only for borrowers with this permission set. --- installer/data/mysql/updatedatabase.pl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index ee2612c..c659d1c 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -10042,6 +10042,13 @@ while ( my $file = readdir $dirh ) { $DBversion = "3.19.00.XXX"; if ( CheckVersion($DBversion) ) { + # Remove the borrow permission flag (bit 7) + $dbh->do(q| + UPDATE borrowers + SET flags = flags - ( flags & (1<<7) ) + WHERE flags IS NOT NULL + AND flags > 0 + |); $dbh->do(q| DELETE FROM userflags WHERE bit=7; |); -- 2.1.0