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

(-)a/C4/Installer.pm (-12 / +6 lines)
Lines 20-27 package C4::Installer; Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Encode qw( encode is_utf8 );
22
use Encode qw( encode is_utf8 );
23
use File::Slurp;
23
use DBIx::RunSQL;
24
use SQL::SplitStatement;
25
use C4::Context;
24
use C4::Context;
26
use C4::Installer::PerlModules;
25
use C4::Installer::PerlModules;
27
use DBI;
26
use DBI;
Lines 435-451 sub load_sql { Link Here
435
434
436
    my $dbh = $self->{ dbh };
435
    my $dbh = $self->{ dbh };
437
436
438
    my $sql = read_file( $filename, binmode => ':utf8');
437
    my $error = DBIx::RunSQL->run_sql_file(
439
    my $sql_splitter = SQL::SplitStatement->new;
438
        dbh     => $dbh,
440
    my @statements = $sql_splitter->split($sql);
439
        sql     => $filename,
441
    my $error = "";
440
    );
442
441
443
    foreach my $statement ( @statements ) {
442
    $error = ( $error ) ? "ERROR: $filename" : "";
444
        $dbh->do($statement);
445
        if( $dbh->err) {
446
            $error .= "$filename (" . $dbh->errstr . "): $statement\n";
447
        }
448
    }
449
443
450
    return $error;
444
    return $error;
451
}
445
}
(-)a/installer/data/mysql/en/optional/marc21_holdings_coded_values.sql (-2 / +2 lines)
Lines 3-9 Link Here
3
-- Refer to http://www.niso.org/standards/index.html
3
-- Refer to http://www.niso.org/standards/index.html
4
4
5
-- General Holdings: Type of Unit Designator
5
-- General Holdings: Type of Unit Designator
6
INSERT INTO `authorised_values` (category, authorised_value, lib) VALUES ('HINGS_UT','0','Information not available; Not applicable');INSERT INTO `authorised_values` (category, authorised_value, lib) VALUES ('HINGS_UT','a','Basic bibliographic unit');
6
INSERT INTO `authorised_values` (category, authorised_value, lib) VALUES ('HINGS_UT','0','Information not available; Not applicable');
7
INSERT INTO `authorised_values` (category, authorised_value, lib) VALUES ('HINGS_UT','a','Basic bibliographic unit');
7
INSERT INTO `authorised_values` (category, authorised_value, lib) VALUES ('HINGS_UT','c','Secondary bibliographic unit: supplements, special issues, accompanying material, other secondary bibliographic units');
8
INSERT INTO `authorised_values` (category, authorised_value, lib) VALUES ('HINGS_UT','c','Secondary bibliographic unit: supplements, special issues, accompanying material, other secondary bibliographic units');
8
INSERT INTO `authorised_values` (category, authorised_value, lib) VALUES ('HINGS_UT','d','Indexes');
9
INSERT INTO `authorised_values` (category, authorised_value, lib) VALUES ('HINGS_UT','d','Indexes');
9
10
10
- 

Return to bug 13669