Ignore:
Timestamp:
Aug 2, 2010, 9:27:30 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.6.3 sources from branches/vendor/nokia/qt.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/sql/drivers/mysql/qsql_mysql.cpp

    r651 r769  
    321321}
    322322
     323static bool qIsInteger(int t)
     324{
     325    return t == MYSQL_TYPE_TINY
     326           || t == MYSQL_TYPE_SHORT
     327           || t == MYSQL_TYPE_LONG
     328           || t == MYSQL_TYPE_LONGLONG
     329           || t == MYSQL_TYPE_INT24;
     330}
     331
     332
    323333void QMYSQLResultPrivate::bindBlobs()
    324334{
     
    369379            hasBlobs = true;
    370380        } else {
     381            // fieldInfo->length specifies the display width, which may be too
     382            // small to hold valid integer values (see
     383            // http://dev.mysql.com/doc/refman/5.0/en/numeric-types.html ), so
     384            // always use the MAX_BIGINT_WIDTH for integer types
     385            if (qIsInteger(fieldInfo->type)) {
     386                fieldInfo->length = MAX_BIGINT_WIDTH;
     387            }
    371388            fieldInfo->type = MYSQL_TYPE_STRING;
    372389        }
Note: See TracChangeset for help on using the changeset viewer.