List:Commits« Previous MessageNext Message »
From:pharvey Date:July 29 2006 8:48pm
Subject:Connector/ODBC 5 commit: r465 - trunk/MYSQLPlus/MYSQLPlusLib
View as plain text  
Modified:
   trunk/MYSQLPlus/MYSQLPlusLib/MStatement.cpp
Log:
clean compiles

Modified: trunk/MYSQLPlus/MYSQLPlusLib/MStatement.cpp
===================================================================
--- trunk/MYSQLPlus/MYSQLPlusLib/MStatement.cpp	2006-07-29 18:20:02 UTC (rev 464)
+++ trunk/MYSQLPlus/MYSQLPlusLib/MStatement.cpp	2006-07-29 18:48:11 UTC (rev 465)
@@ -2799,7 +2799,8 @@
     /*!
         \internal 
 
-        We have already iterated over all commands.
+        We have already iterated over all commands. App needs to call doExecute() to
start
+        over.
     */
     if ( pCommands->getPos() < 0 )
         MYODBCDbgReturn( SQL_NO_DATA );
@@ -2838,7 +2839,6 @@
         if ( !SQL_SUCCEEDED( nReturnPrepare ) )
         {
             pResult = pResultOriginal;
-            doStateRollBack( STATE_S1 );
             MYODBCDbgReturn( nReturnPrepare );
         }
         delete pResultOriginal;
@@ -2849,8 +2849,6 @@
         MYODBCDbgReturn( SQL_NO_DATA );
     }
 
-    doStateRollBack( STATE_S1 );
-
     /*
      * EXECUTE
      */
@@ -3534,8 +3532,7 @@
     if ( pCommands )
     {
         /* SQL or other command */
-        MCommand command = pCommands->at( pCommands->getCurrent() );
-        if ( command.isResultSetPossible() )
+        if ( pCommands->getCommand().isResultSetPossible() )
         {
             qulonglong n;
             if ( pResult->getRows( &n ) == SQL_SUCCESS )
@@ -5415,8 +5412,8 @@
                         - pResult will be viable
 
     \retval ERROR   Call failed;
-                        - state unchanged
-                        - pResult unchanged
+                        - state unchanged (but possibly no longer viable)
+                        - pResult unchanged (null)
 
     \sa     doPrepare
             doMoreResults
@@ -5453,7 +5450,7 @@
     /* if app wants server-side prepare but we can not use it then we fall back to
client-side and throw a warning */
     if ( nStatementType == MConnection::STATEMENT_STMT &&
!command.isServerSidePreparePossible() )
     {
-        getDiagnostic()->doAppend( MDiagnostic::DIA_01000, 0, tr("Server-side prepare
not possible for this command - using client-side.") );
+        getDiagnostic()->doAppend( MDiagnostic::DIA_01S02, 0, tr("Server-side prepare
not possible for this command - using client-side.") );
         nStatementType = MConnection::STATEMENT_RES;
     }
 
@@ -5473,6 +5470,7 @@
             MYODBCDbgReturn( getDiagnostic()->doAppend( MDiagnostic::DIA_HY000, 0,
QString( tr("Unknown statement type %1") ).arg( nStatementType ) ) );
     }
 
+    /* get MResult to do more prepare as needed */
     SQLRETURN nReturn = pResult->doPrepare( command );
     if ( !SQL_SUCCEEDED( nReturn ) )
     {

Thread
Connector/ODBC 5 commit: r465 - trunk/MYSQLPlus/MYSQLPlusLibpharvey29 Jul