Remove duplicate query logging that breaks Django's assertNumQueries (#4367)
* Remove duplicate query logging that breaks Django's assertNumQueries The SqlCommenter _QueryWrapper manually appends the SQL string to queries_log when a CursorDebugWrapper is active. However, CursorDebugWrapper.debug_sql already logs the query as a dict with "sql" and "time" keys. This causes two problems: 1. Queries are double-counted in queries_log 2. The raw string entries cause a TypeError in Django's assertNumQueries, which expects dict entries with a "sql" key Remove the manual append and let Django handle query logging. * Remove outdated comment about MySQL --------- Co-authored-by: Leighton Chen <lechen@microsoft.com>
F
Federico Bond committed
f91885923a9c586a1d91c44db25fc8957e02951a
Parent: 2c6fd20
Committed by GitHub <noreply@github.com>
on 5/19/2026, 5:27:56 PM