-
-
Notifications
You must be signed in to change notification settings - Fork 29.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error executing post migrate states entity_ids to states_meta #90892
Comments
Hey there @home-assistant/core, mind taking a look at this issue as it has been labeled with an integration ( Code owner commandsCode owners of
(message by CodeOwnersMention) recorder documentation |
I just tried that query on MariaDB and it works fine
|
Does it fail if you run it manually? UPDATE
states
SET
entity_id = NULL
WHERE
states.state_id IN (
SELECT
states.state_id
FROM
states
INNER JOIN (
SELECT
states.state_id AS state_id_with_entity_id
FROM
states
WHERE
states.entity_id IS NOT NULL
LIMIT
5000
) AS anon_1 ON states.state_id = anon_1.state_id_with_entity_id
); |
Also if it does fail, SELECT
states.state_id
FROM
states
INNER JOIN (
SELECT
states.state_id AS state_id_with_entity_id
FROM
states
WHERE
states.entity_id IS NOT NULL
LIMIT
5000
) AS anon_1 ON states.state_id = anon_1.state_id_with_entity_id fail as well? |
Similar issue from the past #11713 |
This query worked fine on MariaDB but failed on MySQL 8.0.30 fixes #90892
Fail |
It works. |
Well thats annoying that it works on MariaDB but fails on MySQL |
This problem won't actually cause any breakage. The worst that happens is there is some data that is not cleaned up until old rows are purged during normal nightly purge. |
We will get the query adjusted to work with MySQL. Thanks for the report |
I also opened #90898 to add MySQL to the CI since we currently only test against MariaDB |
The problem
During first start after upgrading from 2023.3.6 to 2023.4.0 got a following errors in HA log.
I use external MySQL server, version 8.0.30.
What version of Home Assistant Core has the issue?
core-2023.4.0
What was the last working version of Home Assistant Core?
core-2023.3.6
What type of installation are you running?
Home Assistant OS
Integration causing the issue
recorder
Link to integration documentation on our website
https://www.home-assistant.io/integrations/recorder/
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
Additional information
No response
The text was updated successfully, but these errors were encountered: