Bugzilla – Attachment 102999 Details for
Bug 22887
authorised_values is missing a unique constraint on category + authorised_value
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22887: Fix SQL syntax for MySQL 5.5
Bug-22887-Fix-SQL-syntax-for-MySQL-55.patch (text/plain), 1.18 KB, created by
Jonathan Druart
on 2020-04-15 13:05:04 UTC
(
hide
)
Description:
Bug 22887: Fix SQL syntax for MySQL 5.5
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-04-15 13:05:04 UTC
Size:
1.18 KB
patch
obsolete
>From 85699900f95ef469b8107fec7a55f92f4602aab6 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 15 Apr 2020 15:03:15 +0200 >Subject: [PATCH] Bug 22887: Fix SQL syntax for MySQL 5.5 > >This does not happen on MySQL 8 or latest MariaDB, but does on MySQL 5.5 > >"Non-grouping field 'c' is used in HAVING clause" >--- > installer/data/mysql/updatedatabase.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index 4590eadc01..eac7f132b8 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -21577,7 +21577,7 @@ if( CheckVersion( $DBversion ) ) { > SELECT category, authorised_value, COUNT(concat(category, ':', authorised_value)) AS c > FROM authorised_values > GROUP BY category, authorised_value >- HAVING c > 1 >+ HAVING COUNT(concat(category, ':', authorised_value)) > 1 > |, { Slice => {} }); > if ( @$duplicates ) { > push @description, "WARNING - Cannot create unique constraint on authorised_value(category, authorised_value)"; >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 22887
:
89550
|
101790
|
101791
|
101792
|
101793
|
101889
|
101890
|
101891
|
101892
|
102409
|
102410
|
102411
|
102412
|
102511
|
102876
|
102877
|
102878
|
102879
|
102880
|
102898
|
102939
| 102999 |
103000