Bugzilla – Attachment 55833 Details for
Bug 17234
ALTER IGNORE TABLE is invalid in mysql 5.7. This breaks updatedatabase.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17234: Move new subroutines to C4::Installer
Bug-17234-Move-new-subroutines-to-C4Installer.patch (text/plain), 2.26 KB, created by
Jonathan Druart
on 2016-09-27 07:28:45 UTC
(
hide
)
Description:
Bug 17234: Move new subroutines to C4::Installer
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2016-09-27 07:28:45 UTC
Size:
2.26 KB
patch
obsolete
>From 34f6ba77c9af8c441b16ec0c9ecbe99cb189747f Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 27 Sep 2016 08:28:09 +0100 >Subject: [PATCH] Bug 17234: Move new subroutines to C4::Installer > >--- > C4/Installer.pm | 30 ++++++++++++++++++++++++++++++ > installer/data/mysql/updatedatabase.pl | 25 ------------------------- > 2 files changed, 30 insertions(+), 25 deletions(-) > >diff --git a/C4/Installer.pm b/C4/Installer.pm >index f5af971..4828462 100644 >--- a/C4/Installer.pm >+++ b/C4/Installer.pm >@@ -26,6 +26,13 @@ use C4::Installer::PerlModules; > use DBI; > use Koha; > >+use vars qw(@ISA @EXPORT); >+BEGIN { >+ require Exporter; >+ @ISA = qw( Exporter ); >+ push @EXPORT, qw( constraint_exists column_exists ); >+}; >+ > =head1 NAME > > C4::Installer >@@ -488,6 +495,29 @@ sub get_file_path_from_name { > > } > >+sub constraint_exists { >+ my ( $table_name, $key_name ) = @_; >+ my $dbh = C4::Context->dbh; >+ my ($exists) = $dbh->selectrow_array( >+ qq| >+ SHOW INDEX FROM $table_name >+ WHERE key_name = ? >+ |, undef, $key_name >+ ); >+ return $exists; >+} >+ >+sub column_exists { >+ my ( $table_name, $column_name ) = @_; >+ my $dbh = C4::Context->dbh; >+ my ($exists) = $dbh->selectrow_array( >+ qq| >+ SHOW COLUMNS FROM $table_name >+ WHERE Field = ? >+ |, undef, $column_name >+ ); >+ return $exists; >+} > > =head1 AUTHOR > >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index afb199f..d8b6475 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -13192,29 +13192,4 @@ sub CheckVersion { > } > } > >-sub constraint_exists { >- my ( $table_name, $key_name ) = @_; >- my $dbh = C4::Context->dbh; >- my ($exists) = $dbh->selectrow_array( >- qq| >- SHOW INDEX FROM $table_name >- WHERE key_name = ? >- |, undef, $key_name >- ); >- return $exists; >-} >- >-sub column_exists { >- my ( $table_name, $column_name ) = @_; >- my $dbh = C4::Context->dbh; >- my ($exists) = $dbh->selectrow_array( >- qq| >- SHOW COLUMNS FROM $table_name >- WHERE Field = ? >- |, undef, $column_name >- ); >- return $exists; >- >-} >- > exit; >-- >2.8.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 17234
:
55113
|
55144
|
55634
|
55635
|
55704
|
55722
|
55729
|
55833
|
56820
|
56821
|
56822
|
56823
|
56824
|
56825
|
58548
|
58551
|
58552
|
58865
|
59003