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

(-)a/C4/Circulation.pm (-1 / +1 lines)
Lines 3498-3504 sub SendCirculationAlert { Link Here
3498
    # LOCK TABLES is not transaction-safe and implicitly commits any active transaction before attempting to lock the tables.
3498
    # LOCK TABLES is not transaction-safe and implicitly commits any active transaction before attempting to lock the tables.
3499
    # If the LOCK/UNLOCK statements are executed from tests, the current transaction will be committed.
3499
    # If the LOCK/UNLOCK statements are executed from tests, the current transaction will be committed.
3500
    # To avoid that we need to guess if this code is execute from tests or not (yes it is a bit hacky)
3500
    # To avoid that we need to guess if this code is execute from tests or not (yes it is a bit hacky)
3501
    my $do_not_lock = ( exists $ENV{_} && $ENV{_} =~ m|prove| ) || $ENV{KOHA_NO_TABLE_LOCKS};
3501
    my $do_not_lock = ( exists $ENV{_} && $ENV{_} =~ m|prove| ) || $ENV{KOHA_TESTING};
3502
3502
3503
    for my $mtt (@transports) {
3503
    for my $mtt (@transports) {
3504
        my $letter =  C4::Letters::GetPreparedLetter (
3504
        my $letter =  C4::Letters::GetPreparedLetter (
(-)a/Koha/Database.pm (-3 / +9 lines)
Lines 76-82 sub _new_schema { Link Here
76
        %encoding_attr = ( mysql_enable_utf8 => 1 );
76
        %encoding_attr = ( mysql_enable_utf8 => 1 );
77
        $encoding_query = "set NAMES 'utf8mb4'";
77
        $encoding_query = "set NAMES 'utf8mb4'";
78
        $tz_query = qq(SET time_zone = "$tz") if $tz;
78
        $tz_query = qq(SET time_zone = "$tz") if $tz;
79
        if ( ( exists $ENV{_} && $ENV{_} =~ m|prove| ) or C4::Context->config('strict_sql_modes') ) {
79
        if (   C4::Context->config('strict_sql_modes')
80
            || ( exists $ENV{_} && $ENV{_} =~ m|prove| )
81
            || $ENV{KOHA_TESTING}
82
        ) {
80
            $sql_mode_query = q{SET sql_mode = 'ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION'};
83
            $sql_mode_query = q{SET sql_mode = 'ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION'};
81
        } else {
84
        } else {
82
            $sql_mode_query = q{SET sql_mode = 'IGNORE_SPACE,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION'};
85
            $sql_mode_query = q{SET sql_mode = 'IGNORE_SPACE,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION'};
Lines 87-93 sub _new_schema { Link Here
87
        $tz_query = qq(SET TIME ZONE = "$tz") if $tz;
90
        $tz_query = qq(SET TIME ZONE = "$tz") if $tz;
88
    }
91
    }
89
92
90
    my $RaiseError = ( $ENV{DEBUG} || exists $ENV{_} && $ENV{_} =~ m|prove| ) ? 1 : 0;
93
    my $RaiseError = (
94
           $ENV{DEBUG}
95
        || $ENV{KOHA_TESTING}
96
        ||  exists $ENV{_} && $ENV{_} =~ m|prove|
97
    ) ? 1 : 0;
91
    my $schema = Koha::Schema->connect(
98
    my $schema = Koha::Schema->connect(
92
        {
99
        {
93
            dsn => "dbi:$db_driver:database=$db_name;host=$db_host;port=$db_port".($tls_options? $tls_options : ""),
100
            dsn => "dbi:$db_driver:database=$db_name;host=$db_host;port=$db_port".($tls_options? $tls_options : ""),
94
- 

Return to bug 25018