diff options
author | Andrii Zavorotnii <andrii.zavorotnii@gmail.com> | 2019-09-05 15:26:33 -0700 |
---|---|---|
committer | Andrii Zavorotnii <andrii.zavorotnii@gmail.com> | 2019-09-06 12:15:53 -0700 |
commit | 7e1a61dbcdb71e3220e5cc54cd2ef7d32b0b9b67 (patch) | |
tree | 630fdf358dac611fac8f0ee19362d9583f4fcec4 /sqlite3_opt_secure_delete_fast.go | |
parent | Fix memory leak in ExpandedSQL (#738) (diff) | |
download | golite-7e1a61dbcdb71e3220e5cc54cd2ef7d32b0b9b67.tar.gz golite-7e1a61dbcdb71e3220e5cc54cd2ef7d32b0b9b67.tar.xz |
Fix context cancellation racy handling
[why]
Context cancellation goroutine is not in sync with Next() method lifetime.
It leads to sql.ErrNoRows instead of context.Canceled often (easy to reproduce).
It leads to interruption of next query executed on same connection (harder to reproduce).
[how]
Do query in goroutine, wait when interruption done.
[testing]
Add unit test that reproduces error cases.
Diffstat (limited to 'sqlite3_opt_secure_delete_fast.go')
0 files changed, 0 insertions, 0 deletions