
When the 10.2 users query is executed with a MariaDB server older than 10.2.11, the query will fail due to inadequate grants on the 'users' table generated as a part of the CTE. To work around the issue, a SELECT grant on the whole mysql database is required. Logging the server where the query fails also helps resolve the problem by pointing out where the grant needs to be added.