Skip to content

Feature: @@last_generated_uuid system session variable#2358

Closed
fulghum wants to merge 2 commits intomainfrom
fulghum/last_generated_uuid
Closed

Feature: @@last_generated_uuid system session variable#2358
fulghum wants to merge 2 commits intomainfrom
fulghum/last_generated_uuid

Conversation

@fulghum
Copy link
Copy Markdown
Contributor

@fulghum fulghum commented Feb 29, 2024

Dolt recommends customers prefer UUIDs over auto_increment values where possible. For auto_increment columns, the MySQL last_insert_id() function helps to retrieve the last generated ID, but there's not an analogue for UUIDs. This PR adds a new system session variable, @@last_generated_uuid that is populated each time the UUID() function is executed. Note that this is not a standard MySQL behavior.

Customer request: dolthub/dolt#7547

@fulghum
Copy link
Copy Markdown
Contributor Author

fulghum commented Mar 1, 2024

Closing this one in favor of #2362

@fulghum fulghum closed this Mar 1, 2024
@Hydrocharged Hydrocharged deleted the fulghum/last_generated_uuid branch December 17, 2025 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant