From 95082c34db25156fef12dba6ab44956d54aab20d Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Fri, 19 Jul 2024 09:54:44 -0400 Subject: [PATCH] Bug 29509: (QA follow-up) Tidy atomic update Signed-off-by: Kyle M Hall Signed-off-by: Martin Renvoize (cherry picked from commit 0505531cde2e0513a2c8fbc3c91d18f9ae3a3a89) Signed-off-by: Lucas Gass --- .../data/mysql/atomicupdate/bug_29509.pl | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/installer/data/mysql/atomicupdate/bug_29509.pl b/installer/data/mysql/atomicupdate/bug_29509.pl index 3a0799256a..b70fd3ce6b 100755 --- a/installer/data/mysql/atomicupdate/bug_29509.pl +++ b/installer/data/mysql/atomicupdate/bug_29509.pl @@ -30,10 +30,10 @@ return { my $sth3 = $dbh->prepare("SELECT borrowernumber FROM user_permissions WHERE code = 'manage_bookings'"); $sth3->execute(); my @manage_bookings = map { $_->[0] } @{ $sth3->fetchall_arrayref }; - my $sth3_1 = $dbh->prepare("SELECT borrowernumber FROM borrowers WHERE flags & (1<<1)"); + my $sth3_1 = $dbh->prepare("SELECT borrowernumber FROM borrowers WHERE flags & (1<<1)"); $sth3_1->execute(); my @circulate = map { $_->[0] } @{ $sth3_1->fetchall_arrayref }; - my @bookings = (@manage_bookings, @circulate); + my @bookings = ( @manage_bookings, @circulate ); @rows_to_insert = ( map { [ $_, 4, "list_borrowers" ] } array_minus( @bookings, @exclusions ) ); foreach my $row (@rows_to_insert) { $insert_sth->execute( @{$row} ); } say $out "list_borrowers added to all users with manage_bookings"; @@ -42,10 +42,10 @@ return { my $sth4 = $dbh->prepare("SELECT borrowernumber FROM user_permissions WHERE code = 'label_creator'"); $sth4->execute(); my @label_creator = map { $_->[0] } @{ $sth4->fetchall_arrayref }; - my $sth4_1 = $dbh->prepare("SELECT borrowernumber FROM borrowers WHERE flags & (1<<13)"); + my $sth4_1 = $dbh->prepare("SELECT borrowernumber FROM borrowers WHERE flags & (1<<13)"); $sth4_1->execute(); - my @tools = map { $_->[0] } @{ $sth4_1->fetchall_arrayref }; - my @labels = (@label_creator, @tools); + my @tools = map { $_->[0] } @{ $sth4_1->fetchall_arrayref }; + my @labels = ( @label_creator, @tools ); @rows_to_insert = ( map { [ $_, 4, "list_borrowers" ] } array_minus( @labels, @exclusions ) ); foreach my $row (@rows_to_insert) { $insert_sth->execute( @{$row} ); } say $out "list_borrowers added to all users with label_creator"; @@ -54,10 +54,10 @@ return { my $sth5 = $dbh->prepare("SELECT borrowernumber FROM user_permissions WHERE code = 'routing'"); $sth5->execute(); my @routing = map { $_->[0] } @{ $sth5->fetchall_arrayref }; - my $sth5_1 = $dbh->prepare("SELECT borrowernumber FROM borrowers WHERE flags & (1<<15)"); + my $sth5_1 = $dbh->prepare("SELECT borrowernumber FROM borrowers WHERE flags & (1<<15)"); $sth5_1->execute(); - my @serials = map { $_->[0] } @{ $sth5_1->fetchall_arrayref }; - my @routing_lists = (@routing, @serials); + my @serials = map { $_->[0] } @{ $sth5_1->fetchall_arrayref }; + my @routing_lists = ( @routing, @serials ); @rows_to_insert = ( map { [ $_, 4, "list_borrowers" ] } array_minus( @routing_lists, @exclusions ) ); foreach my $row (@rows_to_insert) { $insert_sth->execute( @{$row} ); } say $out "list_borrowers added to all users with routing"; @@ -66,10 +66,10 @@ return { my $sth6 = $dbh->prepare("SELECT borrowernumber FROM user_permissions WHERE code = 'order_manage'"); $sth6->execute(); my @order_manage = map { $_->[0] } @{ $sth6->fetchall_arrayref }; - my $sth6_1 = $dbh->prepare("SELECT borrowernumber FROM borrowers WHERE flags & (1<<11)"); + my $sth6_1 = $dbh->prepare("SELECT borrowernumber FROM borrowers WHERE flags & (1<<11)"); $sth6_1->execute(); my @acquisitions = map { $_->[0] } @{ $sth6_1->fetchall_arrayref }; - my @orders = (@order_manage, @acquisitions); + my @orders = ( @order_manage, @acquisitions ); @rows_to_insert = ( map { [ $_, 4, "list_borrowers" ] } array_minus( @orders, @exclusions ) ); foreach my $row (@rows_to_insert) { $insert_sth->execute( @{$row} ); } say $out "list_borrowers added to all users with order_manage"; -- 2.39.5