mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
GUACAMOLE-394: History must be LEFT JOINed when calculating last active date, or inactive connections will disappear entirely.
This commit is contained in:
@@ -103,7 +103,7 @@
|
|||||||
failover_only,
|
failover_only,
|
||||||
MAX(start_date) AS last_active
|
MAX(start_date) AS last_active
|
||||||
FROM guacamole_connection
|
FROM guacamole_connection
|
||||||
JOIN guacamole_connection_history ON guacamole_connection_history.connection_id = guacamole_connection.connection_id
|
LEFT JOIN guacamole_connection_history ON guacamole_connection_history.connection_id = guacamole_connection.connection_id
|
||||||
WHERE guacamole_connection.connection_id IN
|
WHERE guacamole_connection.connection_id IN
|
||||||
<foreach collection="identifiers" item="identifier"
|
<foreach collection="identifiers" item="identifier"
|
||||||
open="(" separator="," close=")">
|
open="(" separator="," close=")">
|
||||||
@@ -140,7 +140,7 @@
|
|||||||
MAX(start_date) AS last_active
|
MAX(start_date) AS last_active
|
||||||
FROM guacamole_connection
|
FROM guacamole_connection
|
||||||
JOIN guacamole_connection_permission ON guacamole_connection_permission.connection_id = guacamole_connection.connection_id
|
JOIN guacamole_connection_permission ON guacamole_connection_permission.connection_id = guacamole_connection.connection_id
|
||||||
JOIN guacamole_connection_history ON guacamole_connection_history.connection_id = guacamole_connection.connection_id
|
LEFT JOIN guacamole_connection_history ON guacamole_connection_history.connection_id = guacamole_connection.connection_id
|
||||||
WHERE guacamole_connection.connection_id IN
|
WHERE guacamole_connection.connection_id IN
|
||||||
<foreach collection="identifiers" item="identifier"
|
<foreach collection="identifiers" item="identifier"
|
||||||
open="(" separator="," close=")">
|
open="(" separator="," close=")">
|
||||||
@@ -180,7 +180,7 @@
|
|||||||
failover_only,
|
failover_only,
|
||||||
MAX(start_date) AS last_active
|
MAX(start_date) AS last_active
|
||||||
FROM guacamole_connection
|
FROM guacamole_connection
|
||||||
JOIN guacamole_connection_history ON guacamole_connection_history.connection_id = guacamole_connection.connection_id
|
LEFT JOIN guacamole_connection_history ON guacamole_connection_history.connection_id = guacamole_connection.connection_id
|
||||||
WHERE
|
WHERE
|
||||||
<if test="parentIdentifier != null">parent_id = #{parentIdentifier,jdbcType=VARCHAR}</if>
|
<if test="parentIdentifier != null">parent_id = #{parentIdentifier,jdbcType=VARCHAR}</if>
|
||||||
<if test="parentIdentifier == null">parent_id IS NULL</if>
|
<if test="parentIdentifier == null">parent_id IS NULL</if>
|
||||||
|
@@ -103,7 +103,7 @@
|
|||||||
failover_only,
|
failover_only,
|
||||||
MAX(start_date) AS last_active
|
MAX(start_date) AS last_active
|
||||||
FROM guacamole_connection
|
FROM guacamole_connection
|
||||||
JOIN guacamole_connection_history ON guacamole_connection_history.connection_id = guacamole_connection.connection_id
|
LEFT JOIN guacamole_connection_history ON guacamole_connection_history.connection_id = guacamole_connection.connection_id
|
||||||
WHERE guacamole_connection.connection_id IN
|
WHERE guacamole_connection.connection_id IN
|
||||||
<foreach collection="identifiers" item="identifier"
|
<foreach collection="identifiers" item="identifier"
|
||||||
open="(" separator="," close=")">
|
open="(" separator="," close=")">
|
||||||
@@ -140,7 +140,7 @@
|
|||||||
MAX(start_date) AS last_active
|
MAX(start_date) AS last_active
|
||||||
FROM guacamole_connection
|
FROM guacamole_connection
|
||||||
JOIN guacamole_connection_permission ON guacamole_connection_permission.connection_id = guacamole_connection.connection_id
|
JOIN guacamole_connection_permission ON guacamole_connection_permission.connection_id = guacamole_connection.connection_id
|
||||||
JOIN guacamole_connection_history ON guacamole_connection_history.connection_id = guacamole_connection.connection_id
|
LEFT JOIN guacamole_connection_history ON guacamole_connection_history.connection_id = guacamole_connection.connection_id
|
||||||
WHERE guacamole_connection.connection_id IN
|
WHERE guacamole_connection.connection_id IN
|
||||||
<foreach collection="identifiers" item="identifier"
|
<foreach collection="identifiers" item="identifier"
|
||||||
open="(" separator="," close=")">
|
open="(" separator="," close=")">
|
||||||
@@ -180,7 +180,7 @@
|
|||||||
failover_only,
|
failover_only,
|
||||||
MAX(start_date) AS last_active
|
MAX(start_date) AS last_active
|
||||||
FROM guacamole_connection
|
FROM guacamole_connection
|
||||||
JOIN guacamole_connection_history ON guacamole_connection_history.connection_id = guacamole_connection.connection_id
|
LEFT JOIN guacamole_connection_history ON guacamole_connection_history.connection_id = guacamole_connection.connection_id
|
||||||
WHERE
|
WHERE
|
||||||
<if test="parentIdentifier != null">parent_id = #{parentIdentifier,jdbcType=INTEGER}::integer</if>
|
<if test="parentIdentifier != null">parent_id = #{parentIdentifier,jdbcType=INTEGER}::integer</if>
|
||||||
<if test="parentIdentifier == null">parent_id IS NULL</if>
|
<if test="parentIdentifier == null">parent_id IS NULL</if>
|
||||||
|
@@ -103,7 +103,7 @@
|
|||||||
failover_only,
|
failover_only,
|
||||||
MAX(start_date) AS last_active
|
MAX(start_date) AS last_active
|
||||||
FROM [guacamole_connection]
|
FROM [guacamole_connection]
|
||||||
JOIN [guacamole_connection_history] ON [guacamole_connection_history].connection_id = [guacamole_connection].connection_id
|
LEFT JOIN [guacamole_connection_history] ON [guacamole_connection_history].connection_id = [guacamole_connection].connection_id
|
||||||
WHERE [guacamole_connection].connection_id IN
|
WHERE [guacamole_connection].connection_id IN
|
||||||
<foreach collection="identifiers" item="identifier"
|
<foreach collection="identifiers" item="identifier"
|
||||||
open="(" separator="," close=")">
|
open="(" separator="," close=")">
|
||||||
@@ -140,7 +140,7 @@
|
|||||||
MAX(start_date) AS last_active
|
MAX(start_date) AS last_active
|
||||||
FROM [guacamole_connection]
|
FROM [guacamole_connection]
|
||||||
JOIN [guacamole_connection_permission] ON [guacamole_connection_permission].connection_id = [guacamole_connection].connection_id
|
JOIN [guacamole_connection_permission] ON [guacamole_connection_permission].connection_id = [guacamole_connection].connection_id
|
||||||
JOIN [guacamole_connection_history] ON [guacamole_connection_history].connection_id = [guacamole_connection].connection_id
|
LEFT JOIN [guacamole_connection_history] ON [guacamole_connection_history].connection_id = [guacamole_connection].connection_id
|
||||||
WHERE [guacamole_connection].connection_id IN
|
WHERE [guacamole_connection].connection_id IN
|
||||||
<foreach collection="identifiers" item="identifier"
|
<foreach collection="identifiers" item="identifier"
|
||||||
open="(" separator="," close=")">
|
open="(" separator="," close=")">
|
||||||
@@ -180,7 +180,7 @@
|
|||||||
failover_only,
|
failover_only,
|
||||||
MAX(start_date) AS last_active
|
MAX(start_date) AS last_active
|
||||||
FROM [guacamole_connection]
|
FROM [guacamole_connection]
|
||||||
JOIN [guacamole_connection_history] ON [guacamole_connection_history].connection_id = [guacamole_connection].connection_id
|
LEFT JOIN [guacamole_connection_history] ON [guacamole_connection_history].connection_id = [guacamole_connection].connection_id
|
||||||
WHERE
|
WHERE
|
||||||
<if test="parentIdentifier != null">parent_id = #{parentIdentifier,jdbcType=INTEGER}</if>
|
<if test="parentIdentifier != null">parent_id = #{parentIdentifier,jdbcType=INTEGER}</if>
|
||||||
<if test="parentIdentifier == null">parent_id IS NULL</if>
|
<if test="parentIdentifier == null">parent_id IS NULL</if>
|
||||||
|
Reference in New Issue
Block a user