View | Details | Raw Unified | Return to bug 13068
Collapse All | Expand All

(-)a/installer/data/mysql/updatedatabase.pl (-5 / +8 lines)
Lines 9732-9743 sub ExecDBRev { Link Here
9732
        $rv = 1;
9732
        $rv = 1;
9733
    } elsif( $file =~ /\.pl$/ ) {
9733
    } elsif( $file =~ /\.pl$/ ) {
9734
    #Run perl script
9734
    #Run perl script
9735
        my $dbh = C4::Context->dbh;
9736
        $dbh->{RaiseError} = 1;
9735
        $rv = do $atomicupd->{location}. "/$file";
9737
        $rv = do $atomicupd->{location}. "/$file";
9736
        if( !$rv ) {
9738
        if( !$rv ) {
9737
            print "ERROR: $@\n" if $@;
9739
            my $msg= $@? "ERROR: $@": ($!? "ERROR: $!\n": '');
9738
            print "ERROR: $!\n" if $! && !$@;
9740
            chomp $msg;
9739
            $rv = 1 if !$! && !$@; #apparently, the file does not end with 1;
9741
            print "$msg\n" if $msg;
9742
            $rv = 1 if !$msg; #apparently, the file does not end with 1;
9740
        }
9743
        }
9744
        $dbh->{RaiseError} = 0;
9741
    } elsif( $file =~ /\.sql$/ ) {
9745
    } elsif( $file =~ /\.sql$/ ) {
9742
    #Run sql file via installer
9746
    #Run sql file via installer
9743
        my $installer = C4::Installer->new();
9747
        my $installer = C4::Installer->new();
Lines 9749-9755 sub ExecDBRev { Link Here
9749
    }
9753
    }
9750
9754
9751
    if( $devrun ) {
9755
    if( $devrun ) {
9752
        print "Dev upgrade $file done\n";
9756
        print "Dev upgrade $file ".( $rv? 'done': 'failed' )."\n";
9753
        _atomic_memory( $atomicupd, $file ) if $rv;
9757
        _atomic_memory( $atomicupd, $file ) if $rv;
9754
    } else {
9758
    } else {
9755
        _atomic_memory( $atomicupd ); #Official dbrev may clear atomic pref
9759
        _atomic_memory( $atomicupd ); #Official dbrev may clear atomic pref
9756
- 

Return to bug 13068