Db: fix checksum collisions for Postgres tests
This commit is contained in:
parent
4e677dbc56
commit
3d4052fa0c
|
@ -240,11 +240,11 @@ class Db extends DbConnection
|
||||||
{
|
{
|
||||||
if ($this->isPgsql()) {
|
if ($this->isPgsql()) {
|
||||||
$select = "SELECT checksum FROM (SELECT * FROM (SELECT 1 AS pos, LOWER(ENCODE(checksum, 'hex')) AS checksum"
|
$select = "SELECT checksum FROM (SELECT * FROM (SELECT 1 AS pos, LOWER(ENCODE(checksum, 'hex')) AS checksum"
|
||||||
. " FROM director_activity_log ORDER BY change_time DESC LIMIT 1) a"
|
. " FROM director_activity_log ORDER BY id DESC LIMIT 1) a"
|
||||||
. " UNION SELECT 2 AS pos, '' AS checksum) u ORDER BY pos LIMIT 1";
|
. " UNION SELECT 2 AS pos, '' AS checksum) u ORDER BY pos LIMIT 1";
|
||||||
} else {
|
} else {
|
||||||
$select = "SELECT checksum FROM (SELECT * FROM (SELECT 1 AS pos, LOWER(HEX(checksum)) AS checksum"
|
$select = "SELECT checksum FROM (SELECT * FROM (SELECT 1 AS pos, LOWER(HEX(checksum)) AS checksum"
|
||||||
. " FROM director_activity_log ORDER BY change_time DESC LIMIT 1) a"
|
. " FROM director_activity_log ORDER BY id DESC LIMIT 1) a"
|
||||||
. " UNION SELECT 2 AS pos, '' AS checksum) u ORDER BY pos LIMIT 1";
|
. " UNION SELECT 2 AS pos, '' AS checksum) u ORDER BY pos LIMIT 1";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue