summaryrefslogtreecommitdiffstats
path: root/tests/auto/qsqlquery
Commit message (Collapse)AuthorAgeFilesLines
* ODBC: fixed consistence of return of QODBCResult::exec()Israel Lins2013-04-241-0/+4
| | | | | | | | | | | | The QODBCResult::exec() returns false when query is an delete with no data do delete caused by SQLExecute function returning SQL_NO_DATA, but the false return means error on execution. Task-number: QTBUG-10569 Change-Id: I6c7ebadcf62ab404b60c7bcccdab6a10bf16a923 Reviewed-by: Mark Brand <mabrand@mabrand.nl> (cherry-picked from qtbase commit 0646d1131b4bc65cdd9af29f4ce00fdd2398a3df) Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* ODBC: fix loss of milliseconds when binding QDateTimeIsrael Lins2013-04-241-3/+8
| | | | | | | | | | | | Caused by operator precedence error. Follow-up to commit b8b79a0f37ec74fd5b4ad829e522a384ba3622ae Task-number: QTBUG-2192 Change-Id: I17decd18c469b48a0bc938ae05c16cced8042219 Reviewed-by: Mark Brand <mabrand@mabrand.nl> (cherry-picked from qtbase commit 36b6d4afc970a328cced87af3d39b70d327eb3ad) Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* Fix for Sql query aliases with dotsMarko Kangas2013-04-231-0/+39
| | | | | | | | | | | Task-number: QTBUG-14904 Cherry-picked Qt5 change: 18be0749eb58316036d6eaff9dc5fecc1379f31a Change-Id: I81edd9df68cfde15900315978dc3742ca6e22df5 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-131-1/+1
| | | | | | Change-Id: I52bf8ef0447b701b4ebf7d7d240013a72adb9425 Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* fix binding of bool type in mysql driverMark Brand2012-11-131-0/+35
| | | | | | | | | | | | | | | | | | | MYSQL_TYPE_TINY should be used for binding bool input value. MYSQL_TYPE_LONG might be too big for bool, resulting in bools being saved in the database as int 127. The problem was not specific to the vendor's BOOL column type. http://dev.mysql.com/doc/refman/5.0/en/numeric-type-overview.html http://dev.mysql.com/doc/refman/5.0/en/c-api-prepared-statement-type-codes.html Added generic autotest to make sure that binding bool works. All drivers should pass this test. Task-number: QTBUG-27763 Change-Id: I4e69f8e3b32fffb702ec9fa8a80ff5c50dea954b Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Bill King <bill.king@nokia.com> (cherry picked from qt5/qtbase commit 593b8f7f0b35ddc424d8ccbd5df11fcf2442858e))
* Fix error when inserting to tables with datetime fields with QODBCThiago A. Correa2012-10-081-1/+27
| | | | | | | | | | | | | | SQL Server 10 introduced stricter rules for TIMESTAMP validation, making it necessary to specify the decimal digits. Other databases might do the same as well, so this patch introduces a check for the TIMESTAMP column size and adjusts the decimal digits parameter as needed. Task-number: QTBUG-2192 Change-Id: If6d798c6c928ebda75bc474e49a07fbbfbe5816c Reviewed-by: Mark Brand <mabrand@mabrand.nl> (cherry picked from qtbase/b8b79a0f37ec74fd5b4ad829e522a384ba3622ae)
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-291-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: I280c0a575987d1770e354b4948f1d4d767d711ea Reviewed-by: Simo Fält <simo.falt@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Update contact information in license headers.Sergio Ahumada2012-08-011-2/+2
| | | | | | | | | | | | | - Replace Nokia contact email address with Qt Project website. - Remove "All rights reserved" line from license headers. As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: Ie7ba62011752fcb149b99b26317c54f2a0cfa931 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Memory leak fix of sqlite driver when close failedHonglei Zhang2012-04-031-0/+54
| | | | | | | | | | | | | | If an ongoing query is not finalized before close function is called, sqlite driver can't close the connection to sqlite. In this case, the failure is only reported to the client via getLastError(). Even if the client want to handle this case, there is no easy way to revoke the close function. This commit finalizes all queries before close is called. Task-number: QTBUG-16967 Change-Id: I069f6073bd46f53780e13d269e44aa86366e0574 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* Improve type detection for query resultsAndy Shaw2012-03-121-0/+118
| | | | | | | | | | | | | | | When an aggregate function is used for a column in a SQL resultset then it should ensure that the right data type is reported for that column. This also concerns expressions when the returned column does not map directly to a table column. Test included for this. Task-number: QTBUG-22038 Change-Id: I681297accc979081d14b44d190ab9d5f83aac215 Reviewed-by: Mark Brand <mabrand@mabrand.nl> Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com> (cherry picked from commit 678ab52ccba0b6a6903e9aee404dbe84fb74c91d)
* test: Split `qsqlquery' unit and benchmark testSergio Ahumada2012-02-032-38/+4
| | | | | | | | | | | | Moving benchmark test from 'tests/auto' to 'tests/benchmarks'. Also removing 'qttest_p4' usage while we are at it. - void benchmark(); was moved to 'tests/benchmarks/sql/kernel/qsqlquery' Change-Id: Icbe88fecdfe24a7754079451f635f9c19b3d6683 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Handle the 'real' datatype correctly in the SQLite driverAndy Shaw2012-01-261-0/+30
| | | | | | | | | | | | | The 'real' datatype should be seen as a QVariant::Double type and not as a QVariant::String type otherwise it does not get presented correctly when using a non Qt application to access it. Test is included for QSqlQuery. Task-number: QTBUG-16373 Change-Id: Ie323ce49eb95e4d6bb4c3814ba9a957a63f4b259 Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
* Update year in Nokia copyright messages.Jason McDonald2012-01-111-1/+1
| | | | | | | | | Simple search and replace. This commit doesn't touch 3rd-party files, nor translations (where the change is not so simple and will be handled in a separate commit). Change-Id: I4e48513b8078a44a8cd272326685b25338890148 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Revert "Fix sqlite driver memory eating due to close failure"Sinan Tanilkan2011-12-071-49/+0
| | | | | | Introduced a problem for the SDK (QTBUG-23036). This reverts commit 9a5fb6bd5f0fb3b37897bf722e4cc1673309623c.
* Fix sqlite driver memory eating due to close failureHonglei Zhang2011-11-301-0/+49
| | | | | | | | | | | | | 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
* QSQLITE support only one statement at a timeHonglei Zhang2011-11-301-0/+47
| | | | | | | | | | SQLite driver support only one statement at a time. This fix makes the exec and prepare call failed if more than one statements are given. This is bug fix for QTBUG-21884. Also the behaviour is documented in the API specification. Task-number: QTBUG-21884 Reviewed-by: Charles Yin
* Update licenseheader text in source files for qt4.8Jyri Tahtela2011-05-131-17/+17
| | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* let generated flag control SQL generationMark Brand2011-03-291-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, if QSqlField's QVariant value had type "invalid", this caused the field to be omitted in data-changing SQL statements generated from QSqlRecord edit buffers. Complaints against this mechanism: - It precludes initializing value type to field type, which would otherwise seem sensible and useful, such as when using model.data() in contexts where the field type is not readily available. - QSqlField::clear() does initialize value type to match field type and so is incompatible with this mechanism. - Problems such as described in QTBUG-13211. - Unwanted distinction between "invalid" and "null" when mapping field values to SQL values. - QSqlField's generated flag already provides a mechanism for controlling SQL generation. These complaints are redressed here by replacing this mechanism with reliance on QSqlField's generated flag. The flag is initialized to false in new edit records and set to true when a value is set. Applications can still manipulate generated flags directly to control SQL generation. Generation of SELECT statements already used the generated flag and is unaffected by this change. Merge-request: 1114 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com> Reviewed-by: Michael Goddard
* Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2011-01-171-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/webkit/imageanalyzer/imageanalyzer.h examples/webkit/imageanalyzer/mainwindow.h mkspecs/unsupported/qws/linux-x86-openkode-g++/qplatformdefs.h src/corelib/io/qfsfileengine_iterator_unix.cpp src/corelib/io/qfsfileengine_iterator_win.cpp src/corelib/kernel/qcoreapplication.cpp src/network/access/qnetworkaccessdatabackend.cpp src/plugins/bearer/connman/qconnmanservice_linux.cpp src/plugins/platforms/openvglite/qwindowsurface_vglite.h src/s60installs/bwins/QtCoreu.def src/s60installs/eabi/QtCoreu.def src/s60installs/s60installs.pro tools/assistant/tools/assistant/helpviewer_qwv.h tools/qdoc3/test/qt-html-templates.qdocconf
| * Update copyright year to 2011.Jason McDonald2011-01-101-1/+1
| | | | | | | | Reviewed-by: Trust Me
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2010-11-121-1/+130
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure doc/src/snippets/code/doc_src_qmake-manual.qdoc mkspecs/features/symbian/application_icon.prf mkspecs/features/symbian/default_post.prf mkspecs/features/symbian/symbian_building.prf qmake/generators/symbian/initprojectdeploy_symbian.cpp src/multimedia/audio/audio.pri src/network/access/qnetworkaccessmanager.cpp src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp src/opengl/qgl_p.h src/plugins/bearer/corewlan/qcorewlanengine.mm src/plugins/phonon/mmf/mmf.pro tests/auto/qscriptvalue/tst_qscriptvalue.cpp tests/auto/qscriptvalue/tst_qscriptvalue.h tools/qdoc3/doc/qdoc-manual.qdocconf
| * More fix for QTBUG-14640:oci performance problem with qlonglongCharles Yin2010-11-051-21/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | 1. OCINumber must be declared & initialized seperately, and the bound OCINumber values must be hold until the QOCIResultPrivate object is deleted. 2. More auto tests for this bug. 3. Add qulonglong support as well 4. Make the execBatch() works with longlong and ulonglong Task-number:QTBUG-14640 Reviewed-by: Michael Goddard Change-Id: I7d8bf1c44ce3aaa15ee85be325a5c98dc3ed3ce1
| * Fix QTBUG-14640:oci performance problem with qlonglongCharles Yin2010-11-011-1/+30
| | | | | | | | | | | | | | | | | | missing qlonglong switch case in bindValue(), so all qlonglong value fall back into QString, which makes the query slow. Change-Id: I7d8bf1c44ce3aaa15ee85be325a5c98dc3ed3ce1 Task-number:QTBUG-14640 Reviewed-by: Michael Goddard
| * Fix QTBUG-14132 oracle (xe) stored procedures with bind variables get errorsCharles Yin2010-10-291-0/+21
| | | | | | | | | | | | | | | | | | Strange Oracle bug: some Oracle servers crash the server process with non-zero error handle (mostly for 10g). So pass null error handle pointer to OCIAttrSet when setting OCI_ATTR_CHARSET_FORM to bypass this bug. Change-Id: Ifcf65994a22783e69a89bebe1adb882cdf36bdbb Task-number:QTBUG-14132 Reviewed-by: Michael Goddard
* | Align .pro with qmake: s/\.sources/.files/.Miikka Heikkinen2010-10-081-2/+2
|/ | | | | | | | | | Complement previous commit by aligning Qt itself to use .files consistently for DEPLOYMENT as well as INSTALLS. This excludes changes to webkit. Task-number: QTBUG-3216 Reviewed-by: axis
* Fix sqlite driver doesn't return error message RAISE by a trigger.Bill King2010-04-201-0/+27
| | | | | Task-number: QTBUG-7988 Reviewed-by: Justin McPherson
* Sql Autotest cleanup and tweaking.Bill King2010-03-251-6/+3
|
* Parallelize DB autotests, also some factorizationBill King2010-03-101-250/+267
| | | | | | Add local machine parallelization of auto-tests, not just host to host. Reviewed-by: Justin McPherson
* Fixes: Mysql truncation of integer values + some autotest cleanupBill King2010-03-051-15/+86
| | | | Task-number: QTBUG-5765
* Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2010-01-071-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.6-integration * '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1: QIODevice: Fix readAll() Temporary hackiesh solution to prevent BOM in the xml data. Fixed qxmlstream autotest when using shadow builds. Attempt at readding the capital P headers for Phonon Remove special Phonon processing from syncqt. Use the lowercase/shortname.h headers for Phonon includes Fixes a crash when setting focus on a widget with a focus proxy. Update copyright year to 2010 doc: Clarified activeSubControls and subControls. Remove warning "statement with no effect" doc: Clarified that .lnk files are System files on Windows.
| * Update copyright year to 2010Jason McDonald2010-01-061-1/+1
| | | | | | | | Reviewed-by: Trust Me
* | (mysql) Add test to the system so it's there for use later.Bill King2010-01-051-0/+38
|/ | | | | | | The test passes/doesn't fail, but is a useful test nonetheless, so adding it to the testsystem anyway. Task-number: QTBUG-6852
* (ODBC) Fixes segfault when error string is larger than 256 chars.Bill King2009-12-151-0/+24
| | | | | | | | | | SqlServer can throw custom error messages (via RaiseError) that can be up to 8000 chars long. Fixed this with a pre-query as to the length of the error string, then allocating enough space to retrieve the whole error string at once. Task-number: QTBUG-6618 Reviewed-by: Derick Hawcroft
* Fixes: QOCI setForwardOnly(true) accumulating values.Bill King2009-12-041-1/+27
| | | | | | | | | | readPiecewise() is assuming an empty valueCache when reading a new row. setForwardOnly(true) means that only one row is used/re-used. The value cache wasn't being cleared out when moving to a new row, so the above assumption was invalid. Task-number: QTBUG-6421 Reviewed-by: Justin McPherson
* Merge branch '4.5' into 4.6Morten Johan Sørvig2009-11-051-0/+34
|\ | | | | | | | | | | Conflicts: tests/auto/qsqlquery/tst_qsqlquery.cpp tests/auto/qtextlayout/tst_qtextlayout.cpp
| * Fix retrieval of SQL type "TIME" information for PostgreSQLDerick Hawcroft2009-11-051-0/+32
| | | | | | | | | | | | | | | | PostgreSQL can store/retieve the millisecond part of type "TIME" , so allow it in the API level. Task-number: QTBUG-5251 Reviewed-by: Bill King
* | Fixes Oracle batchExec using strings as out params.Bill King2009-10-271-0/+54
| | | | | | | | | | | | reserve() affects capacity(), not length(). Task-number: QTBUG-551
* | Autotest: fix building tst_qsqlquery.Thiago Macieira2009-10-261-1/+1
| | | | | | | | | | | | 'का' is not valid, since it encodes to more than 1 byte. Reviewed-by: Trust Me
* | Better sql unicode tests (still not working correctly tho).Bill King2009-10-231-7/+6
| |
* | Fix now invalid ExpectFail.Bill King2009-10-201-3/+0
| | | | | | | | The bug causing this fail is now fixed, so remove the expectfails.
* | Remove excess spam from autotests when postgresql creates primary indexes.Bill King2009-10-141-0/+5
| |
* | Fixed deployment when using cetest.axis2009-10-071-4/+6
| | | | | | | | | | | | | | | | | | | | | | Cetest (and other programs that upload dlls manually without using a package) need to deploy some plugins for specific tests. If those tests are deployed in a normal package however, the installation will fail because the plugins are already included in the Qt installation. Fixed that by putting the deployment inside a scope that cetest will define. RevBy: Miikka Heikkinen
* | Fixes autotest trying to delete table from wrong DBBill King2009-09-281-2/+2
| |
* | Merge branch '4.5' into 4.6Tom Cooksey2009-09-171-0/+38
|\ \ | |/ | | | | | | | | | | Conflicts: tests/auto/qimagereader/tst_qimagereader.cpp tests/auto/qpainter/tst_qpainter.cpp tests/auto/qtwidgets/tst_qtwidgets.cpp
| * Fixes issue of forward only datasets failing when not set so.Bill King2009-09-171-0/+38
| | | | | | | | | | | | | | | | | | Previously you had to set forward only on non-scrollable datasets explicitly. This queries ODBC, to determine if it's a scrollable dataset, and sets forwardOnly to false if it isn't. Task-number: QT-353 Reviewed-by: Justin McPherson
| * Update license headers again.Jason McDonald2009-09-081-4/+4
| | | | | | | | Reviewed-by: Trust Me
* | Update license headers again.Jason McDonald2009-09-091-4/+4
| | | | | | | | Reviewed-by: Trust Me
* | Mark these as fix later.Bill King2009-09-071-0/+5
| | | | | | | | | | The unicode logic is beyond me, leave these for fixing by someone else with more unicode knowledge.
* | Merge branch '4.5' into 4.6Thiago Macieira2009-08-311-13/+13
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: demos/boxes/glshaders.cpp demos/boxes/vector.h demos/embedded/fluidlauncher/pictureflow.cpp demos/embedded/fluidlauncher/pictureflow.h doc/src/desktop-integration.qdoc doc/src/distributingqt.qdoc doc/src/examples-overview.qdoc doc/src/examples.qdoc doc/src/frameworks-technologies/dbus-adaptors.qdoc doc/src/geometry.qdoc doc/src/groups.qdoc doc/src/objecttrees.qdoc doc/src/platform-notes.qdoc doc/src/plugins-howto.qdoc doc/src/qt3support.qdoc doc/src/qtdbus.qdoc doc/src/qtdesigner.qdoc doc/src/qtgui.qdoc doc/src/qtmain.qdoc doc/src/qtopengl.qdoc doc/src/qtsvg.qdoc doc/src/qtuiloader.qdoc doc/src/qundo.qdoc doc/src/richtext.qdoc doc/src/topics.qdoc src/corelib/tools/qdumper.cpp src/gui/embedded/qkbdpc101_qws.cpp src/gui/embedded/qkbdsl5000_qws.cpp src/gui/embedded/qkbdusb_qws.cpp src/gui/embedded/qkbdvr41xx_qws.cpp src/gui/embedded/qkbdyopy_qws.cpp src/gui/embedded/qmousebus_qws.cpp src/gui/embedded/qmousevr41xx_qws.cpp src/gui/embedded/qmouseyopy_qws.cpp src/gui/painting/qpaintengine_d3d.cpp src/gui/painting/qwindowsurface_d3d.cpp src/opengl/gl2paintengineex/glgc_shader_source.h src/opengl/gl2paintengineex/qglpexshadermanager.cpp src/opengl/gl2paintengineex/qglpexshadermanager_p.h src/opengl/gl2paintengineex/qglshader.cpp src/opengl/gl2paintengineex/qglshader_p.h src/opengl/util/fragmentprograms_p.h src/plugins/kbddrivers/linuxis/linuxiskbdhandler.cpp src/plugins/mousedrivers/linuxis/linuxismousehandler.cpp src/script/parser/qscript.g src/script/qscriptarray_p.h src/script/qscriptasm_p.h src/script/qscriptbuffer_p.h src/script/qscriptclass.cpp src/script/qscriptclassdata_p.h src/script/qscriptcompiler.cpp src/script/qscriptcompiler_p.h src/script/qscriptcontext.cpp src/script/qscriptcontext_p.cpp src/script/qscriptcontext_p.h src/script/qscriptcontextfwd_p.h src/script/qscriptecmaarray.cpp src/script/qscriptecmaarray_p.h src/script/qscriptecmaboolean.cpp src/script/qscriptecmacore.cpp src/script/qscriptecmadate.cpp src/script/qscriptecmadate_p.h src/script/qscriptecmaerror.cpp src/script/qscriptecmaerror_p.h src/script/qscriptecmafunction.cpp src/script/qscriptecmafunction_p.h src/script/qscriptecmaglobal.cpp src/script/qscriptecmaglobal_p.h src/script/qscriptecmamath.cpp src/script/qscriptecmamath_p.h src/script/qscriptecmanumber.cpp src/script/qscriptecmanumber_p.h src/script/qscriptecmaobject.cpp src/script/qscriptecmaobject_p.h src/script/qscriptecmaregexp.cpp src/script/qscriptecmaregexp_p.h src/script/qscriptecmastring.cpp src/script/qscriptecmastring_p.h src/script/qscriptengine.cpp src/script/qscriptengine_p.cpp src/script/qscriptengine_p.h src/script/qscriptenginefwd_p.h src/script/qscriptextenumeration.cpp src/script/qscriptextenumeration_p.h src/script/qscriptextqobject.cpp src/script/qscriptextqobject_p.h src/script/qscriptextvariant.cpp src/script/qscriptfunction.cpp src/script/qscriptfunction_p.h src/script/qscriptgc_p.h src/script/qscriptmember_p.h src/script/qscriptobject_p.h src/script/qscriptprettypretty.cpp src/script/qscriptprettypretty_p.h src/script/qscriptvalue.cpp src/script/qscriptvalueimpl.cpp src/script/qscriptvalueimpl_p.h src/script/qscriptvalueimplfwd_p.h src/script/qscriptvalueiteratorimpl.cpp src/script/qscriptxmlgenerator.cpp src/script/qscriptxmlgenerator_p.h tests/auto/linguist/lupdate/testdata/recursivescan/project.ui tests/auto/linguist/lupdate/testdata/recursivescan/sub/finddialog.cpp tests/auto/qkeyevent/tst_qkeyevent.cpp tools/linguist/shared/cpp.cpp
| * Update tech preview license header.Jason McDonald2009-08-311-13/+13
| | | | | | | | Reviewed-by: Trust Me