diff --git a/homeassistant/components/recorder/util.py b/homeassistant/components/recorder/util.py index 567164d4325..8277f86e9f9 100644 --- a/homeassistant/components/recorder/util.py +++ b/homeassistant/components/recorder/util.py @@ -311,7 +311,9 @@ def setup_connection_for_dialect( result = query_on_connection(dbapi_connection, "SELECT VERSION()") version = result[0][0] major, minor, _patch = version.split(".", 2) - if int(major) == 5 and int(minor) < 8: + if (int(major) == 5 and int(minor) < 8) or ( + int(major) == 10 and int(minor) < 2 + ): instance._db_supports_row_number = ( # pylint: disable=[protected-access] False ) diff --git a/tests/components/recorder/test_util.py b/tests/components/recorder/test_util.py index 8b5de5cff16..ff690e24279 100644 --- a/tests/components/recorder/test_util.py +++ b/tests/components/recorder/test_util.py @@ -125,7 +125,8 @@ async def test_last_run_was_recently_clean(hass): @pytest.mark.parametrize( "mysql_version, db_supports_row_number", [ - ("10.0.0", True), + ("10.2.0", True), + ("10.1.0", False), ("5.8.0", True), ("5.7.0", False), ],