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
Fixes Maria issue with 'NULL' returned instead of NULL on MariaDB 10.2.6+ #5181
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thx for the PR !
Having the same issue this PR fixes, how can I apply it on my Ghost install so I can upgrade ? Thanks a lot. |
Unfortunately, you can't. This version of knex was not released yet, but even if it was, Ghost uses bookshelf, which still does not support latest knex versions: bookshelf/bookshelf#2120 |
@kibertoad Ghost (I) just decided to run with the latest Knex anyway. It means we're ignoring the peer dependencies but Bookshelf is pretty dead and we're looking at other Knex-based ORMs anyway. I considered forking Bookshelf but what we did was the quickest route. Once Knex is released, I can bump within Ghost |
Got it, I'll release today then. |
Released in 2.1.0 |
Thanks! |
Fixes: #5154
If we look at https://jira.mariadb.org/browse/MDEV-13132, a bug was fixed to properly quote default value to be able to determine expressions vs null. This meant due to the strict typing that
'NULL'
was not detected as null and thus attempted to be included as a default value even against a not-nullable table here - https://github.com/knex/knex/blob/master/lib/schema/tablecompiler.js#L333I've never worked with this project, but my Ghost blog stopped working and while Ghost is dropping Maria and I'm sad about that. I cannot complain seeing how I paid $0, so I'm attempting to fix to resolve this issue.
I added a test which I believe resolves issue, but to truly replicate you need Maria 10.2.6+ and I don't even see that in the integration suite (the docker). So while I pointed my test to my own Maria and confirmed this works as well as "monkey patching" this fix into my live environment as well. So I am setting this to draft to figure out how you recommend I solve this in terms of "proving" it was solved.
(proof of Ghost working after patch)