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

(-)a/C4/Reports/Guided.pm (+13 lines)
Lines 608-613 sub execute_query { Link Here
608
    my $dbh = C4::Context->dbh;
608
    my $dbh = C4::Context->dbh;
609
609
610
    $dbh->do( 'UPDATE saved_sql SET last_run = NOW() WHERE id = ?', undef, $report_id ) if $report_id;
610
    $dbh->do( 'UPDATE saved_sql SET last_run = NOW() WHERE id = ?', undef, $report_id ) if $report_id;
611
    if (C4::Context->config('report_sql_max_statement_time') or C4::Context->config('report_sql_max_join_size') ) {
612
        my $sql_limit = "SET STATEMENT ";
613
        my $timeout = 0;
614
        if (C4::Context->config('report_sql_max_statement_time')) {
615
           $sql_limit .= "MAX_STATEMENT_TIME=" . C4::Context->config('report_sql_max_statement_time');
616
           $timeout = 1;
617
        }
618
        if (C4::Context->config('report_sql_max_join_size')) {
619
           $sql_limit .= "," if $timeout;
620
           $sql_limit .= "MAX_JOIN_SIZE=". C4::Context->config('report_sql_max_join_size');
621
        }
622
        $sql = $sql_limit . " FOR " . $sql;
623
    }
611
624
612
    my $sth = $dbh->prepare($sql);
625
    my $sth = $dbh->prepare($sql);
613
    eval {
626
    eval {
(-)a/debian/templates/koha-conf-site.xml.in (-1 / +8 lines)
Lines 260-265 __END_SRU_PUBLICSERVER__ Link Here
260
 <ca>__DB_TLS_CA_CERTIFICATE__</ca>
260
 <ca>__DB_TLS_CA_CERTIFICATE__</ca>
261
 <cert>__DB_TLS_CLIENT_CERTIFICATE__</cert>
261
 <cert>__DB_TLS_CLIENT_CERTIFICATE__</cert>
262
 <key>__DB_TLS_CLIENT_KEY__</key>
262
 <key>__DB_TLS_CLIENT_KEY__</key>
263
264
 <!-- default report max sql statement time is infinite. mariaDB in second
265
      milli second for mysql -->
266
 <! -- <report_sql_max_statement_time>300</<report_sql_max_statement_time> -->
267
268
 <!-- default report max sql join size is infinite. -->
269
 <! -- <report_sql_max_join_size>10000000</<report_sql_max_join_size> -->
270
263
 <biblioserver>biblios</biblioserver>
271
 <biblioserver>biblios</biblioserver>
264
 <biblioservershadow>1</biblioservershadow>
272
 <biblioservershadow>1</biblioservershadow>
265
 <authorityserver>authorities</authorityserver>
273
 <authorityserver>authorities</authorityserver>
266
- 

Return to bug 33116