Skip to content

Fix Dolt table function privilege checks when current database is revision-qualified#10700

Merged
elianddb merged 4 commits intomainfrom
elian/10695
Mar 18, 2026
Merged

Fix Dolt table function privilege checks when current database is revision-qualified#10700
elianddb merged 4 commits intomainfrom
elian/10695

Conversation

@elianddb
Copy link
Copy Markdown
Contributor

@elianddb elianddb commented Mar 17, 2026

MySQL privilege grants are stored against the base database name, so when a user called a Dolt table function with mydb/revision as the current database, the privilege check looked up the revision-qualfied name instead of mydb.

  • Update dolt_schema_diff, dolt_diff, dolt_diff_stat, dolt_diff_summary, dolt_log, dolt_patch, dolt_preview_merge_conflicts, dolt_preview_merge_conflicts_summary, and dolt_query_diff to strip revision qualifier before performing privilege checks.

Fix #10695
Companion dolthub/docs#2804

@coffeegoddd
Copy link
Copy Markdown
Contributor

coffeegoddd commented Mar 17, 2026

@elianddb DOLT

read_tests from_latency to_latency percent_change
covering_index_scan 0.57 0.55 -3.51
groupby_scan 10.09 10.09 0.0
index_join 1.86 1.86 0.0
index_join_scan 1.39 1.39 0.0
index_scan 21.89 21.89 0.0
oltp_point_select 0.27 0.27 0.0
oltp_read_only 5.28 5.28 0.0
select_random_points 0.53 0.53 0.0
select_random_ranges 0.56 0.56 0.0
table_scan 21.89 22.28 1.78
types_table_scan 65.65 66.84 1.81
write_tests from_latency to_latency percent_change
oltp_delete_insert 6.43 6.32 -1.71
oltp_insert 3.13 3.13 0.0
oltp_read_write 11.45 11.45 0.0
oltp_update_index 3.19 3.19 0.0
oltp_update_non_index 3.13 3.13 0.0
oltp_write_only 6.09 6.09 0.0
types_delete_insert 6.91 6.91 0.0

@coffeegoddd
Copy link
Copy Markdown
Contributor

@elianddb DOLT

comparing_percentages
100.000000 to 100.000000
version result total
1c9eb1d ok 5937471
version total_tests
1c9eb1d 5937471
correctness_percentage
100.0

@coffeegoddd
Copy link
Copy Markdown
Contributor

coffeegoddd commented Mar 17, 2026

@elianddb DOLT

test_name from_latency_p95 to_latency_p95 percent_change
tpcc-scale-factor-1 62.19 62.19 0.0
test_name from_server_name from_server_version from_tps to_server_name to_server_version to_tps percent_change
tpcc-scale-factor-1 dolt 0294acf 37.41 dolt 54d3a94 37.39 -0.05

@coffeegoddd
Copy link
Copy Markdown
Contributor

@elianddb DOLT

comparing_percentages
100.000000 to 100.000000
version result total
54d3a94 ok 5937471
version total_tests
54d3a94 5937471
correctness_percentage
100.0

Copy link
Copy Markdown
Contributor

@jycor jycor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@elianddb elianddb merged commit 8a020b6 into main Mar 18, 2026
31 of 32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Command Denied when calling Dolt Function where SQL users do not have explicit grant access to the branch database.

3 participants