Skip to content

Fix SchemaTable.Updater panic on direct UPDATE dolt_schemas#11059

Open
tbantle22 wants to merge 2 commits into
mainfrom
taylor/schema-table-updater-panic-fix
Open

Fix SchemaTable.Updater panic on direct UPDATE dolt_schemas#11059
tbantle22 wants to merge 2 commits into
mainfrom
taylor/schema-table-updater-panic-fix

Conversation

@tbantle22
Copy link
Copy Markdown
Contributor

@tbantle22 tbantle22 commented May 15, 2026

A direct UPDATE dolt_schemas reached SchemaTable.Updater, which panicked with "should never be called" — an unprivileged user could crash the SQL server with it. dolt_schemas is not directly modifiable via SQL, so this returns a clean error unconditionally instead of panicking; adds a regression test.

A direct UPDATE dolt_schemas reached SchemaTable.Updater, which
panicked ("should never be called") — an unprivileged user could crash
the SQL server with it. Delegate to the wrapped backing table instead,
which removes the panic and gives the write the same branch_control
gate as any other table write.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@tbantle22 tbantle22 requested a review from reltuk May 15, 2026 21:23
dolt_schemas is not directly modifiable via SQL (internal schema
changes go through the wrapped backing table). Rather than delegating
the direct-UPDATE path to the backing table, return a static error
unconditionally so the table stays non-directly-modifiable while no
longer panicking. Moves the regression test out of the branch_control
block suite (which expects success once Write is granted) into the
dolt_schemas script test.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coffeegoddd
Copy link
Copy Markdown
Contributor

coffeegoddd commented May 15, 2026

@tbantle22 DOLT

read_tests from_latency to_latency percent_change
covering_index_scan 0.55 0.54 -1.82
groupby_scan 9.91 9.91 0.0
index_join 1.82 1.82 0.0
index_join_scan 1.32 1.32 0.0
index_scan 20.37 20.74 1.82
oltp_point_select 0.26 0.26 0.0
oltp_read_only 5.0 5.0 0.0
select_random_points 0.51 0.51 0.0
select_random_ranges 0.56 0.56 0.0
table_scan 20.37 20.37 0.0
types_table_scan 45.79 45.79 0.0
write_tests from_latency to_latency percent_change
oltp_delete_insert 6.21 6.21 0.0
oltp_insert 3.02 3.02 0.0
oltp_read_write 10.84 10.84 0.0
oltp_update_index 3.13 3.13 0.0
oltp_update_non_index 2.97 2.97 0.0
oltp_write_only 5.77 5.77 0.0
types_delete_insert 6.55 6.55 0.0

Copy link
Copy Markdown
Contributor

@reltuk reltuk left a comment

Choose a reason for hiding this comment

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

LGTM!

@coffeegoddd
Copy link
Copy Markdown
Contributor

coffeegoddd commented May 15, 2026

@tbantle22 DOLT

test_name from_latency_p95 to_latency_p95 percent_change
tpcc-scale-factor-1 45.79 44.98 -1.77
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 e056d35 52.92 dolt 0657713 52.67 -0.47

@coffeegoddd
Copy link
Copy Markdown
Contributor

@tbantle22 DOLT

comparing_percentages
100.000000 to 100.000000
version result total
0657713 ok 5937471
version total_tests
0657713 5937471
correctness_percentage
100.0

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.

3 participants