Skip to content

Commit

Permalink
fix checking database id in creating table - main (#20582)
Browse files Browse the repository at this point in the history
- TN gest txn database handle by ID to prevent inconsistent data

Approved by: @XuPeng-SH
  • Loading branch information
aptend authored Dec 7, 2024
1 parent fc55c89 commit 0f09078
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/vm/engine/tae/rpc/handle.go
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,8 @@ func (h *Handle) HandleCreateRelation(
)
})
ctx = defines.AttachAccount(ctx, c.AccountId, c.Creator, c.Owner)
dbH, err := txn.GetDatabaseWithCtx(ctx, c.DatabaseName)
txn.BindAccessInfo(c.AccountId, c.Creator, c.Owner)
dbH, err := txn.GetDatabaseByID(c.DatabaseId)
if err != nil {
return err
}
Expand Down

0 comments on commit 0f09078

Please sign in to comment.