@@ -, +, @@ - Remove that for dev installations (to let developers catch these bugs) - Edit the wiki page to remove this step --- Koha/Database.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/Koha/Database.pm +++ a/Koha/Database.pm @@ -69,12 +69,13 @@ sub _new_schema { - my ( %encoding_attr, $encoding_query, $tz_query ); + my ( %encoding_attr, $encoding_query, $tz_query, $sql_mode_query ); my $tz = $ENV{TZ}; if ( $db_driver eq 'mysql' ) { %encoding_attr = ( mysql_enable_utf8 => 1 ); $encoding_query = "set NAMES 'utf8'"; $tz_query = qq(SET time_zone = "$tz") if $tz; + $sql_mode_query = q{SET sql_mode = 'IGNORE_SPACE,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'}; } elsif ( $db_driver eq 'Pg' ) { $encoding_query = "set client_encoding = 'UTF8';"; @@ -93,6 +94,7 @@ sub _new_schema { on_connect_do => [ $encoding_query || (), $tz_query || (), + $sql_mode_query || (), ] } ); --