Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow BLOB/JSON/TEXT columns to have literal default values (MariaDB compatibility) #2155

Merged
merged 1 commit into from
Nov 21, 2023

Conversation

fulghum
Copy link
Contributor

@fulghum fulghum commented Nov 21, 2023

Technically, MySQL does NOT allow BLOB/JSON/TEXT columns to have a literal default value, and requires them to be specified as an expression (i.e. wrapped in parens). We diverge from this behavior and allow it, for compatibility with MariaDB.

While testing with a binary literal, I noticed that SQLVal was converting that value to "BLOB" instead of the actual binary content, so I fixed that one, too.

Related to: dolthub/dolt#7033

Dolt CI Checks: dolthub/dolt#7036

…patibility, even though MySQL requires wrapping them with parens to make them expressions)
Copy link
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

@fulghum fulghum merged commit 0a2b901 into main Nov 21, 2023
8 checks passed
@fulghum fulghum deleted the fulghum/dolt-7033 branch November 21, 2023 23:14
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.

2 participants