Bugzilla – Attachment 45066 Details for
Bug 15207
Error on upgrade from 3.20.5 to 3.22 beta
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15207: Follow-up - change check for existing index
Bug-15207-Follow-up---change-check-for-existing-in.patch (text/plain), 1.38 KB, created by
Katrin Fischer
on 2015-11-21 11:44:05 UTC
(
hide
)
Description:
Bug 15207: Follow-up - change check for existing index
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2015-11-21 11:44:05 UTC
Size:
1.38 KB
patch
obsolete
>From 939b9c67f99776eff72f8f18cac29f0c73662f6d Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <Katrin.Fischer.83@web.de> >Date: Sat, 21 Nov 2015 12:42:00 +0100 >Subject: [PATCH] Bug 15207: Follow-up - change check for existing index > >--- > installer/data/mysql/updatedatabase.pl | 11 ++++------- > 1 file changed, 4 insertions(+), 7 deletions(-) > >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index c97dee2..9a9ea1a 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -10802,15 +10802,12 @@ if ( CheckVersion($DBversion) ) { > WHERE course_items.ci_id IS NULL > }); > my $dbconfigured = C4::Context->config("database"); >- my $count_course_reserves_ibfk_2 = $dbh->selectrow_arrayref(qq| >- SELECT COUNT(*) >- FROM information_schema.table_constraints >- WHERE table_schema = '$dbconfigured' >- AND table_name = 'course_reserves' >- AND CONSTRAINT_NAME = 'course_reserves_ibfk_2' >+ my @row; >+ @row = $dbh->selectrow_arrayref(qq| >+ SHOW INDEXES FROM course_reserves WHERE key_name='course_reserves_ibfk_2' > |); > #Add fk only if not present >- if ( $count_course_reserves_ibfk_2-->[0] == 0) { >+ unless ( @row ) { > $dbh->do(q{ > ALTER IGNORE TABLE course_reserves > add CONSTRAINT course_reserves_ibfk_2 >-- >1.9.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 15207
:
44960
|
44970
|
45021
|
45029
|
45032
|
45066
|
45067
|
45068
|
45113
|
45138
|
45140
|
45142