Message387272
If no rows match an aggregate query, _pysqlite_step_callback() is never called, and _pysqlite_final_callback() is called once. In order to prevent needless context allocation, we should pass 0 as the second argument to sqlite3_aggregate_context().
Quoting from https://sqlite.org/c3ref/aggregate_context.html:
Within the xFinal callback, it is customary to set N=0 in calls to sqlite3_aggregate_context(C,N) so that no pointless memory allocations occur. |
|
Date |
User |
Action |
Args |
2021-02-18 22:21:00 | erlendaasland | set | recipients:
+ erlendaasland, berker.peksag, serhiy.storchaka |
2021-02-18 22:21:00 | erlendaasland | set | messageid: <1613686860.13.0.742108376023.issue43258@roundup.psfhosted.org> |
2021-02-18 22:20:59 | erlendaasland | link | issue43258 messages |
2021-02-18 22:20:59 | erlendaasland | create | |
|