diff -ruN qt-everywhere-enterprise-src-5.6.0.orig/qtbase/src/sql/drivers/db2/qsql_db2.cpp qt-everywhere-enterprise-src-5.6.0/qtbase/src/sql/drivers/db2/qsql_db2.cpp --- qt-everywhere-enterprise-src-5.6.0.orig/qtbase/src/sql/drivers/db2/qsql_db2.cpp 2016-03-03 12:35:22.000000000 +0100 +++ qt-everywhere-enterprise-src-5.6.0/qtbase/src/sql/drivers/db2/qsql_db2.cpp 2016-06-06 13:16:00.132484791 +0200 @@ -228,7 +228,7 @@ { SQLSMALLINT colNameLen; SQLSMALLINT colType; - SQLUINTEGER colSize; + SQLULEN colSize; SQLSMALLINT colScale; SQLSMALLINT nullable; SQLRETURN r = SQL_ERROR; @@ -264,7 +264,7 @@ { SQLINTEGER intbuf; isNull = false; - SQLINTEGER lengthIndicator = 0; + SQLLEN lengthIndicator = 0; SQLRETURN r = SQLGetData(hStmt, column + 1, SQL_C_SLONG, @@ -282,7 +282,7 @@ { SQLDOUBLE dblbuf; isNull = false; - SQLINTEGER lengthIndicator = 0; + SQLLEN lengthIndicator = 0; SQLRETURN r = SQLGetData(hStmt, column+1, SQL_C_DOUBLE, @@ -301,7 +301,7 @@ { SQLBIGINT lngbuf = Q_INT64_C(0); isNull = false; - SQLINTEGER lengthIndicator = 0; + SQLLEN lengthIndicator = 0; SQLRETURN r = SQLGetData(hStmt, column+1, SQL_C_SBIGINT, @@ -318,7 +318,7 @@ { QString fieldVal; SQLRETURN r = SQL_ERROR; - SQLINTEGER lengthIndicator = 0; + SQLLEN lengthIndicator = 0; if (colSize <= 0) colSize = 255; @@ -354,12 +354,12 @@ return fieldVal; } -static QByteArray qGetBinaryData(SQLHANDLE hStmt, int column, SQLINTEGER& lengthIndicator, bool& isNull) +static QByteArray qGetBinaryData(SQLHANDLE hStmt, int column, SQLLEN& lengthIndicator, bool& isNull) { QByteArray fieldVal; SQLSMALLINT colNameLen; SQLSMALLINT colType; - SQLUINTEGER colSize; + SQLULEN colSize; SQLSMALLINT colScale; SQLSMALLINT nullable; SQLRETURN r = SQL_ERROR; @@ -590,7 +590,7 @@ bool QDB2Result::exec() { QList tmpStorage; // holds temporary ptrs - QVarLengthArray indicators(boundValues().count()); + QVarLengthArray indicators(boundValues().count()); memset(indicators.data(), 0, indicators.size() * sizeof(SQLINTEGER)); setActive(false); @@ -608,7 +608,7 @@ int i; for (i = 0; i < values.count(); ++i) { // bind parameters - only positional binding allowed - SQLINTEGER *ind = &indicators[i]; + SQLLEN *ind = &indicators[i]; if (values.at(i).isNull()) *ind = SQL_NULL_DATA; if (bindValueType(i) & QSql::Out) @@ -704,7 +704,7 @@ *ind == SQL_NULL_DATA ? ind : NULL); break; case QVariant::ByteArray: { - int len = values.at(i).toByteArray().size(); + SQLLEN len = values.at(i).toByteArray().size(); if (*ind != SQL_NULL_DATA) *ind = len; r = SQLBindParameter(d->hStmt, @@ -948,7 +948,7 @@ return QVariant(); } SQLRETURN r = 0; - SQLINTEGER lengthIndicator = 0; + SQLLEN lengthIndicator = 0; bool isNull = false; const QSqlField info = d->recInf.field(field); @@ -1059,7 +1059,7 @@ int QDB2Result::numRowsAffected() { - SQLINTEGER affectedRowCount = 0; + SQLLEN affectedRowCount = 0; SQLRETURN r = SQLRowCount(d->hStmt, &affectedRowCount); if (r == SQL_SUCCESS || r == SQL_SUCCESS_WITH_INFO) return affectedRowCount; @@ -1185,7 +1185,7 @@ const QString opt(tmp.left(idx)); const QString val(tmp.mid(idx + 1).simplified()); - SQLUINTEGER v = 0; + SQLULEN v = 0; r = SQL_SUCCESS; if (opt == QLatin1String("SQL_ATTR_ACCESS_MODE")) { if (val == QLatin1String("SQL_MODE_READ_ONLY")) { @@ -1506,6 +1506,7 @@ case LastInsertId: case SimpleLocking: case EventNotifications: + case CancelQuery: return false; case BLOB: case Transactions: @@ -1569,7 +1570,7 @@ bool QDB2Driver::setAutoCommit(bool autoCommit) { Q_D(QDB2Driver); - SQLUINTEGER ac = autoCommit ? SQL_AUTOCOMMIT_ON : SQL_AUTOCOMMIT_OFF; + SQLULEN ac = autoCommit ? SQL_AUTOCOMMIT_ON : SQL_AUTOCOMMIT_OFF; SQLRETURN r = SQLSetConnectAttr(d->hDbc, SQL_ATTR_AUTOCOMMIT, (SQLPOINTER)ac,