mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +00:00
Correct detection of row_number support for MariaDB (#57663)
This commit is contained in:
parent
e27e4c3561
commit
8ef8838801
@ -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
|
||||
)
|
||||
|
@ -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),
|
||||
],
|
||||
|
Loading…
x
Reference in New Issue
Block a user