List:Commits« Previous MessageNext Message »
From:pharvey Date:May 12 2006 6:47pm
Subject:Connector/ODBC 5 commit: r227 - MYSQLPlus/MYSQLPlusLib
View as plain text  
Modified:
   MYSQLPlus/MYSQLPlusLib/MResultStmt.cpp
Log:


Modified: MYSQLPlus/MYSQLPlusLib/MResultStmt.cpp
===================================================================
--- MYSQLPlus/MYSQLPlusLib/MResultStmt.cpp	2006-05-12 07:06:26 UTC (rev 226)
+++ MYSQLPlus/MYSQLPlusLib/MResultStmt.cpp	2006-05-12 16:47:06 UTC (rev 227)
@@ -801,6 +801,9 @@
     {
         if ( getStatement()->getCursorType() == SQL_CURSOR_FORWARD_ONLY )
             MYODBCDbgReturn( getDiagnostic()->doAppend( MDiagnostic::DIA_HY000, 0,
tr("doSkip() not fully supported when SQL_CURSOR_FORWARD_ONLY") ) );
+
+        if ( !isBuffered() )
+            MYODBCDbgReturn( getDiagnostic()->doAppend( MDiagnostic::DIA_HY000, 0,
tr("doSkip() not fully supported when unbuffered resultset") ) );
     }
 
     if ( isBuffered() )
@@ -817,7 +820,7 @@
     {
         SQLRETURN nReturn;
 
-        for ( qulonglong n = 0; n < nRows; n++ )
+        for ( qlonglong n = 0; n < nRows; n++ )
         {
             nReturn = doNext();
             if ( !SQL_SUCCEEDED( nReturn ) )
@@ -1069,7 +1072,7 @@
             {
                 if ( !variantData.canConvert<QString>() )
                     MYODBCDbgReturn( getDiagnostic()->doAppend( MDiagnostic::DIA_07006
) );
-                QString stringData = variantData.asString();
+                QString stringData = variantData.toString();
                 MYODBCC::doStrNCpy( (SQLWCHAR*)pdata,
pDescriptorRecord->getOctetLength() / sizeof(SQLWCHAR), stringData.utf16() );
                 if ( pnOctetLength ) *pnOctetLength = stringData.length() *
sizeof(SQLWCHAR);
             }
@@ -1240,6 +1243,7 @@
         case SQL_C_INTERVAL_MINUTE_TO_SECOND:
             break;
         default:
+            MYODBCDbgReturn( getDiagnostic()->doAppend( MDiagnostic::DIA_HY000, 0,
tr("unsupported concise type") ) );
     }
 
     MYODBCDbgReturn( SQL_SUCCESS );
@@ -1351,9 +1355,13 @@
     if ( !pMetaData )
     {
         if ( mysql_stmt_error( pstm ) )
+        {
             MYODBCDbgReturn( getDiagnostic()->doAppend( MDiagnostic::DIA_HY000,
mysql_stmt_errno( pstm ), mysql_stmt_error( pstm ) ) );
+        }
         else
+        {
             MYODBCDbgReturn( SQL_SUCCESS );
+        }
     }
 
     unsigned int nFields = mysql_num_fields( pMetaData );
@@ -1365,7 +1373,7 @@
 
         getImpRowDesc()->setCount( nFields, true );
 
-        pstm->pbindColumns = MYODBCC::getMem( nFields, sizeof(MYSQL_BIND) );
+        pbindColumns = (MYSQL_BIND*)MYODBCC::getMem( nFields, sizeof(MYSQL_BIND) );
 
         mysql_field_seek( pMetaData, 0 );
         for ( nField = 0; nField < nFields; nField++ )
@@ -1408,7 +1416,7 @@
     if ( !pField )
         MYODBCDbgReturn( getDiagnostic()->doAppend( MDiagnostic::DIA_HY000, 0,
tr("Invalid field structure. Failed to store field descriptor information.") ) );
 
-    if ( nField >= getImpRowDesc()->getCount() )
+    if ( nField >= (unsigned int)getImpRowDesc()->getCount() )
         MYODBCDbgReturn( getDiagnostic()->doAppend( MDiagnostic::DIA_HY000, 0,
tr("Field index out of range. Failed to store field descriptor information.") ) );
 
     /*
@@ -1437,7 +1445,7 @@
     */
     MDescriptorRecord *pDescriptorRecord = getImpRowDesc()->getRecord( nField );
 
-    pDescriptorRecord->setAutoUniqueValue( (pField->flags &&
AUTO_INCREMENT_FLAG) ? SQL_TRUE : SQL_FALSE ) );
+    pDescriptorRecord->setAutoUniqueValue( (pField->flags &&
AUTO_INCREMENT_FLAG) ? SQL_TRUE : SQL_FALSE );
     pDescriptorRecord->setBaseColumnName( (pField->org_name ? pField->org_name :
"") );
     pDescriptorRecord->setBaseTableName( (pField->org_table ? pField->org_table
: "") );
     pDescriptorRecord->setCaseSensitive( (pField->flags & BINARY_FLAG ?
SQL_FALSE : SQL_TRUE) );

Thread
Connector/ODBC 5 commit: r227 - MYSQLPlus/MYSQLPlusLibpharvey12 May