From 79fa6ec68a45a7112cbae763458381f9c53835c6 Mon Sep 17 00:00:00 2001 From: Brendan A Gallagher Date: Thu, 31 Mar 2016 19:56:00 +0000 Subject: [PATCH] DBrev Bug 16070 - Empty (undef) system preferences may cause some issues in combination with memcache Signed-off-by: Brendan A Gallagher --- Koha.pm | 2 +- installer/data/mysql/atomicupdate/bug_16070.sql | 1 - installer/data/mysql/updatedatabase.pl | 10 ++++++++++ 3 files changed, 11 insertions(+), 2 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_16070.sql diff --git a/Koha.pm b/Koha.pm index fc86716378..54d28d6203 100644 --- a/Koha.pm +++ b/Koha.pm @@ -29,7 +29,7 @@ use vars qw{ $VERSION }; # - #4 : the developer version. The 4th number is the database subversion. # used by developers when the database changes. updatedatabase take care of the changes itself # and is automatically called by Auth.pm when needed. -$VERSION = "3.23.00.042"; +$VERSION = "3.23.00.043"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/bug_16070.sql b/installer/data/mysql/atomicupdate/bug_16070.sql deleted file mode 100644 index f02ee5e8dc..0000000000 --- a/installer/data/mysql/atomicupdate/bug_16070.sql +++ /dev/null @@ -1 +0,0 @@ -UPDATE systempreferences SET value="" WHERE value IS NULL; diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 1ef9a9b0bd..ff0ff94e56 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -12064,6 +12064,16 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { SetVersion($DBversion); } +$DBversion = "3.23.00.043"; +if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { + $dbh->do(q{ + UPDATE systempreferences SET value="" WHERE value IS NULL; + }); + + print "Upgrade to $DBversion done (Bug 16070 - Empty (undef) system preferences may cause some issues in combination with memcache)\n"; + SetVersion($DBversion); +} + # DEVELOPER PROCESS, search for anything to execute in the db_update directory # SEE bug 13068 -- 2.39.5