Sqlite error after upgrading 2021.10.2

Hello,
my log is showing this:

2021-10-10 22:00:10 ERROR (Recorder) [homeassistant.components.recorder.util] Error executing query: (sqlite3.OperationalError) near "(": syntax error

[SQL: SELECT anon_1.metadata_id AS anon_1_metadata_id, anon_1.start AS anon_1_start, anon_1.last_reset AS anon_1_last_reset, anon_1.state AS anon_1_state, anon_1.sum AS anon_1_sum, anon_1.rownum AS anon_1_rownum 
FROM (SELECT statistics_short_term.metadata_id AS metadata_id, statistics_short_term.start AS start, statistics_short_term.last_reset AS last_reset, statistics_short_term.state AS state, statistics_short_term.sum AS sum, row_number() OVER (PARTITION BY statistics_short_term.metadata_id ORDER BY statistics_short_term.start DESC) AS rownum 
FROM statistics_short_term 
WHERE statistics_short_term.start >= ? AND statistics_short_term.start < ?) AS anon_1 
WHERE anon_1.rownum = ? ORDER BY anon_1.metadata_id]
[parameters: ('2021-10-10 19:00:00.000000', '2021-10-10 20:00:00.000000', 1)]
(Background on this error at: https://sqlalche.me/e/14/e3q8)

What can I do ?

Thanks.

also have the same issues with 20.21.10.2.

similar errors reported in Recorder error using MySQL in a remote server and Energy Dashboard SQL problem after 2021.10 upgrade using different underlying databases…

I’ve raised https://github.com/home-assistant/core/issues/57454

As far as I understood it now, it is caused by the SQL server version. Mine is still on 5.6, but 5.8 is required.

Yes, I saw in the issue page.

I think it’s to update my Raspian 9: let’s dd the mSD and let’s go “to the infinity and beyond” :laughing:

First I couldn’t update rustc, now Sqlite.
(To be honest I didn’t see any requirements about these versions but, maybe, I missed them).

I thought the same - Linux - Home Assistant - mentions python minimums, and thats pretty much it.

However, Recorder - Home Assistant does say SQLite 3.32.1+

My ubuntu 16.04 is running 3.11.0

Detect if mysql and sqlite support row_number by emontnemery · Pull Request #57475 · home-assistant/core · GitHub has been raised (potentially 2021.10.4 ) to revert to previous behaviour.