v.21.1Improvements

Access Control Update: merge() Function Requires SELECT Privilege on Source Tables

Access control: Now table function merge() requires current user to have SELECT privilege on each table it receives data from. This PR fixes #16964. #18104 #17983 (Vitaly Baranov).
The merge() table function now requires the current user to have SELECT privilege on each table it accesses.

Why it matters

This feature improves security by ensuring that users can only merge data from tables on which they have explicit SELECT permissions, preventing unauthorized data access.

How to use it

Ensure the user has SELECT privilege on all tables passed to the merge() function. Without these privileges, attempts to use merge() will be denied.