-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Moving column with empty default value will replace it with '' #17920
Comments
This was introduced in 75d296a when |
Hi, this bug is only affecting MariaDB versions newer than 10.2.7, it seems like MariaDB 10.2.7 broke compatibility with MySQL with their There are multiple reports of the issue but it seems to be intentional, not a bug. MDEV-13341. Most probably we will need to have a specific checks to handle this. 13341#comment |
Ok, so if I understand correctly, we have the following three points:
I would propose removing IS SELECTs and sticking with Does anyone have any ideas how to fix this? |
I believe that we need to keep the use of IS, we're definitely going to support the default expressions in the future, so we will still need the information we get from IS at that time. The issue is only in the retrieval, not the insertion. MariaDB will always quote the values if they're not expressions, so I do suggest having a helper maybe |
Describe the bug
When you try to move a column where the default value is an empty string, the generated sql will replace the empty string with ''
Example
To Reproduce
Steps to reproduce the behavior:
Create a table with at least 2 columns, one with varchar, and default value empty
change the order of the column
the default value is now ''
Expected behavior
No change in default value
Screenshots
If applicable, add screenshots to help explain the bug.
Server configuration
Client configuration
Additional context
Add any other context about the bug here.
The text was updated successfully, but these errors were encountered: