qt5base-lts/tests/auto/sql/kernel/qsqldatabase
Aaron McCarthy 7456562e7f Fix error reporting in TDS SQL driver.
The error and message handlers used by the freetds library were getting
reset to back to the default every time a database was opened.  The
Qt TDS SQL driver was calling dbinit() from QTDSDriver::open().  This
had two problems:

1. dbinit() would reset the error handler previously set by a call to
   dberrhandle().  A db error would then cause the application to
   abort.
2. freetds expects dbinit() and dbexit() to be called symmetrically.
   Opening multiple database connections would result in freetds not
   cleaning up on application close.

Solved by moving the dbinit() call into the QTDSDriver constructor.

Change-Id: I59018d83238672c903b96a4d7f3f21b664c3ff4c
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2012-11-18 23:13:29 +01:00
..
testdata Moved sql autotests into new directory structure 2011-09-06 09:32:15 +02:00
.gitignore Moved sql autotests into new directory structure 2011-09-06 09:32:15 +02:00
qsqldatabase.pro Set the Qt API level to compatibility mode in all tests. 2012-08-01 15:37:46 +02:00
tst_databases.h Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
tst_qsqldatabase.cpp Fix error reporting in TDS SQL driver. 2012-11-18 23:13:29 +01:00