diff --git a/go/vt/vtgate/executor.go b/go/vt/vtgate/executor.go index f180f0fb358..73fb0bf6346 100644 --- a/go/vt/vtgate/executor.go +++ b/go/vt/vtgate/executor.go @@ -160,7 +160,11 @@ func (e *Executor) Execute(ctx context.Context, method string, safeSession *Safe saveSessionStats(safeSession, stmtType, result, err) if result != nil && len(result.Rows) > *warnMemoryRows { warnings.Add("ResultsExceeded", 1) - log.Warningf("%q exceeds warning threshold of max memory rows: %v", sql, *warnMemoryRows) + piiSafeSQL, err := sqlparser.RedactSQLQuery(sql) + if err != nil { + piiSafeSQL = logStats.StmtType + } + log.Warningf("%q exceeds warning threshold of max memory rows: %v", piiSafeSQL, *warnMemoryRows) } logStats.Send()