Fix sqlite driver memory eating due to close failure
authorHonglei Zhang <honglei.zhang@nokia.com>
Wed, 30 Nov 2011 11:36:40 +0000 (13:36 +0200)
committerHonglei Zhang <honglei.zhang@nokia.com>
Wed, 30 Nov 2011 11:36:40 +0000 (13:36 +0200)
commit9a5fb6bd5f0fb3b37897bf722e4cc1673309623c
tree3e7a2a4c9df49a9bc110f5dd24d7ed833ff8a2a4
parent1ba0ce0cc1ab94f1397114ac8024a60dc7dfbdd8
Fix sqlite driver memory eating due to close failure

If an ongoing query is not finalized before close function is
called, sqlite driver still tries to close the connection to
sqlite. In this case, sqlite reports an error to sqlite driver
which is not reported to the client. The failure in close causes
connection to sqlite unclosed and memory is not freed. This
fix tries to finalize all queries before close function is called.
The close function should succeed.

Task-number: QTBUG-16967
Reviewed-by: Charles Yin
src/sql/drivers/sqlite/qsql_sqlite.cpp
tests/auto/qsqlquery/tst_qsqlquery.cpp