From 4f794e4e451e6fcfcc20bd8df4d026e2c3eeae66 Mon Sep 17 00:00:00 2001 From: Andrew Fuerste-Henry Date: Tue, 21 Apr 2020 15:36:50 +0000 Subject: [PATCH] Bug 25220: atomicupdate to maintain behavior of existing installs To test: 1) on an existing install, set maxoutstanding to null 2) apply patch 3) confirm maxoutstanding is now set to zero --- installer/data/mysql/atomicupdate/bug_25220.pl | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/bug_25220.pl diff --git a/installer/data/mysql/atomicupdate/bug_25220.pl b/installer/data/mysql/atomicupdate/bug_25220.pl new file mode 100644 index 0000000000..b357637e65 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_25220.pl @@ -0,0 +1,13 @@ +$DBversion = 'XXX'; # will be replaced by the RM +if( CheckVersion( $DBversion ) ) { + # you can use $dbh here like: + $dbh->do( "UPDATE systempreferences set value=0 where variable='maxoutstanding' and (value='' or value is null)" ); + + # or perform some test and warn + # if( !column_exists( 'biblio', 'biblionumber' ) ) { + # warn "There is something wrong"; + # } + + # Always end with this (adjust the bug info) + NewVersion( $DBversion, 25220, "maxoutstanding should be disabled by a null value"); +} -- 2.11.0