-
Notifications
You must be signed in to change notification settings - Fork 834
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
MySQL 8 expressions as default values cause syntax parsing error #1197
Comments
sourcec0de
added
bug
Something isn't working
triage
New issues that hasn't been reviewed
labels
Sep 18, 2021
kyleconroy
added
📚 mysql
upstream
Issue is caused by a dependency
and removed
triage
New issues that hasn't been reviewed
labels
Sep 20, 2021
This indeed appears to be an issue with the pingcap MySQL parser. I've opened an issue (pingcap/parser#1347) for this problem. |
akutschera
added a commit
to akutschera/sqlc
that referenced
this issue
Jul 25, 2022
akutschera
added a commit
to akutschera/sqlc
that referenced
this issue
Jul 25, 2022
kyleconroy
pushed a commit
that referenced
this issue
Jul 27, 2022
We've upgraded to the latest version of the MySQL parser which should fix this issue. |
jlisthood
pushed a commit
to jlisthood/sqlc
that referenced
this issue
Apr 28, 2023
* (chore): Upgrade tidb_parser to new repository fixes: sqlc-dev#1795 Refs: sqlc-dev#1197 sqlc-dev#1754 * test(MySQL): Add test for default column values Refs: sqlc-dev#1197 sqlc-dev#1754
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version
1.10.0
What happened?
Hey all, thanks for this awesome library! Ran into some issues using expressions as default values in MySQL 8.
https://dev.mysql.com/doc/refman/8.0/en/data-type-defaults.html
I assume this may just be a feature missing from the upstream https://github.com/pingcap/parser library.
Figured I would raise this here to see if anyone is aware of a workaround.
Thanks again for all the hard work.
Relevant log output
Database schema
SQL queries
Configuration
Playground URL
https://play.sqlc.dev/p/8b99ca6623d728b89b335001bed9e38464a88572dbe2620456d1c3e37dcf5c67
What operating system are you using?
macOS
What database engines are you using?
MySQL
What type of code are you generating?
Go
The text was updated successfully, but these errors were encountered: