Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sqlstats: fix race condition in ss_mem_iterator
StmtStatsIterator.Next() copies the next statement stats info into a new CollectedStatementStatistics object, but the slice fields of stmtStats.mu.data are not copied explicitly. This makes them susecptible to race conditions, as seen in #138224. To fix, all slice fields in the StatementStatistics are explicitly copied, using slices.Clone. Fixes: 138224 Epic: none Release note: none
- Loading branch information