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

(-)a/Koha/Database.pm (-3 / +4 lines)
Lines 86-98 sub _new_schema { Link Here
86
        $encoding_query = "set client_encoding = 'UTF8';";
86
        $encoding_query = "set client_encoding = 'UTF8';";
87
        $tz_query = qq(SET TIME ZONE = "$tz") if $tz;
87
        $tz_query = qq(SET TIME ZONE = "$tz") if $tz;
88
    }
88
    }
89
90
    my $RaiseError = ( $ENV{DEBUG} || exists $ENV{_} && $ENV{_} =~ m|prove| ) ? 1 : 0;
89
    my $schema = Koha::Schema->connect(
91
    my $schema = Koha::Schema->connect(
90
        {
92
        {
91
            dsn => "dbi:$db_driver:database=$db_name;host=$db_host;port=$db_port".($tls_options? $tls_options : ""),
93
            dsn => "dbi:$db_driver:database=$db_name;host=$db_host;port=$db_port".($tls_options? $tls_options : ""),
92
            user => $db_user,
94
            user => $db_user,
93
            password => $db_passwd,
95
            password => $db_passwd,
94
            %encoding_attr,
96
            %encoding_attr,
95
            RaiseError => $ENV{DEBUG} ? 1 : 0,
97
            RaiseError => $RaiseError,
96
            PrintError => 1,
98
            PrintError => 1,
97
            unsafe => 1,
99
            unsafe => 1,
98
            quote_names => 1,
100
            quote_names => 1,
Lines 114-120 sub _new_schema { Link Here
114
        $dbh->do(q|
116
        $dbh->do(q|
115
            SELECT * FROM systempreferences WHERE 1 = 0 |
117
            SELECT * FROM systempreferences WHERE 1 = 0 |
116
        );
118
        );
117
        $dbh->{RaiseError} = $ENV{DEBUG} ? 1 : 0;
119
        $dbh->{RaiseError} = $RaiseError
118
    };
120
    };
119
    $dbh->{RaiseError} = 0 if $@;
121
    $dbh->{RaiseError} = 0 if $@;
120
122
121
- 

Return to bug 22001