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

Implement json unfolding for MariaDB #25635

Open
3 tasks
escherize opened this issue Sep 26, 2022 · 0 comments
Open
3 tasks

Implement json unfolding for MariaDB #25635

escherize opened this issue Sep 26, 2022 · 0 comments

Comments

@escherize
Copy link
Contributor

escherize commented Sep 26, 2022

Currently MySQL and MariaDB connections are handled with the :mysql driver. But they aren’t the same thing and don’t handle JSON the same way. In MySQL, JSON is an object and is compared according to json values. In MariaDB JSON strings are normal strings and compared as strings. In MariaDB JSON is an alias for LONGTEXT, introduced so that MySQL db dumps could be read into MariaDB. So, there is no easy way to disginguish JSON columns from LONGTEXT columns. In the mysql_test namespace, this is being dealt with inside the tests with (when-not (is-mariadb? (mt/id)) ,,,). So we just don’t run tests that will fail against MariaDB.

We already have similar but different drivers, in :postgres vs :redshift, and they reuse code as they should, so it seems like the proper approach.

It's been decided that our party line can be that you can get JSON unfolding in MariaDB < 10.4.3 if you go add the JSON_VALID check constraint yourself

Things to do:

  • make json unfolding in mariadb work on longtext columns with the JSON_VALID check constraint.
  • update the mysql tests to run against maria >= 10.4.3, and 10.2
  • add usual amount of tests

To consider:

See if it's worth splitting out a :maria-db driver. Afterall, MariaDB and MySQL aren't the same thing


more context

Historic #708

@escherize escherize self-assigned this Sep 26, 2022
@escherize escherize changed the title Implmenet json unfolding for MariaDB Implement json unfolding for MariaDB Sep 26, 2022
@escherize escherize removed their assignment May 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants