Bugzilla – Attachment 34960 Details for
Bug 13068
New feature for DB update and sandbox
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13068: Raise an error if a pl script has a sql error
Bug-13068-Raise-an-error-if-a-pl-script-has-a-sql-.patch (text/plain), 1.10 KB, created by
Jonathan Druart
on 2015-01-05 16:04:29 UTC
(
hide
)
Description:
Bug 13068: Raise an error if a pl script has a sql error
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2015-01-05 16:04:29 UTC
Size:
1.10 KB
patch
obsolete
>From 12076d4206cd497c74fb5d6483b785cdb19774ed Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Mon, 5 Jan 2015 17:03:23 +0100 >Subject: [PATCH] Bug 13068: Raise an error if a pl script has a sql error > >--- > installer/data/mysql/updatedatabase.pl | 3 +++ > 1 file changed, 3 insertions(+) > >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index 08cb721..31b37dc 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -9732,12 +9732,15 @@ sub ExecDBRev { > $rv = 1; > } elsif( $file =~ /\.pl$/ ) { > #Run perl script >+ my $dbh = C4::Context->dbh; >+ $dbh->{RaiseError} = 1; > $rv = do $atomicupd->{location}. "/$file"; > if( !$rv ) { > print "ERROR: $@\n" if $@; > print "ERROR: $!\n" if $! && !$@; > $rv = 1 if !$! && !$@; #apparently, the file does not end with 1; > } >+ $dbh->{RaiseError} = 0; > } elsif( $file =~ /\.sql$/ ) { > #Run sql file via installer > my $installer = C4::Installer->new(); >-- >2.1.0
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 13068
:
32173
|
32174
|
32175
|
32177
|
32178
|
32179
|
32180
|
32185
|
32294
|
32300
|
32398
|
32399
|
32525
|
32526
|
32658
|
32659
|
32784
|
32785
|
32839
|
32840
|
32841
|
32842
|
32843
|
32919
|
32921
|
33859
|
34070
|
34071
|
34072
|
34949
|
34950
|
34951
|
34960
|
34998
|
35000
|
35001
|
35002
|
35003
|
35366
|
35367
|
35368
|
35370
|
36716
|
36717
|
36718
|
36719
|
36779
|
36780
|
36781
|
36792
|
37061
|
37062
|
37063
|
37064
|
37065
|
37066
|
37075
|
37076
|
37491