Ensure that QSqlDatabase::database() is still thread-safe
authorAndy Shaw <andy.shaw@digia.com>
Thu, 10 Nov 2011 06:56:57 +0000 (07:56 +0100)
committerQt by Nokia <qt-info@nokia.com>
Fri, 17 Feb 2012 04:28:28 +0000 (05:28 +0100)
commit90128ba8778327a13f4eac2809d9db783f33690c
tree4be86ff36d6dcf8d28956a292053814c4c918547
parent9aa51821e446152517aa3022bcf7ebbcc7d3d888
Ensure that QSqlDatabase::database() is still thread-safe

QSqlDatabase::database() is documented to be thread-safe and when the
driver is queried for the numericalPrecisionPolicy set then it can
comprimise the thread-safety.

Since the driver itself (if one is set) will be queried for the
numericalPrecisionPolicy when numericalPrecisionPolicy() is called on
the QSqlDatabase then we can have it fallback to the default instead
rather than taking the driver's own setting.

Task-number: QTBUG-13423
(cherry picked from commit e7e9fca6c0cd1d0869029fc6e9d7605234ee5bb2)
Change-Id: Ie7e9fca6c0cd1d0869029fc6e9d7605234ee5bb2
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
src/sql/kernel/qsqldatabase.cpp