necouchman commented on a change in pull request #546:
URL: https://github.com/apache/guacamole-client/pull/546#discussion_r514583780
##########
File path:
extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-mysql/src/main/resources/org/apache/guacamole/auth/jdbc/connection/ConnectionRecordMapper.xml
##########
@@ -108,28 +108,35 @@
LEFT JOIN guacamole_user ON guacamole_connection_history.user_id
= guacamole_user.user_id
<!-- Search terms -->
- <foreach collection="terms" item="term"
- open="WHERE " separator=" AND ">
- (
-
- guacamole_connection_history.user_id IN (
- SELECT user_id
- FROM guacamole_user
- WHERE POSITION(#{term.term,jdbcType=VARCHAR} IN username)
> 0
- )
+ <where>
+
+ <if test="identifier != null">
+ guacamole_connection_history.connection_id =
#{identifier,jdbcType=VARCHAR}
+ </if>
+
+ <foreach collection="terms" item="term" separator=" AND ">
Review comment:
I notice you marked this as resolved, but I hadn't done a ton of
verification. Everything appears to work fine with it as it is (no extra
`AND`s in there), but I haven't tested externsively...
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]