You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@guacamole.apache.org by mj...@apache.org on 2018/03/16 20:05:16 UTC
[1/4] guacamole-client git commit: GUACAMOLE-525: Remove LIMIT and
use TOP in SQL Server module.
Repository: guacamole-client
Updated Branches:
refs/heads/master a6579ce4e -> 4f27a03ad
GUACAMOLE-525: Remove LIMIT and use TOP in SQL Server module.
Project: http://git-wip-us.apache.org/repos/asf/guacamole-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/guacamole-client/commit/cb580c4a
Tree: http://git-wip-us.apache.org/repos/asf/guacamole-client/tree/cb580c4a
Diff: http://git-wip-us.apache.org/repos/asf/guacamole-client/diff/cb580c4a
Branch: refs/heads/master
Commit: cb580c4ae99fb8ff21618d9117aee9f22bf6e3ff
Parents: b8a5f0b
Author: Nick Couchman <vn...@apache.org>
Authored: Tue Mar 13 17:47:35 2018 -0400
Committer: Nick Couchman <vn...@apache.org>
Committed: Tue Mar 13 17:47:35 2018 -0400
----------------------------------------------------------------------
.../apache/guacamole/auth/jdbc/user/PasswordRecordMapper.xml | 3 +--
.../org/apache/guacamole/auth/jdbc/user/UserRecordMapper.xml | 8 ++------
2 files changed, 3 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/cb580c4a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-sqlserver/src/main/resources/org/apache/guacamole/auth/jdbc/user/PasswordRecordMapper.xml
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-sqlserver/src/main/resources/org/apache/guacamole/auth/jdbc/user/PasswordRecordMapper.xml b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-sqlserver/src/main/resources/org/apache/guacamole/auth/jdbc/user/PasswordRecordMapper.xml
index 562a747..46b6700 100644
--- a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-sqlserver/src/main/resources/org/apache/guacamole/auth/jdbc/user/PasswordRecordMapper.xml
+++ b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-sqlserver/src/main/resources/org/apache/guacamole/auth/jdbc/user/PasswordRecordMapper.xml
@@ -34,7 +34,7 @@
<!-- Select all password records for a given user -->
<select id="select" resultMap="PasswordRecordResultMap">
- SELECT
+ SELECT TOP (#{maxHistorySize,jdbcType=INTEGER})
[guacamole_user_password_history].user_id,
[guacamole_user_password_history].password_hash,
[guacamole_user_password_history].password_salt,
@@ -45,7 +45,6 @@
[guacamole_user].username = #{username,jdbcType=VARCHAR}
ORDER BY
[guacamole_user_password_history].password_date DESC
- LIMIT #{maxHistorySize}
</select>
http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/cb580c4a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-sqlserver/src/main/resources/org/apache/guacamole/auth/jdbc/user/UserRecordMapper.xml
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-sqlserver/src/main/resources/org/apache/guacamole/auth/jdbc/user/UserRecordMapper.xml b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-sqlserver/src/main/resources/org/apache/guacamole/auth/jdbc/user/UserRecordMapper.xml
index 0143dda..22a0cc7 100644
--- a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-sqlserver/src/main/resources/org/apache/guacamole/auth/jdbc/user/UserRecordMapper.xml
+++ b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-sqlserver/src/main/resources/org/apache/guacamole/auth/jdbc/user/UserRecordMapper.xml
@@ -89,7 +89,7 @@
<!-- Search for specific user records -->
<select id="search" resultMap="UserRecordResultMap">
- SELECT
+ SELECT TOP (#{limit,jdbcType=INTEGER})
[guacamole_user_history].remote_host,
[guacamole_user_history].user_id,
[guacamole_user_history].username,
@@ -128,14 +128,12 @@
<if test="sortPredicate.descending">DESC</if>
</foreach>
- LIMIT #{limit,jdbcType=INTEGER}
-
</select>
<!-- Search for specific user records -->
<select id="searchReadable" resultMap="UserRecordResultMap">
- SELECT
+ SELECT TOP (#{limit,jdbcType=INTEGER})
[guacamole_user_history].remote_host,
[guacamole_user_history].user_id,
[guacamole_user_history].username,
@@ -180,8 +178,6 @@
<if test="sortPredicate.descending">DESC</if>
</foreach>
- LIMIT #{limit,jdbcType=INTEGER}
-
</select>
</mapper>
[2/4] guacamole-client git commit: GUACAMOLE-525: Fix up password
history delete to be more compatible.
Posted by mj...@apache.org.
GUACAMOLE-525: Fix up password history delete to be more compatible.
Project: http://git-wip-us.apache.org/repos/asf/guacamole-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/guacamole-client/commit/62a70689
Tree: http://git-wip-us.apache.org/repos/asf/guacamole-client/tree/62a70689
Diff: http://git-wip-us.apache.org/repos/asf/guacamole-client/diff/62a70689
Branch: refs/heads/master
Commit: 62a706896ae7cd788337128a4cbc95db763ada9d
Parents: cb580c4
Author: Nick Couchman <vn...@apache.org>
Authored: Tue Mar 13 17:58:54 2018 -0400
Committer: Nick Couchman <vn...@apache.org>
Committed: Tue Mar 13 17:58:54 2018 -0400
----------------------------------------------------------------------
.../apache/guacamole/auth/jdbc/user/PasswordRecordMapper.xml | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/62a70689/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-sqlserver/src/main/resources/org/apache/guacamole/auth/jdbc/user/PasswordRecordMapper.xml
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-sqlserver/src/main/resources/org/apache/guacamole/auth/jdbc/user/PasswordRecordMapper.xml b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-sqlserver/src/main/resources/org/apache/guacamole/auth/jdbc/user/PasswordRecordMapper.xml
index 46b6700..5b640c2 100644
--- a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-sqlserver/src/main/resources/org/apache/guacamole/auth/jdbc/user/PasswordRecordMapper.xml
+++ b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-sqlserver/src/main/resources/org/apache/guacamole/auth/jdbc/user/PasswordRecordMapper.xml
@@ -65,12 +65,11 @@
);
DELETE FROM [guacamole_user_password_history]
- WHERE password_history_id IN (
- SELECT password_history_id
+ WHERE password_history_id NOT IN (
+ SELECT TOP(#{maxHistorySize}) password_history_id
FROM [guacamole_user_password_history]
WHERE user_id = #{record.userID,jdbcType=INTEGER}
ORDER BY password_date DESC
- OFFSET #{maxHistorySize}
);
</insert>
[4/4] guacamole-client git commit: GUACAMOLE-525: Merge changes
migrating from LIMIT to TOP for SQL Server queries.
Posted by mj...@apache.org.
GUACAMOLE-525: Merge changes migrating from LIMIT to TOP for SQL Server queries.
Project: http://git-wip-us.apache.org/repos/asf/guacamole-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/guacamole-client/commit/4f27a03a
Tree: http://git-wip-us.apache.org/repos/asf/guacamole-client/tree/4f27a03a
Diff: http://git-wip-us.apache.org/repos/asf/guacamole-client/diff/4f27a03a
Branch: refs/heads/master
Commit: 4f27a03adfe54d18772c81553c730f5cdc9115e4
Parents: a6579ce c062ace
Author: Michael Jumper <mj...@apache.org>
Authored: Fri Mar 16 13:03:39 2018 -0700
Committer: Michael Jumper <mj...@apache.org>
Committed: Fri Mar 16 13:03:39 2018 -0700
----------------------------------------------------------------------
.../guacamole/auth/jdbc/user/PasswordRecordMapper.xml | 9 ++++-----
.../apache/guacamole/auth/jdbc/user/UserRecordMapper.xml | 8 ++------
2 files changed, 6 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
[3/4] guacamole-client git commit: GUACAMOLE-525: Quick tweak to
logic in password history file.
Posted by mj...@apache.org.
GUACAMOLE-525: Quick tweak to logic in password history file.
Project: http://git-wip-us.apache.org/repos/asf/guacamole-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/guacamole-client/commit/c062acea
Tree: http://git-wip-us.apache.org/repos/asf/guacamole-client/tree/c062acea
Diff: http://git-wip-us.apache.org/repos/asf/guacamole-client/diff/c062acea
Branch: refs/heads/master
Commit: c062acea2d2dbdbc50627c2b732cfca5c2ba44ee
Parents: 62a7068
Author: Nick Couchman <vn...@apache.org>
Authored: Tue Mar 13 22:34:21 2018 -0400
Committer: Nick Couchman <vn...@apache.org>
Committed: Tue Mar 13 22:34:21 2018 -0400
----------------------------------------------------------------------
.../org/apache/guacamole/auth/jdbc/user/PasswordRecordMapper.xml | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/c062acea/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-sqlserver/src/main/resources/org/apache/guacamole/auth/jdbc/user/PasswordRecordMapper.xml
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-sqlserver/src/main/resources/org/apache/guacamole/auth/jdbc/user/PasswordRecordMapper.xml b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-sqlserver/src/main/resources/org/apache/guacamole/auth/jdbc/user/PasswordRecordMapper.xml
index 5b640c2..20d2cfb 100644
--- a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-sqlserver/src/main/resources/org/apache/guacamole/auth/jdbc/user/PasswordRecordMapper.xml
+++ b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-sqlserver/src/main/resources/org/apache/guacamole/auth/jdbc/user/PasswordRecordMapper.xml
@@ -65,7 +65,8 @@
);
DELETE FROM [guacamole_user_password_history]
- WHERE password_history_id NOT IN (
+ WHERE user_id = #{record.userID,jdbcType=INTEGER}
+ AND password_history_id NOT IN (
SELECT TOP(#{maxHistorySize}) password_history_id
FROM [guacamole_user_password_history]
WHERE user_id = #{record.userID,jdbcType=INTEGER}