summaryrefslogtreecommitdiffstats
path: root/src/sql/drivers
Commit message (Collapse)AuthorAgeFilesLines
* MySQL: Add support for the timeout options via the connectionOptionsAndy Shaw2015-04-271-12/+29
| | | | | | Task-number: QTBUG-321 Change-Id: I0bbc1ae713fb0278a9973f8e87f28f1b3f1c49ce Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* MySQL: Keep the precision of the field when formatting the valueAndy Shaw2015-03-201-0/+3
| | | | | Change-Id: I4ab08be5112167a617d6d1d109754f2404a9605f Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* QtSql: Fix const correctness in old style castsThiago Macieira2015-03-112-22/+22
| | | | | | | Found with GCC's -Wcast-qual. Change-Id: Ia0aac2f09e9245339951ffff13c94688f5b6ed76 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* PostgreSQL: Fix special floating point handling for 'float' types.Friedemann Kleint2015-02-181-15/+27
| | | | | | | | | Introduce a template function to determine the special values via macro and use that for QVariant::Double and QMetaType::Float. Task-number: QTBUG-44381 Change-Id: I379dd82b22d467b0aebaa42f4f0f5c52472a5c47 Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* Pass params of shareable type by const-ref rather than by valueKonstantin Ritt2015-02-131-1/+1
| | | | | | | | ...where passing them by value was not intentional. Change-Id: Ifd5036d57b41fddeeacfbd3f5890881605b80647 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update copyright headersJani Heikkinen2015-02-1118-126/+126
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2015-01-212-27/+28
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/global.pri src/corelib/global/qcompilerdetection.h src/corelib/global/qglobal.h src/corelib/tools/qdatetime.cpp src/plugins/platforms/xcb/qxcbscreen.h src/plugins/platforms/xcb/qxcbwindow.h src/widgets/dialogs/qcolordialog.cpp src/widgets/dialogs/qcolordialog_p.h tools/configure/configureapp.cpp Change-Id: Ie9d6e9df13e570da0a90a67745a0d05f46c532af
| * QODBC: fix converted string values empty SQLServer 2012Maximilian Hrabowski2014-12-301-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | SQL Server 2012 Native Client (version 11.0.2100.60) or later introduced a change in the behavior of the SQLGetData method when converted string values are involved. In older version a (sometimes wrong) size was returned. Now always SQL_NO_TOTAL is returned which signals to read as much data as available. SQL_NO_TOTAL was handled like SQL_NULL_DATA in the code before which indicates a NULL value so the returned string was empty. See link for more info: http://msdn.microsoft.com/en-us/library/jj219209.aspx Change-Id: Ia0d2296caf593890b301ee1848d1bf3eb8d7b6fe Reviewed-by: Mark Brand <mabrand@mabrand.nl>
| * Added timezone support for datetime fields in PSQLJulien Blanc2014-12-301-26/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds correct timezone support in PSQL plugin. Prior to this patch, no timezone support was provided, so only the following case worked : * using local time in both client application and postgresql server * datetime were using second precision This patch tries to take care that postgresql has two different datatypes for date time, respectively : * timestamp with time zone * timestamp without time zone Both are internally stored as UTC values, but are not parsed the same. * timestamp with time zone assumes that there is a time zone information and will parse date time accordingly, and then, convert into UTC before storing them * timestamp without time zone assumes that there is no time zone information and will silently ignore any, unless the datetime is explicitly specified as having a time zone, in case it will convert it into UTC before storing it Both are retrieved as local time values, with the following difference * timestamp with time zone includes the timezone information (2014-02-12 10:20:12+0100 for example) * timestamp without time zone does not include it The patch does the following : * parse the date retrieved by postgresql server using QDateTime functions, which work correctly * always convert the date to UTC before giving it to postgresql * force time zone so that timezone information is taken into account by postgresql * also adds the milliseconds when storing QDateTime values The following configurations are tested to work : * client and server using same timezone, timestamp with or without tz * client and server using different timezone, timestamp with tz The following configuration will *not* work : * client and server using different timezones, timestamp without tz Because data will be converted to local time by the postgresql server, so when returned it will be different from what had been serialized. Prior to this patch, it gave the illusion to work because since TZ information was lost, time was stored as local time from postgresql. Lots of inconsistencies occurred, though, in case client tz changes... I don't expect this to be an issue since having different TZ in server and client and *not* handling this is a broken setup anyway. Almost based on changes proposed by julien.blanc@nmc-company.fr [ChangeLog][QtSql] Added timezone support for datetime fields in PSQL Task-number: QTBUG-36211 Change-Id: I5650a5ef60cb3f14f0ab619825612831c7e90c12 Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* | Return true for QSqlQuery::isNull on non-existent fields.Milian Wolff2014-12-291-0/+2
| | | | | | | | | | | | | | | | This fixes the tst_QSqlQuery::isNull test case when run against a MySQL database driver. Change-Id: I8248ba956472bae97a64247594055e6f02840557 Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* | Add Q_DECL_OVERRIDE in the src subdirectoryOlivier Goffart2014-12-035-85/+85
| | | | | | | | | | | | | | | | | | | | Done automatically with clang-modernize on linux (But does not add Q_DECL_OVERRIDE to the function that are marked as inline because it a compilation error with MSVC2010) Change-Id: I2196ee26e3e6fe20816834ecea5ea389eeab3171 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2014-11-271-1/+1
|\| | | | | | | Change-Id: Id20053d261b4fbbcc0ac8ba49dd3ef2253fa4b95
| * sqlite: don't use deprecated QSqlError constructorShawn Rutledge2014-11-261-1/+1
| | | | | | | | | | | | | | so that it can build with configure -no-feature-DEPRECATED Change-Id: Id2decc05974bad249c79936d99ab63d3cfc375ad Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | Retrieve auto-value for ODBC fields.Friedemann Kleint2014-10-271-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce a static function returning the value called from qMakeFieldInfo(SQLHANDLE). The field is currently only populated when executing a query. Populating it from QODBCDriver::record() would require executing a dummy query, which is problematic since QSqlField does not have any provisions for delayed evaluation. Document the limitation. Task-number: QTBUG-39388 Change-Id: Ib2d2f2653b8b757389f627142c61c13a117fef72 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Split up function qMakeFieldInfo() in ODBC plugin.Friedemann Kleint2014-10-271-13/+51
| | | | | | | | | | | | | | | | | | | | | | Refactor code to extract an overload of qMakeFieldInfo() that only takes an SQLHANDLE hStmt parameter. This allows for easy debugging and inspecting driver-dependent additional columns in QODBCDriver::record(). Task-number: QTBUG-39388 Change-Id: Id338838f837746beff1b2711bf2cd66ca8c7afe6 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Fix MSVC warnings about integer conversions in ODBC driver.Friedemann Kleint2014-10-241-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | qsql_odbc.cpp(360) : warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data qsql_odbc.cpp(380) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data qsql_odbc.cpp(2052) : warning C4267: 'argument' : conversion from 'size_t' to 'SQLSMALLINT', possible loss of data qsql_odbc.cpp(2070) : warning C4267: 'argument' : conversion from 'size_t' to 'SQLSMALLINT', possible loss of data qsql_odbc.cpp(2096) : warning C4267: 'argument' : conversion from 'size_t' to 'SQLSMALLINT', possible loss of data Task-number: QTBUG-39388 Change-Id: Ie97d9e968d5c7b013b0d364c64175aa9b329ae97 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Remove non-UNICODE code branches from ODBC plugin.Friedemann Kleint2014-10-241-97/+4
|/ | | | | | Task-number: QTBUG-39388 Change-Id: If22876454547098dd00e477c0593da7c4be0e803 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Removing a few unneeded "? true : false"Alessandro Portale2014-10-091-1/+1
| | | | | | | Change-Id: Ib13f0ddd65fe78f5559f343f2fc30756b1d3ef76 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Expose QSqlDriverPrivate dbmsType in public QSqlDriver apiMatt Broadstone2014-09-249-23/+23
| | | | | | | | | | dbmsType was previously kept as a private variable in QSqlDriverPrivate, however it's particularly useful for QODBC users. [ChangeLog][QtSql][QSqlDriver] Add support for determining DBMS type from SQL driver. Change-Id: If1c221520da9ac4ccef85a02db078679d76eac92 Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* Update license headers and add new license filesMatti Paaso2014-09-2418-341/+197
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* qsql ibase: fix memory corruption due to LONG being 4 bytes in firebird.David Faure2014-09-101-5/+9
| | | | | | | | | | | As fb_types.h says, Firebird requires (S)LONG to be 32 bit, and it defines SLONG to int. This leads to sqllen being 4, so qsql_ibase.cpp allocates 4 bytes... and was writing 8 bytes into it. Fixed by checking sqllen, the same way QIBaseResult::gotoNext does. Change-Id: Ie8680d32f98c354dfc8430b8efbfe95450556956 Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* Initialize the count variable used in SQLNumResultCols to 0Andy Shaw2014-05-272-6/+6
| | | | | | | | | | | If the call to SQLNumResultCols fails for whatever reason then it will not be correctly caught since the count might be higher than 0 since it is uninitalized. This ensures that if it fails then it does not try to act as if it succeeded. Task-number: QTBUG-39137 Change-Id: Ifae8c1f7fac8416643f2317747f87295642a7935 Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* Fix PSQL column's metadataparihaaraka2014-04-291-5/+26
| | | | | | | | | Fixed libpq's PQfmod() interpretation inside QPSQLResult::record() Task-number: QTBUG-12477 Change-Id: I0e4c94ca1b06fd6a8e5b5702235cdd6d9736f8bf Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* Fix access of tmpStorage in QODBCResult::exec().Friedemann Kleint2014-04-031-25/+20
| | | | | | | | | | | Instead of using a list and appending / popping of elements, use a vector of constant size and access via index to avoid bookkeeping errors. Task-number: QTBUG-37831 Change-Id: Icb5a182626c63e693b04daaf7a2f70997d9aeae1 Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* [QtSql]QIBASE]add support for prepared queries in numRowsAffectedIsrael Lins Albuquerque2014-03-291-2/+12
| | | | | | | Prepared queries need to be handled as procedures. Change-Id: I4b4d7743fe45c416ca83ceb942aa48d79731f2f8 Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* Fix QByteArray memory corruption in QIBaseDriver::open().Friedemann Kleint2014-03-191-20/+15
| | | | | | | | | | Rewrite code to use QByteArray::reserve(), QByteArray::append() instead of memcpy(). Task-number: QTBUG-37508 Change-Id: I16ead153f33fa5a34bc01ee27ae4cd1b8993b65e Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-01-201-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qglobal.h src/corelib/tools/qstring.cpp src/gui/image/image.pri src/gui/image/qimage.cpp src/plugins/platforms/cocoa/qcocoawindow.h src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/eglfs/qeglfshooks_stub.cpp tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp Change-Id: I3b9ba029c8f2263b011f204fdf68c3231c6d4ce5
| * Minor optimization use QString midRef instead of mid.Jędrzej Nowacki2014-01-151-1/+1
| | | | | | | | | | | | | | It doesn't create a temporary string. Change-Id: If5c540422f69e573107d1f5a886ac7174ae99853 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | Replace win32-g++ with mingw scopeKai Koehne2014-01-172-2/+2
| | | | | | | | | | | | | | | | Commit 773dd01 introduced a general mingw platform scope, which is cleaner and more flexible than matching the spec name. Change-Id: Ie3a9cb791a83f7c8a51bc4e23069190c452ab521 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | expand tabs and related whitespace fixes in *.{cpp,h,qdoc}Oswald Buddenhagen2014-01-131-1/+1
| | | | | | | | | | | | | | | | the diff -w for this commit is empty. Started-by: Thiago Macieira <thiago.macieira@intel.com> Change-Id: I77bb84e71c63ce75e0709e5b94bee18e3ce6ab9e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QSqlError: Set error code for psql-driver.Marcel Krems2013-12-201-3/+4
| | | | | | | | | | | | Task-number: QTBUG-142 Change-Id: I4a68da595b7c8869188225958eaa88f789d4c3bf Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-12-053-12/+26
|\| | | | | | | | | | | | | Conflicts: src/sql/drivers/sqlite/qsql_sqlite.cpp Change-Id: Ia7cffd2c99ae3d5eea6b5740683c06e921336dcd
| * Clear isOpenError flag on successful open callTobias Koenig2013-12-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | Clear the isOpenError flag in IBase driver if the QIBaseDriver::open() call was successful, otherwise a previous, unsuccessful open() call would block any further QSqlQuery::exec() calls on this database connection. Task-number: QTBUG-13435 Change-Id: Idc64e28cd63805a13f208702ec87dc1bf6b98798 [ChangeLog][QtSql][QIBASE] Fixed the internal state of IBase driver after a failed open call Reviewed-by: Mark Brand <mabrand@mabrand.nl>
| * Support custom port number in IBASE SQL driverTobias Koenig2013-12-011-2/+6
| | | | | | | | | | | | | | | | | | | | Let the IBASE SQL driver use the custom port number that is set via QSqlDatabase::setPort(). Task-number: QTBUG-33345 Change-Id: Ib55b32c8a318d82038d66e8645b416e36dad3edf [ChangeLog][QtSql][QIBASE] Support custom port number Reviewed-by: Mark Brand <mabrand@mabrand.nl>
| * Fix compilation of OCI driverTobias Koenig2013-12-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | Add missing feature enum in switch statement to avoid warning that would lead to compilation error when compiled with -Wall. Task-number: QTBUG-34794 Change-Id: Ia2f70f27ecbb7a7dfc9d36d261103ff49b6c5e4b [ChangeLog][QtSql][QOCI] Fix compilation Reviewed-by: Mark Brand <mabrand@mabrand.nl>
| * Fix evaluation of SQLite driver optionsTobias Koenig2013-12-011-10/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Ensure that the options, which are passed to the SQLite driver, are evaluated in the correct order and do not overwrite each other. According to http://www.sqlite.org/c3ref/open.html the SQLITE_OPEN_READONLY and (SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE) are mutual exclusive, but SQLITE_OPEN_URI can be combined with both of them. Task-number: QTBUG-35186 [ChangeLog][QtSql][QSQLITE] Fixed evaluation of driver options Change-Id: I8e74fe1ce43b9118b15f7b13fc71670bdcd73f68 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* | Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Frederik Gladhorn2013-12-012-1/+16
|\| | | | | | | refs/staging/dev
| * Fix sub-second handling in SQLite driverTobias Koenig2013-11-281-0/+15
| | | | | | | | | | | | | | | | | | | | | | Use explicit format string, that contains milliseconds, when converting an QDateTime/QTime to a SQLite field content. Task-number: QTBUG-24200 [ChangeLog][QtSql][QSQLITE] Fix sub-second handling Change-Id: Ib89152b7c3dd780b57a8826beff8b6b118e9d3d6 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
| * Fix sub-second handling in MySQL driverTobias Koenig2013-11-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | As stated in http://dev.mysql.com/doc/refman/5.7/en/c-api-prepared-statement-data-structures.html the content of MYSQL_TIME.second_part field is supposed to be in microseconds not milliseconds. Task-number: QTBUG-31124 [ChangeLog][QtSql][QMYSQL] Fix sub-second handling Change-Id: I5718868029bdedab9508213e800d2dcf3da9be9a Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* | Allow temporary databases in sqlite driverNicolas Cornu2013-11-301-2/+0
|/ | | | | | | | | http://www3.sqlite.org/inmemorydb.html#temp_db [ChangeLog][QtSql][QSQLITE] Enable creating temporary databases Change-Id: I9972fba5c91eca55cfc5a84f94cff03d19992324 Reviewed-by: Tobias Koenig <tobias.koenig.qnx@kdab.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* Add QSQLITE_OPEN_URI database connection flagTobias Koenig2013-11-041-0/+2
| | | | | | | | | | This flag enables the URI mode for database names in the SQLite backend. Without this flag, it's not possible to use URIs like 'file:somedb?mode=memory&cache=shared' to create shared, in-memory databases. Change-Id: I2938184dad1f27c7af454385ca305bd4f6ed1a5e Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* Fix - psql driver must format qdatetime using isoCristian Tarsoaga2013-10-261-2/+2
| | | | | | | | QDateTime must be formatted as ISO8601 specifies, date/month must pe padded with 0 until width is 2 Task-number:QTBUG-33389 Change-Id: If07bcaa976ea3583369da3fd21ce442ee30e8c1f Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Add two enums that weren't handled in the ibase SQL driverThiago Macieira2013-10-031-0/+4
| | | | | | | | qsql_ibase.cpp:1155:23: error: enumeration value ‘LowPrecisionDouble’ not handled in switch [-Werror=switch] qsql_ibase.cpp:1419:12: error: enumeration value ‘CancelQuery’ not handled in switch [-Werror=switch] Change-Id: I3c6102051cde80c81948f5a64f9addcf7a371136 Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-08-271-1/+1
|\ | | | | | | | | | | | | Conflicts: examples/widgets/doc/src/addressbook-fr.qdoc Change-Id: Id1196e8e0c6445f1616c3f29234c974d809f8e48
| * Construct a valid QTime when creating timestamps for iBase SQL driver.Mitch Curtis2013-08-211-1/+1
| | | | | | | | | | | | | | | | | | 0e62fc73c905d1f476f3c1493db1bde8096ac609 requires this. Task-number: QTBUG-29261 Change-Id: Idd8b630c72d0fd1c255695a8c2c22f9fe32767ee Reviewed-by: John Layt <jlayt@kde.org>
* | Remove use of QFlag in the SQL driversThiago Macieira2013-08-242-23/+23
|/ | | | | | | It's not clear why they were added, but they aren't needed anymore. Change-Id: I1d919deefdbd6a71fa255eeac1a8543c33ba390d Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Fix comma warning found by ICCThiago Macieira2013-07-011-1/+1
| | | | | | | qsql_psql_p.h(122): warning #271: trailing comma is nonstandard Change-Id: I35e12b2ae0201b8a9905d3505697a9b36a1a79e2 Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* Improve support for <MODULE>_PATH optionsMatt Fischer2013-05-101-7/+2
| | | | | | | | | | | | | | | | | | | | | | Several modules, including DBus, MySQL, and OpenSSL have configure options of the form <MODULE>_PATH, which is used on Windows (where pkg-config is not present) to specify the locations of third-party libraries. These switches had been implemented by adding extra variables which were referenced in .pro files, to add the appropriate compiler and linker switches. This is undesirable because it means there are two independent paths for adding the switches to the build, which can get out of sync with each other, and indeed this had happened for some of the DBus tools. To remedy the situation, all three of the switches were reworked so that they added values directly to the principal variables that are used in the project files. This reduces maintenance, by ensuring that the pkg-config and non-pkg-config paths appear the same to the rest of the build system. Change-Id: Iae342f1d14b79fbcfef9fe38aadc803ad3141799 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* qsql_odbc: fix SQLGetStmtAtt usageMark Brand2013-04-241-7/+5
| | | | | | | | | | | | | | | | | | | Failure to initialize the variable can cause spurious non-zero values. http://msdn.microsoft.com/en-us/library/windows/desktop/ms715438(v=vs.85).aspx "..value can either be a SQLULEN value or a null-terminated character string. If the value is a SQLULEN value, some drivers may only write the lower 32-bit or 16-bit of a buffer and leave the higher-order bit unchanged. Therefore, applications should use a buffer of SQLULEN and initialize the value to 0 before calling this function. Also, the BufferLength and StringLengthPtr arguments are not used." Follow-up to 1509316a37fb2d365230d020d1dfc251c830fd56 Change-Id: I2e92eb845a2590bea0849c52bde8902adff1b419 Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* Use Q_DECLARE_PRIVATE for Oracle and DB2 pluginsAndy Shaw2013-04-094-12/+31
| | | | | | | | | This completes the change started with 0bdc86d9ef7be8e27598d245c6ca8026f08aff12 by providing the implementation for the Oracle and DB2 sqldrivers Change-Id: Ia14415c6d7dea51f1369a81236f79aff892b3af7 Reviewed-by: Mark Brand <mabrand@mabrand.nl>