-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
fix(server): switch to JSON_EXTRACT
and JSON_UNQUOTE
for MySQL/MariaDB. Fixes #13202
#13203
Conversation
f04688e
to
051e314
Compare
JSON_EXTRACT
and JSON_UNQUOTE
functions. Fixes #13202
JSON_EXTRACT
and JSON_UNQUOTE
functions. Fixes #13202JSON_EXTRACT
and JSON_UNQUOTE
functions for MySQL/MariaDB. Fixes #13202
JSON_EXTRACT
and JSON_UNQUOTE
functions for MySQL/MariaDB. Fixes #13202JSON_EXTRACT
and JSON_UNQUOTE
for MySQL/MariaDB. Fixes #13202
@jiachengxu could you review/double-check this? Thanks again for all your follow-ups ❤️ |
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.
The changes make sense but I wonder if we should introduce additional e2e test suits for other DBs for compatibility
The change looks good to me, and to Terry's point, I think it makes sense to add e2e tests for DB compatibility |
@terrytangyuan @jiachengxu should the e2e test with mariab part of this PR or anything else is needed to get merged? It would be also nice if this can be back ported to version |
… list to be compatible with mariadb Signed-off-by: spaced <[email protected]>
We'd do that automatically as it's a fix 👍
IMO, I think this is fine as-is since it fixes an unintended compatibility regression (although really should be on MariaDB to be compatible, no?). Tests would be great to add, but we pretty rarely change DB queries, I'd be fine if they're added later. We also currently only test MySQL in CI and don't test Postgres either. Adding MariaDB requires a new manifest and |
…riaDB. Fixes #13202 (#13203) Signed-off-by: spaced <[email protected]> (cherry picked from commit ac9cb3a)
fix: use standard
JSON_EXTRACT
andJSON_UNQUOTE
function for list workflow using mariadb. Fixes #13202-->
is only a alias toJSON_EXTRACT()
functionfor some fields it was even wrong (for example it makes no sense to unquote the
$.metadata.labels
.mariadb does not support this (see feature request in mariadb: https://jira.mariadb.org/browse/MDEV-13594)
Fixes #13202
Follow-up to #12912
Motivation
be compatible with mariadb
Modifications
->
withJSON_EXTRACT
-->
withJSON_UNQUOTE(JSON_EXTRACT(..,..)
Verification
locally