Repository: guacamole-client Updated Branches: refs/heads/master 53d5bf184 -> 312e0bb1e
GUACAMOLE-363: Do not take behind-the-scenes trigger operations into account when calculating the row counts for a query. Project: http://git-wip-us.apache.org/repos/asf/guacamole-client/repo Commit: http://git-wip-us.apache.org/repos/asf/guacamole-client/commit/23084625 Tree: http://git-wip-us.apache.org/repos/asf/guacamole-client/tree/23084625 Diff: http://git-wip-us.apache.org/repos/asf/guacamole-client/diff/23084625 Branch: refs/heads/master Commit: 23084625ab7d82ecd73197ff9078f4c822af62e3 Parents: 56da0b0 Author: Michael Jumper <mjum...@apache.org> Authored: Sat Nov 25 21:54:41 2017 -0800 Committer: Michael Jumper <mjum...@apache.org> Committed: Sun Nov 26 13:01:48 2017 -0800 ---------------------------------------------------------------------- .../schema/001-create-schema.sql | 12 ++++++++++++ 1 file changed, 12 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/23084625/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-sqlserver/schema/001-create-schema.sql ---------------------------------------------------------------------- diff --git a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-sqlserver/schema/001-create-schema.sql b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-sqlserver/schema/001-create-schema.sql index be955ac..da63f60 100644 --- a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-sqlserver/schema/001-create-schema.sql +++ b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-sqlserver/schema/001-create-schema.sql @@ -559,6 +559,9 @@ CREATE TRIGGER [guacamole_delete_user] INSTEAD OF DELETE AS BEGIN + -- Do not take trigger into account when producing row counts for the DELETE + SET NOCOUNT ON; + -- Delete all associated permissions not covered by ON DELETE CASCADE DELETE FROM [guacamole_user_permission] WHERE @@ -583,6 +586,9 @@ CREATE TRIGGER [guacamole_delete_connection] INSTEAD OF DELETE AS BEGIN + -- Do not take trigger into account when producing row counts for the DELETE + SET NOCOUNT ON; + -- Delete associated sharing profiles DELETE FROM [guacamole_sharing_profile] WHERE [primary_connection_id] IN (SELECT [connection_id] FROM DELETED); @@ -605,6 +611,9 @@ CREATE TRIGGER [guacamole_delete_connection_group] INSTEAD OF DELETE AS BEGIN + -- Do not take trigger into account when producing row counts for the DELETE + SET NOCOUNT ON; + -- Delete all requested connection groups, including descendants WITH [connection_groups] ([connection_group_id]) AS ( SELECT [connection_group_id] FROM DELETED @@ -637,6 +646,9 @@ CREATE TRIGGER [guacamole_delete_sharing_profile] INSTEAD OF DELETE AS BEGIN + -- Do not take trigger into account when producing row counts for the DELETE + SET NOCOUNT ON; + -- Delete all associated permissions not covered by ON DELETE CASCADE UPDATE [guacamole_connection_history] SET [sharing_profile_id] = NULL