From 72cc96c1ebc2ff84d69266c3206dbeb3f88ebcac Mon Sep 17 00:00:00 2001 From: Chris Nighswonger Date: Wed, 12 May 2010 08:00:50 -0400 Subject: [PATCH] Bug 4141 Reconcile 3.0.x and HEAD database updates for 3.2.0 This is a partial fix addressing this error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 at /home/koha/koha.prod/installer/data/mysql/updatedatabase.pl line 2916., referer: http://koha-staff.foobar.org/cgi-bin/koha/installer/install.pl If there are no records in aqbudgets the result is an empty array which causes the sql to attempt to set AUTOINCREMENT to null. This patch is being submitted on behalf of the Mapua Community Library. Signed-off-by: Galen Charlton --- installer/data/mysql/updatedatabase.pl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 89b8c0f045..53fec36aa3 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -2913,6 +2913,8 @@ BUDGETNAME SELECT MAX(aqbudgetid) from aqbudgets IDsBUDGET +$$maxbudgetid[0] = 0 if !$$maxbudgetid[0]; + $dbh->do(<