From 560805ac4c3ab2173e30e6d33292c9b911a0240c Mon Sep 17 00:00:00 2001 From: Valentin Rothberg Date: Thu, 23 Feb 2023 09:47:14 +0100 Subject: [PATCH] sqlite: AllContainers: fix inner join The base table was missing, so we caused a syntax error. Signed-off-by: Valentin Rothberg --- libpod/sqlite_state.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libpod/sqlite_state.go b/libpod/sqlite_state.go index 95152876c8..a573480955 100644 --- a/libpod/sqlite_state.go +++ b/libpod/sqlite_state.go @@ -716,7 +716,7 @@ func (s *SQLiteState) AllContainers(loadState bool) ([]*Container, error) { ctrs := []*Container{} if loadState { - rows, err := s.conn.Query("SELECT ContainerConfig.JSON, ContainerState.JSON AS StateJSON INNER JOIN ContainerState ON ContainerConfig.ID = ContainerState.ID;") + rows, err := s.conn.Query("SELECT ContainerConfig.JSON, ContainerState.JSON AS StateJSON FROM ContainerConfig INNER JOIN ContainerState ON ContainerConfig.ID = ContainerState.ID;") if err != nil { return nil, fmt.Errorf("retrieving all containers from database: %w", err) }