You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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:
longtext
columns with the JSON_VALID check constraint.To consider:
See if it's worth splitting out a
:maria-db
driver. Afterall, MariaDB and MySQL aren't the same thingmore context
Historic #708
The text was updated successfully, but these errors were encountered: