From 450e8e59d864b706f3796f25ecb59a4906ee70c9 Mon Sep 17 00:00:00 2001 From: daviszhen Date: Wed, 11 Dec 2024 21:31:46 +0800 Subject: [PATCH] fix ci --- pkg/frontend/authenticate_test.go | 6 +++--- pkg/frontend/publication_subscription.go | 3 --- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/pkg/frontend/authenticate_test.go b/pkg/frontend/authenticate_test.go index 3909ee11b14b6..3140ccd948a13 100644 --- a/pkg/frontend/authenticate_test.go +++ b/pkg/frontend/authenticate_test.go @@ -7126,7 +7126,7 @@ func Test_doDropAccount(t *testing.T) { bh.sql2result["commit;"] = nil bh.sql2result["rollback;"] = nil - sql := getAccountIdNamesSql + ` and account_name = "acc" order by account_id for update` + sql := getAccountIdNamesSql + ` order by account_id for update` mrs := newMrsForGetAllAccounts([][]interface{}{ {uint64(0), "sys", "open", uint64(1), nil}, {uint64(1), "acc", "open", uint64(1), nil}, @@ -7187,7 +7187,7 @@ func Test_doDropAccount(t *testing.T) { bh.sql2result["commit;"] = nil bh.sql2result["rollback;"] = nil - sql := getAccountIdNamesSql + ` and account_name = "acc" order by account_id for update` + sql := getAccountIdNamesSql + ` order by account_id for update` bh.sql2result[sql] = newMrsForGetAllAccounts([][]interface{}{}) sql, _ = getSqlForDeleteAccountFromMoAccount(context.TODO(), mustUnboxExprStr(stmt.Name)) @@ -7234,7 +7234,7 @@ func Test_doDropAccount(t *testing.T) { bh.sql2result["commit;"] = nil bh.sql2result["rollback;"] = nil - sql := getAccountIdNamesSql + ` and account_name = "acc" order by account_id for update` + sql := getAccountIdNamesSql + ` order by account_id for update` bh.sql2result[sql] = newMrsForGetAllAccounts([][]interface{}{}) sql, _ = getSqlForDeleteAccountFromMoAccount(context.TODO(), mustUnboxExprStr(stmt.Name)) diff --git a/pkg/frontend/publication_subscription.go b/pkg/frontend/publication_subscription.go index 94131dc98c38c..afbbb1279280d 100644 --- a/pkg/frontend/publication_subscription.go +++ b/pkg/frontend/publication_subscription.go @@ -628,9 +628,6 @@ func dropPublication(ctx context.Context, bh BackgroundExec, ifExists bool, pubN func getAccounts(ctx context.Context, bh BackgroundExec, accName string, forUpdate bool) (idInfoMap map[int32]*pubsub.AccountInfo, nameInfoMap map[string]*pubsub.AccountInfo, err error) { ctx = defines.AttachAccountId(ctx, catalog.System_Account) sql := getAccountIdNamesSql - if len(accName) != 0 { - sql += fmt.Sprintf(` and account_name = "%s"`, accName) - } sql += " order by account_id " if forUpdate { sql += " for update"