From 1f08d6e0151986d4ba4eedb26bf114a47b411bbc Mon Sep 17 00:00:00 2001 From: aeneasr <3372410+aeneasr@users.noreply.github.com> Date: Wed, 20 Nov 2024 12:18:14 +0100 Subject: [PATCH 1/2] fix: incorrect query plan --- persistence/sql/identity/persister_identity.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/persistence/sql/identity/persister_identity.go b/persistence/sql/identity/persister_identity.go index 5b29017779ca..c074da8c955f 100644 --- a/persistence/sql/identity/persister_identity.go +++ b/persistence/sql/identity/persister_identity.go @@ -923,9 +923,10 @@ func (p *IdentityPersister) ListIdentities(ctx context.Context, params identity. `) wheres += fmt.Sprintf(` - AND ic.nid = ? AND ici.nid = ? - AND ((ic.identity_credential_type_id IN (?, ?, ?) AND ici.identifier %s ?) - OR (ic.identity_credential_type_id IN (?) AND ici.identifier %s ?)) + AND ic.nid = ? + AND ici.nid = ? + AND ((ici.identity_credential_type_id IN (?, ?, ?) AND ici.identifier %s ?) + OR (ici.identity_credential_type_id IN (?) AND ici.identifier %s ?)) `, identifierOperator, identifierOperator) args = append(args, nid, nid, From 43b89fb8415893533e115ee41b7ee5d38c1fac18 Mon Sep 17 00:00:00 2001 From: aeneasr <3372410+aeneasr@users.noreply.github.com> Date: Wed, 20 Nov 2024 13:39:24 +0100 Subject: [PATCH 2/2] chore: synchronize workspaces --- internal/client-go/go.sum | 1 + persistence/sql/identity/persister_identity.go | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/client-go/go.sum b/internal/client-go/go.sum index c966c8ddfd0d..6cc3f5911d11 100644 --- a/internal/client-go/go.sum +++ b/internal/client-go/go.sum @@ -4,6 +4,7 @@ github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5y golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= diff --git a/persistence/sql/identity/persister_identity.go b/persistence/sql/identity/persister_identity.go index c074da8c955f..8d5a08f04415 100644 --- a/persistence/sql/identity/persister_identity.go +++ b/persistence/sql/identity/persister_identity.go @@ -923,8 +923,7 @@ func (p *IdentityPersister) ListIdentities(ctx context.Context, params identity. `) wheres += fmt.Sprintf(` - AND ic.nid = ? - AND ici.nid = ? + AND ic.nid = ? AND ici.nid = ? AND ((ici.identity_credential_type_id IN (?, ?, ?) AND ici.identifier %s ?) OR (ici.identity_credential_type_id IN (?) AND ici.identifier %s ?)) `, identifierOperator, identifierOperator)