Skip to content

Commit

Permalink
Merge pull request #115 from ddosify/fix/empty-prepared-stmt-query
Browse files Browse the repository at this point in the history
filter empty prepared queries
  • Loading branch information
fatihbaltaci authored Mar 20, 2024
2 parents cd42677 + 27a2c93 commit 97bfd43
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion aggregator/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -1332,7 +1332,7 @@ func (a *Aggregator) parseSqlCommand(d *l7_req.L7Event) (string, error) {
a.pgStmtsMu.RLock()
query, ok := a.pgStmts[a.getPgStmtKey(d.Pid, d.Fd, stmtName)]
a.pgStmtsMu.RUnlock()
if !ok { // we don't have the query for the prepared statement
if !ok || query == "" { // we don't have the query for the prepared statement
// Execute (name of prepared statement) [(parameter)]
return fmt.Sprintf("EXECUTE %s *values*", stmtName), nil
}
Expand Down

0 comments on commit 97bfd43

Please sign in to comment.