Column masking improvements

In Db2 11, column access control restrictions for the GROUP BY clause and the HAVING clause are removed. This improvement is beneficial when you implement row and column access control.

In certain contexts in DB2® 10, the semantics of the column mask can conflict with the semantics in the GROUP BY clause or the HAVING clause. When these conflicts occur, the column mask cannot be applied for the statement and an error is returned at bind time. However, now when the GROUP BY or HAVING clauses are used, columns with column masks can be referenced in the result table without any restrictions.

Also, inconsistencies between the behavior of the SELECT DISTINCT statement and an aggregate function with the DISTINCT keyword are resolved. Now, column masking for an aggregate function with the DISTINCT keyword is applied after the removal of duplicate rows.