Opened 4 years ago
Closed 4 years ago
#31779 closed Bug (invalid)
Executing complex JSONField queries crashes on MariaDB < 10.2.16
Reported by: | Sage Abdullah | Owned by: | Sage Abdullah |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Carlton Gibson | Triage Stage: | Unreviewed |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
We explicitly say that JSONField is supported on MariaDB >= 10.2.7. However, it seems that there is an upstream bug that causes complex JSONField queries to crash: https://jira.mariadb.org/browse/MDEV-16209
I haven't isolated which test(s) caused the crash, but it's reproducible by running the tests with MariaDB < 10.2.16. Since this is an upstream issue, I think we can just bump the version requirement to 10.2.16 or add a warning that some things may not work with MariaDB < 10.2.16.
The following tests crash the database server:
model_fields.test_jsonfield.TestSaveLoad.test_json_null_different_from_sql_null model_fields.test_jsonfield.TestQuerying.test_exact model_fields.test_jsonfield.TestQuerying.test_exact_complex model_fields.test_jsonfield.TestQuerying.test_key_transform_raw_expression model_fields.test_jsonfield.TestQuerying.test_nested_key_transform_raw_expression model_fields.test_jsonfield.TestQuerying.test_isnull_key_or_none model_fields.test_jsonfield.TestQuerying.test_none_key model_fields.test_jsonfield.TestQuerying.test_none_key_exclude model_fields.test_jsonfield.TestQuerying.test_shallow_list_lookup model_fields.test_jsonfield.TestQuerying.test_shallow_obj_lookup model_fields.test_jsonfield.TestQuerying.test_obj_subquery_lookup model_fields.test_jsonfield.TestQuerying.test_deep_lookup_objs model_fields.test_jsonfield.TestQuerying.test_shallow_lookup_obj_target model_fields.test_jsonfield.TestQuerying.test_deep_lookup_array model_fields.test_jsonfield.TestQuerying.test_deep_lookup_mixed model_fields.test_jsonfield.TestQuerying.test_usage_in_subquery model_fields.test_jsonfield.TestQuerying.test_key_escape model_fields.test_jsonfield.TestQuerying.test_none_key_and_exact_lookup
Change History (3)
comment:1 by , 4 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:2 by , 4 years ago
Description: | modified (diff) |
---|
comment:3 by , 4 years ago
Cc: | added |
---|---|
Resolution: | → invalid |
Status: | assigned → closed |
Thanks for this report, however support for the
JSON
data type was officially added in MariaDB 10.2.7 so IMO we should leave as it is because this feature is not totally broken, even if they fixed some bugs inJSON_EXTRACT()
in MariaDB 10.2.16 (it's also broken in MariaDB 10.3.0 to 10.3.7). Django always supports the latest micro release and we cannot bump feature flags for each issue. It should be enough to keep this ticket for reference. Thanks!JSON_EXTRACT()
has some major bugs even in the latest release, see MDEV-21530.