Closed Crayjin closed 2 years ago
Hey there @home-assistant/core, mind taking a look at this issue as it has been labeled with an integration (recorder
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
recorder documentation recorder source (message by IssueLinks)
Looks like something is wrong with your schema.
Can you provide a dump of the schema for the states table?
Hi @bdraco, I hope I got the data you requested. I'm not very experienced with DBs.
`context_id` varchar(1) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`context_user_id` varchar(1) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
That's odd that its set to 1
. Any idea how that happened?
Make a backup first, then you can fix it with:
alter table states change context_id context_id varchar(36);
alter table states change context_user_id context_user_id varchar(36);
I have no clue how this could happen, but changing it from 1 to 36 worked and the log entries have disappeared.
Thank you very much!
Hi guys,
i had the same issue:
I changed by states the following in the database: alter table states change context_id context_id varchar(36); alter table states change context_user_id context_user_id varchar(36);
Now, everything is fine.
The problem
Hi there, since I've updated my Home Assistant Docker container the logs contain repeating entries like the one below. Seems like these entries are connected with multiple entities (e.g. could spot sensors and scenes).
2022-06-01 20:49:51 ERROR (Recorder) [homeassistant.components.recorder.core] Unhandled database error while processing task CommitTask(): (MySQLdb._exceptions.DataError) (1406, "Data too long for column 'context_id' at row 1")
See full traceback under "Anything in the logs that might be useful for us?"
I'm using MySQL 10.6.5 as Docker container.
What version of Home Assistant Core has the issue?
core-2022.6.0
What was the last working version of Home Assistant Core?
core-2022.5.5
What type of installation are you running?
Home Assistant Container
Integration causing the issue
Recorder (I guess)
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