mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-23 22:04:25 +02:00
IdoQuery: Use a dynamic collation when joining custom variables
refs #2508
This commit is contained in:
parent
c3b19996f8
commit
4ec783b75e
@ -106,8 +106,7 @@ abstract class IdoQuery extends DbQuery
|
|||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
private $customVarsJoinTemplate =
|
private $customVarsJoinTemplate = '%1$s = %2$s.object_id AND %2$s.varname = %3$s';
|
||||||
'%1$s = %2$s.object_id AND %2$s.varname = %3$s COLLATE latin1_general_ci';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An array with all 'virtual' tables that are already joined
|
* An array with all 'virtual' tables that are already joined
|
||||||
@ -701,6 +700,9 @@ abstract class IdoQuery extends DbQuery
|
|||||||
$this->initializeForOracle();
|
$this->initializeForOracle();
|
||||||
} elseif ($dbType === 'pgsql') {
|
} elseif ($dbType === 'pgsql') {
|
||||||
$this->initializeForPostgres();
|
$this->initializeForPostgres();
|
||||||
|
} else {
|
||||||
|
$charset = $this->ds->getConfig()->get('charset') ?: 'latin1';
|
||||||
|
$this->customVarsJoinTemplate .= " COLLATE {$charset}_general_ci";
|
||||||
}
|
}
|
||||||
$this->joinBaseTables();
|
$this->joinBaseTables();
|
||||||
$this->select->columns($this->columns);
|
$this->select->columns($this->columns);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user