summaryrefslogtreecommitdiff
path: root/django/db/backends/mysql/features.py
diff options
context:
space:
mode:
authorNick Pope <nick@nickpope.me.uk>2021-02-21 01:38:55 +0000
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2021-07-19 13:04:27 +0200
commit501a8db46595b2d5b99c1d3b1146a832f43cdf1c (patch)
treec7f566647cc8d22f144b32d4b5f74ec73aacc523 /django/db/backends/mysql/features.py
parent59942a66ceb79868cb91844df3a72a24c63e39fa (diff)
downloaddjango-501a8db46595b2d5b99c1d3b1146a832f43cdf1c.tar.gz
Fixed #10929 -- Added default argument to aggregates.
Thanks to Simon Charette and Adam Johnson for the reviews.
Diffstat (limited to 'django/db/backends/mysql/features.py')
-rw-r--r--django/db/backends/mysql/features.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/django/db/backends/mysql/features.py b/django/db/backends/mysql/features.py
index 6e628e80d1..21c063199f 100644
--- a/django/db/backends/mysql/features.py
+++ b/django/db/backends/mysql/features.py
@@ -88,6 +88,17 @@ class DatabaseFeatures(BaseDatabaseFeatures):
'annotations.tests.NonAggregateAnnotationTestCase.test_annotation_aggregate_with_m2o',
},
})
+ if not self.connection.mysql_is_mariadb and self.connection.mysql_version < (8,):
+ skips.update({
+ 'Casting to datetime/time is not supported by MySQL < 8.0. (#30224)': {
+ 'aggregation.tests.AggregateTestCase.test_aggregation_default_using_time_from_python',
+ 'aggregation.tests.AggregateTestCase.test_aggregation_default_using_datetime_from_python',
+ },
+ 'MySQL < 8.0 returns string type instead of datetime/time. (#30224)': {
+ 'aggregation.tests.AggregateTestCase.test_aggregation_default_using_time_from_database',
+ 'aggregation.tests.AggregateTestCase.test_aggregation_default_using_datetime_from_database',
+ },
+ })
if (
self.connection.mysql_is_mariadb and
(10, 4, 3) < self.connection.mysql_version < (10, 5, 2)