Details
-
Bug
-
Resolution: Done
-
Not Evaluated
-
4.6.0
-
None
-
First noted using Qt 4.6 Technology Preview on Windows XP.
-
1ce247ec7c2b4bda79cedf5dda2e6b1f636903b1
Description
There is a spurious line in the DB2 SQL plugin, in the code that retrieves and converts numeric data (src/sql/drivers/db2/qsql_db2.cpp: QDB2Result::data()), the location can be seen from this patch:
— qsql_db2.cpp 2009-11-30 18:44:22.000000000 +0100
+++ qsql_db2.cpp.new 2009-11-30 18:44:42.000000000 +0100
@@ -1025,7 +1025,6 @@
break;
case QVariant::Double:
{
- QString value=qGetStringData(d->hStmt, field, info.length() + 1, isNull);
switch(numericalPrecisionPolicy()) {
case QSql::LowPrecisionInt32:
v = new QVariant(qGetIntData(d->hStmt, field, isNull));
Note that "value" is not used anywhere in the code as seen in:
http://qt.gitorious.org/qt/qt/blobs/master/src/sql/drivers/db2/qsql_db2.cpp
The line has no apparent reason to be there, and probably is a leftover of this commit:
http://qt.gitorious.org/qt/qt/commit/fbe1e69584746e6255b6ea6fede9080c96f5d4e2
I stumbled upon that line while I was investigating a problem in retrieving numeric data from a DB2 table, and removing that line solved the problem. It is difficult for me to provide an exact testcase since that would require access to a DB2 database, but it is quite evident that the line should be removed in any case.
I think the problem applies both to master and to the 4.6 branches, I suggest to fix it before the 4.6.0 release.