From 7a62fc2b2a180ce6748adfe32aad33065a955f16 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 4 Mar 2015 12:26:34 +0100 Subject: [PATCH] Bug 5338: Use insert ignore to avoid a warning if 'SER' already exists Signed-off-by: Katrin Fischer --- installer/data/mysql/updatedatabase.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 34d8f63fc9..2f51063ace 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -10448,11 +10448,11 @@ if ( CheckVersion($DBversion) ) { $DBversion = "3.19.00.XXX"; if ( CheckVersion($DBversion) ) { $dbh->do(q| - INSERT INTO authorised_values (category, authorised_value, lib) VALUES + INSERT IGNORE INTO authorised_values (category, authorised_value, lib) VALUES ('REPORT_GROUP', 'SER', 'Serials') |); - print "Upgrade to $DBversion done (Bug 5338 - Add Serial to the report groups)\n"; + print "Upgrade to $DBversion done (Bug 5338 - Add Serial to the report groups if does not exist)\n"; SetVersion ($DBversion); } -- 2.39.5