Update DB.php

This commit is contained in:
t-tomek
2022-12-21 16:31:39 +01:00
committed by GitHub
parent 87a109d0e9
commit 15f9e397dd

View File

@@ -43,7 +43,7 @@ class DB
$sMsg = 'Failed to establish database connection:' . $e->getMessage(); $sMsg = 'Failed to establish database connection:' . $e->getMessage();
throw new \Nominatim\DatabaseError($sMsg, 500, null, $e->getMessage()); throw new \Nominatim\DatabaseError($sMsg, 500, null, $e->getMessage());
} }
$this->connection->exec("SET DateStyle TO 'sql,european'"); $this->connection->exec("SET DateStyle TO 'sql,european'");
$this->connection->exec("SET client_encoding TO 'utf-8'"); $this->connection->exec("SET client_encoding TO 'utf-8'");
// Disable JIT and parallel workers. They interfere badly with search SQL. // Disable JIT and parallel workers. They interfere badly with search SQL.
@@ -59,7 +59,7 @@ class DB
if ($iMaxExecution > 0) { if ($iMaxExecution > 0) {
$conn->setAttribute(\PDO::ATTR_TIMEOUT, $iMaxExecution); // seconds $conn->setAttribute(\PDO::ATTR_TIMEOUT, $iMaxExecution); // seconds
} }
return true; return true;
} }