Skip to content

fix ON UPDATE CURRENT_TIMESTAMP precision#2357

Merged
jycor merged 4 commits intomainfrom
james/time
Feb 29, 2024
Merged

fix ON UPDATE CURRENT_TIMESTAMP precision#2357
jycor merged 4 commits intomainfrom
james/time

Conversation

@jycor
Copy link
Copy Markdown
Contributor

@jycor jycor commented Feb 29, 2024

I had mistaken assumed that MySQL did not allow any precision arguments for NOW() (and synonyms) for column DEFAULT and ON UPDATE expressions. It turns out MySQL only requires that the column type precision match the expression.

Additionally, we did not perform these error checks for DEFAULT expression, so now we do.

fixes dolthub/dolt#7555

Copy link
Copy Markdown
Contributor

@fulghum fulghum left a comment

Choose a reason for hiding this comment

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

Looks good! 🚢

@jycor jycor merged commit c565850 into main Feb 29, 2024
@jycor jycor deleted the james/time branch February 29, 2024 22:09
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.

Got "Invalid ON UPDATE clause" after bump to v0.18.0

2 participants