DOLT_QUERY_DIFF currently requires SELECT privilege on all tables in the database (GRANT SELECT ON mydb.*) to execute. This is overly-broad, and our docs imply that only the tables in the queries are necessary. I've updated the docs and added some tests for #10695 which are implicitly related to this. Down below is a gist of what should happen.
Expected
mydb/main> GRANT SELECT ON mydb.t TO user@localhost;
mydb/main> SELECT * FROM dolt_query_diff('SELECT * FROM t AS OF main', 'SELECT * FROM t AS OF other');
+--------+------+-----------+
| from_i | to_i | diff_type |
+--------+------+-----------+
| 1 | 2 | modified |
+--------+------+-----------+
DOLT_QUERY_DIFFcurrently requiresSELECTprivilege on all tables in the database (GRANT SELECT ON mydb.*) to execute. This is overly-broad, and our docs imply that only the tables in the queries are necessary. I've updated the docs and added some tests for #10695 which are implicitly related to this. Down below is a gist of what should happen.Expected