Skip to content

Normalize AUTO_INCREMENT values in tables.#9063

Merged
nicktobey merged 2 commits intomainfrom
nicktobey/auto_inc
Apr 1, 2025
Merged

Normalize AUTO_INCREMENT values in tables.#9063
nicktobey merged 2 commits intomainfrom
nicktobey/auto_inc

Conversation

@nicktobey
Copy link
Copy Markdown
Contributor

When the AUTO_INCREMENT field is unset, the value of the next AUTO_INCREMENT column defaults to 1. Thus, setting it to 0 and 1 produce identical behavior.

By normalizing the value as its written, we ensure that both operations produce the same table hash as if the value was unset.

When the AUTO_INCREMENT field is unset, the value of the next AUTO_INCREMENT column defaults to 1. Thus, setting it to 0 and 1 produce identical behavior.

By normalizing the value as its written, we ensure that both operations produce the same table hash as if the value was unset.
Copy link
Copy Markdown
Member

@zachmu zachmu 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

@nicktobey DOLT

comparing_percentages
100.000000 to 100.000000
version result total
c713343 ok 5937457
version total_tests
c713343 5937457
correctness_percentage
100.0

@coffeegoddd
Copy link
Copy Markdown
Contributor

@nicktobey DOLT

comparing_percentages
100.000000 to 100.000000
version result total
f7f530a ok 5937457
version total_tests
f7f530a 5937457
correctness_percentage
100.0

@nicktobey nicktobey merged commit 11703ea into main Apr 1, 2025
21 checks passed
@nicktobey nicktobey deleted the nicktobey/auto_inc branch April 1, 2025 02:52
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 2, 2025

@coffeegoddd DOLT

test_name detail row_cnt sorted mysql_time sql_mult cli_mult
batching LOAD DATA 10000 1 0.06 1.5
batching batch sql 10000 1 0.09 1.33
batching by line sql 10000 1 0.09 1.33
blob 1 blob 200000 1 0.93 3.74 4.42
blob 2 blobs 200000 1 0.9 4.31 4.7
blob no blob 200000 1 0.93 2.4 2.78
col type datetime 200000 1 0.82 2.5 2.83
col type varchar 200000 1 0.76 3.26 3.55
config width 2 cols 200000 1 0.89 2.28 2.57
config width 32 cols 200000 1 1.92 2.01 2.7
config width 8 cols 200000 1 1.02 2.3 2.58
pk type float 200000 1 0.97 2.11 2.42
pk type int 200000 1 1.01 2.01 2.29
pk type varchar 200000 1 2.79 1.03 1
row count 1.6mm 1600000 1 5.84 2.96 2.99
row count 400k 400000 1 1.49 2.79 2.94
row count 800k 800000 1 2.95 2.87 2.93
secondary index four index 200000 1 3.7 1.35 1.29
secondary index no secondary 200000 1 1.06 2.1 2.48
secondary index one index 200000 1 1.19 2.39 2.49
secondary index two index 200000 1 2.04 1.75 1.85
sorting shuffled 1mm 1000000 0 5.27 2.9 2.65
sorting sorted 1mm 1000000 1 5.17 2.89 2.69

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 2, 2025

@coffeegoddd DOLT

name detail mean_mult
dolt_blame_basic system table 1.17
dolt_blame_commit_filter system table 2.91
dolt_commit_ancestors_commit_filter system table 0.59
dolt_commits_commit_filter system table 1.11
dolt_diff_log_join_from_commit system table 2.75
dolt_diff_log_join_to_commit system table 2.66
dolt_diff_table_from_commit_filter system table 1.22
dolt_diff_table_to_commit_filter system table 1.15
dolt_diffs_commit_filter system table 1.03
dolt_history_commit_filter system table 1.5
dolt_log_commit_filter system table 1.11

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 2, 2025

@coffeegoddd DOLT

name add_cnt delete_cnt update_cnt latency
adds_only 60000 0 0 1.11
adds_updates_deletes 60000 60000 60000 4.54
deletes_only 0 60000 0 2.46
updates_only 0 0 60000 3.06

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