Go to file
Milian Wolff 194403a348 Remove temporary string allocations when reading prepared statement.
Instead, we use the binary MySQL encoding and copy the data directly
into the QVariant of the desired type. This gets rid of the temporary
string allocations and greatly improves the performance of the added
benchmark. On my machine, the results are:

Before:
     0.562 msecs per iteration (total: 563, iterations: 1000)
     1,922,479.330 instructions per iteration (total: 1,922,479,330, iterations: 1000)

After:
     0.381 msecs per iteration (total: 381, iterations: 1000)
     774,132.957 instructions per iteration (total: 774,132,958, iterations: 1000)

Note that the same could be applied to floating point data types in
the future. Additionally, special support for MYSQL_TIME structure
coult be added to get rid of the string conversions there.

To ensure everything keeps working, a new auto test is added as well
that verifies the select statements and insertions of integral data
into a MySql table works as intended.

[ChangeLog][QtSql] Improve performance when reading integer values
from MySQL databases via prepared statements.

Change-Id: I21dd9277661971ded934546f09535014b63f8eb8
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-08-13 16:53:45 +00:00
bin fixqt4headers.pl: Improve detection of Qt 5 location. 2015-04-22 10:23:41 +00:00
config.tests Add Mir client platform plugin 2015-08-09 06:27:26 +00:00
dist Update the changelog with the LTS discussion results 2015-06-25 15:58:28 -07:00
doc Merge remote-tracking branch 'origin/5.5' into dev 2015-08-06 10:54:01 +02:00
examples Fix mainwindow examples when clipboard support is disabled. 2015-08-11 16:23:23 +00:00
lib Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
mkspecs Merge "Merge remote-tracking branch 'origin/5.5' into dev" into refs/staging/dev 2015-08-09 07:06:52 +00:00
qmake Merge remote-tracking branch 'origin/5.5' into dev 2015-08-06 10:54:01 +02:00
src Remove temporary string allocations when reading prepared statement. 2015-08-13 16:53:45 +00:00
tests Remove temporary string allocations when reading prepared statement. 2015-08-13 16:53:45 +00:00
tools Windows: Include DirectWrite support by default if available 2015-07-21 08:21:34 +00:00
util Fix typo when resolving EGL extension. 2015-04-23 11:54:36 +00:00
.gitattributes Update the git-archive export options 2012-09-07 15:39:31 +02:00
.gitignore Remove qtdemo from gitignore 2014-09-17 12:38:55 +02:00
.qmake.conf Enable -Werror for all of qtbase 2013-09-04 01:50:10 +02:00
.tag Update the git-archive export options 2012-09-07 15:39:31 +02:00
configure configure: Remove unused variable. 2015-08-11 11:57:25 +00:00
configure.bat Use jom instead of nmake to compile configure.exe 2015-07-21 22:50:30 +00:00
header.BSD Updated BSD licensed file headers 2015-02-15 07:41:17 +00:00
header.FDL Update copyright headers 2015-02-11 06:49:51 +00:00
header.LGPL3 Update copyright headers 2015-02-11 06:49:51 +00:00
header.LGPL3-COMM Update copyright headers 2015-02-11 06:49:51 +00:00
header.LGPL21 Update copyright headers 2015-02-11 06:49:51 +00:00
header.LGPL-ONLY Update copyright headers 2015-02-11 06:49:51 +00:00
INSTALL Doc: Update links in INSTALL file 2015-02-16 09:06:41 +00:00
LGPL_EXCEPTION.txt Update copyright headers 2015-02-11 06:49:51 +00:00
LICENSE.FDL Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
LICENSE.GPLv3 Add the GPLv3 license text 2015-07-22 00:23:23 +00:00
LICENSE.LGPLv3 Add the GPLv3 license text 2015-07-22 00:23:23 +00:00
LICENSE.LGPLv21 Update copyright headers 2015-02-11 06:49:51 +00:00
LICENSE.PREVIEW.COMMERCIAL Update copyright headers 2015-02-11 06:49:51 +00:00
qtbase.pro Avoid qtbase/bin/bin artifact when running make install 2015-06-03 04:27:49 +00:00
sync.profile Move the function helper to its own file 2015-06-05 07:48:17 +00:00