Fix sqlite driver memory eating due to close failure
authorHonglei Zhang <honglei.zhang@nokia.com>
Tue, 29 Nov 2011 11:00:16 +0000 (13:00 +0200)
committerQt by Nokia <qt-info@nokia.com>
Wed, 30 Nov 2011 12:53:24 +0000 (13:53 +0100)
commitd34170aff2707b223b0e22e61efa7a26505f9c6e
treec35525d009a738aaf416f3a9b507baa7d481b347
parent5fb239e8a3117341fa1b0fe4749dbe14e51c2028
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
Change-Id: I2f10a2a9017446a9d44b693b00464a89625e3602
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
src/sql/drivers/sqlite/qsql_sqlite.cpp
tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp