22386 $DBversion = '20.05.03.001'; 22387 if( CheckVersion( $DBversion ) ) { 22388 $dbh->do(q{ 22389 INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES 22390 ('DefaultLongOverdueSkipLostStatuses', '', NULL, 'Skip these lost statuses by default in longoverdue.pl', 'Free'), 22391 }); 22392 22393 NewVersion( $DBversion, 25958, "Allow LongOverdue cron to exclude specified lost values"); 22394 }
The comma 'Free'), here should not be. See email to the mailing list: https://lists.katipo.co.nz/pipermail/koha/2020-September/055204.html
Lucas, can you fix this ASAP please? Then Mason, can you roll a v20.05.04-2 with this patch?
Thx, I didn't notice I left this on enhancement.
Created attachment 110876 [details] [review] Bug 26548: Fix typo in updatedatabase Test plan: 1. On 20.05.x run updatedatbase and see an error 2. Apply patch 3. Re-run updatedatabase without an error https://bugs.koha-community.org/show_bug.cgi?id=25958
I had a go at testing, but updatedatabase didn't generate any error on 20.05.x for me.
I see the error when upgrading from 19.11 : DBD::mysql::db do failed: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1 [for Statement " INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES ('DefaultLongOverdueSkipLostStatuses', '', NULL, 'Skip these lost statuses by default in longoverdue.pl', 'Free'), "] at ./src/installer/data/mysql/updatedatabase.pl line 22388.
(In reply to Fridolin SOMERS from comment #6) > I see the error when upgrading from 19.11 : > > DBD::mysql::db do failed: You have an error in your SQL syntax; check the > manual that corresponds to your MariaDB server version for the right syntax > to use near '' at line 1 [for Statement " > INSERT IGNORE INTO systempreferences ( `variable`, `value`, > `options`, `explanation`, `type` ) VALUES > ('DefaultLongOverdueSkipLostStatuses', '', NULL, 'Skip these lost > statuses by default in longoverdue.pl', 'Free'), > "] at ./src/installer/data/mysql/updatedatabase.pl line 22388. By changing in installer/data/mysql/updatedatabase.pl : - local $dbh->{RaiseError} = 0; + local $dbh->{RaiseError} = 1;
Created attachment 110887 [details] [review] Bug 26548: Fix typo in updatedatabase Test plan: 1. On 20.05.x run updatedatbase and see an error 2. Apply patch 3. Re-run updatedatabase without an error https://bugs.koha-community.org/show_bug.cgi?id=25958 Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Commit in master in indeed OK : git show 385a4cba44c5ac56d334d5ac4f8acd69d17375e9
backported to 20.05.x for 20.05.05
not required in 19.11.x