Bugzilla – Attachment 145380 Details for
Bug 28267
Older databases fail to upgrade due to having a row format other than "DYNAMIC"
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28267: Add warning on about.pl for database row formats
Bug-28267-Add-warning-on-aboutpl-for-database-row-.patch (text/plain), 4.71 KB, created by
David Cook
on 2023-01-18 03:25:57 UTC
(
hide
)
Description:
Bug 28267: Add warning on about.pl for database row formats
Filename:
MIME Type:
Creator:
David Cook
Created:
2023-01-18 03:25:57 UTC
Size:
4.71 KB
patch
obsolete
>From 808bc4c370bda34852b0f89b871b1b6d2a0b8871 Mon Sep 17 00:00:00 2001 >From: David Cook <dcook@prosentient.com.au> >Date: Wed, 18 Jan 2023 03:20:29 +0000 >Subject: [PATCH] Bug 28267: Add warning on about.pl for database row formats > >This patch adds a warning on about.pl regarding database row formats >other than "DYNAMIC". It points to the Koha community wiki for more >information on how to resolve the problem. > >Test plan: >0. Apply the patch >1a. koha-mysql kohadev >1b. ALTER TABLE tags ROW_FORMAT=COMPACT; >2. Go to http://localhost:8081/cgi-bin/koha/about.pl >3. Note that there is a warning about database row formats >4a. koha-mysql kohadev >4b. ALTER TABLE tags ROW_FORMAT=DYNAMIC; >5. Go to http://localhost:8081/cgi-bin/koha/about.pl >6. Note that there is no warning about database row formats > >Note: Due to bug 32665 you'll see an unrelated warning on >step 3 >--- > about.pl | 22 +++++++++++++++++++ > .../intranet-tmpl/prog/en/modules/about.tt | 10 ++++++++- > 2 files changed, 31 insertions(+), 1 deletion(-) > >diff --git a/about.pl b/about.pl >index f4d1c7a959..2719ab076c 100755 >--- a/about.pl >+++ b/about.pl >@@ -621,6 +621,28 @@ $template->param( 'bad_yaml_prefs' => \@bad_yaml_prefs ) if @bad_yaml_prefs; > } > } > >+#BZ 28267: Warn administrators if there are database rows with a format other than 'DYNAMIC' >+{ >+ my $database = C4::Context->config('database'); >+ if ($database){ >+ my $dbh = C4::Context->dbh; >+ my $sql = q# >+ SELECT count(table_name) >+ FROM information_schema.tables >+ WHERE >+ table_schema = ? >+ AND row_format != "Dynamic" >+ #; >+ my $sth = $dbh->prepare($sql); >+ $sth->execute($database); >+ my $row = $sth->fetchrow_arrayref; >+ my $count = $row->[0]; >+ if ($count){ >+ $template->param( warnDbRowFormat => $count ); >+ } >+ } >+} >+ > my %versions = C4::Context::get_versions(); > > $template->param( >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt >index 5b7834a434..54e68b5b87 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt >@@ -219,7 +219,15 @@ > </div> > > <div role="tabpanel" class="tab-pane" id="sysinfo"> >- [% IF warnRequireChoosingExistingAuthority || warnPrefEasyAnalyticalRecords || warnPrefAnonymousPatronOPACPrivacy || warnPrefAnonymousPatronAnonSuggestions || warnPrefAnonymousPatronOPACPrivacy_PatronDoesNotExist || warnPrefAnonymousPatronAnonSuggestions_PatronDoesNotExist || warnPrefKohaAdminEmailAddress || warnPrefOpacHiddenItems || invalid_yesno.count || warnNoActiveCurrency || warnIsRootUser || xml_config_warnings.size || AutoSelfCheckPatronDoesNotHaveSelfCheckPerm || AutoSelfCheckPatronHasTooManyPerm || warnStatisticsFieldsError || warnNoTemplateCaching || warnILLConfiguration || has_ai_issues || oauth2_missing_deps || bad_yaml_prefs || warnRelationships || log4perl_errors || config_bcrypt_settings_no_set || warnHiddenBiblionumbers.size || warnConnectBroker || elasticsearch_has_missing %] >+ [% IF warnRequireChoosingExistingAuthority || warnPrefEasyAnalyticalRecords || warnPrefAnonymousPatronOPACPrivacy || warnPrefAnonymousPatronAnonSuggestions || warnPrefAnonymousPatronOPACPrivacy_PatronDoesNotExist || warnPrefAnonymousPatronAnonSuggestions_PatronDoesNotExist || warnPrefKohaAdminEmailAddress || warnPrefOpacHiddenItems || invalid_yesno.count || warnNoActiveCurrency || warnIsRootUser || xml_config_warnings.size || AutoSelfCheckPatronDoesNotHaveSelfCheckPerm || AutoSelfCheckPatronHasTooManyPerm || warnStatisticsFieldsError || warnNoTemplateCaching || warnILLConfiguration || has_ai_issues || oauth2_missing_deps || bad_yaml_prefs || warnRelationships || log4perl_errors || config_bcrypt_settings_no_set || warnHiddenBiblionumbers.size || warnConnectBroker || elasticsearch_has_missing || warnDbRowFormat %] >+ [% IF ( warnDbRowFormat ) %] >+ <h2>Database row format incorrect</h2> >+ <p>There are [% warnDbRowFormat %] database tables with a row format other than 'DYNAMIC'. You may experience problems upgrading to newer versions of Koha unless you update the row format for your database tables.</p> >+ <p>To know how to avoid this problem see the related wiki page: >+ <a href="https://wiki.koha-community.org/wiki/Database_row_format">Database row format</a> >+ </p> >+ [% END %] >+ > [% IF (warnIsRootUser) %] > <h2>Warning regarding current user</h2> > <p>You are logged in as the database administrative user. This is not recommended because some parts of Koha will not function as expected when using this account.</p> >-- >2.30.2
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 28267
:
121103
|
145380
|
145386
|
145390
|
145507
|
150627
|
150628
|
150645
|
150646
|
154481
|
154482