mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-14 18:37:58 +00:00
Update DB.php
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user