From 1378a08d9aa56c48f5686039644b43e34d385fc5 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 Amended during signoff: Corrected atomicupdate file extension from .pl to .perl. Signed-off-by: Owen Leonard --- installer/data/mysql/atomicupdate/bug_25220.perl | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/bug_25220.perl diff --git a/installer/data/mysql/atomicupdate/bug_25220.perl b/installer/data/mysql/atomicupdate/bug_25220.perl new file mode 100644 index 0000000000..b357637e65 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_25220.perl @@ -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