Bugzilla – Attachment 51726 Details for
Bug 16572
Warnings on load_sql makes web installer fail
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16572: Warnings on load_sql makes web installer fail
Bug-16572-Warnings-on-loadsql-makes-web-installer-.patch (text/plain), 1.60 KB, created by
Bernardo Gonzalez Kriegel
on 2016-05-24 01:28:44 UTC
(
hide
)
Description:
Bug 16572: Warnings on load_sql makes web installer fail
Filename:
MIME Type:
Creator:
Bernardo Gonzalez Kriegel
Created:
2016-05-24 01:28:44 UTC
Size:
1.60 KB
patch
obsolete
>From b79970b2cf4581ec20782efc9265b1548705b8c0 Mon Sep 17 00:00:00 2001 >From: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> >Date: Mon, 23 May 2016 21:12:23 -0300 >Subject: [PATCH] Bug 16572: Warnings on load_sql makes web installer fail > >Last patch on Bug 13669 redirects all strings to stderr, >warning included. That makes web installer fail. > >To test: >Current master (Bug 13669 pushed) >1) Try web installer, it fails >2) Apply this patch, try again, >now succeeds* > >* Unless Mysql 5.7, that needs another bug. > >I'm not considering this a 'good' solution, just a quick fix. >A better approach is welcomed, just obsolete this patch >and upload a new one, I'll sign :) >--- > C4/Installer.pm | 20 +++++++------------- > 1 file changed, 7 insertions(+), 13 deletions(-) > >diff --git a/C4/Installer.pm b/C4/Installer.pm >index 1e6768e..cbb8597 100644 >--- a/C4/Installer.pm >+++ b/C4/Installer.pm >@@ -427,22 +427,16 @@ sub load_sql { > > my $dbh = $self->{ dbh }; > >- my $dup_stderr; >- do { >- local *STDERR; >- open STDERR, ">>", \$dup_stderr; >- >- eval { >- DBIx::RunSQL->run_sql_file( >- dbh => $dbh, >- sql => $filename, >- ); >- }; >+ eval { >+ DBIx::RunSQL->run_sql_file( >+ dbh => $dbh, >+ sql => $filename, >+ ); > }; > # errors thrown while loading installer data should be logged >- if( $dup_stderr ) { >+ if( $@ ) { > warn "C4::Installer::load_sql returned the following errors while attempting to load $filename:\n"; >- $error = $dup_stderr; >+ $error = $@; > > } > >-- >2.7.4
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 16572
: 51726