List:Commits« Previous MessageNext Message »
From:pharvey Date:May 15 2006 2:20am
Subject:Connector/ODBC 5 commit: r237 - MYSQLPlus/MYSQLPlusLib doc/Project
View as plain text  
Modified:
   MYSQLPlus/MYSQLPlusLib/MResult.h
   MYSQLPlus/MYSQLPlusLib/MResultPlus.h
   MYSQLPlus/MYSQLPlusLib/MResultRes.h
   MYSQLPlus/MYSQLPlusLib/MResultStmt.h
   MYSQLPlus/MYSQLPlusLib/MStatement.cpp
   doc/Project/SituationReport-20060519.ods
Log:


Modified: MYSQLPlus/MYSQLPlusLib/MResult.h
===================================================================
--- MYSQLPlus/MYSQLPlusLib/MResult.h	2006-05-15 00:18:42 UTC (rev 236)
+++ MYSQLPlus/MYSQLPlusLib/MResult.h	2006-05-15 02:20:13 UTC (rev 237)
@@ -25,6 +25,7 @@
 */
 class MResult : public QObject
 {
+    friend class MStatement;
 public:
     enum STATE
     {

Modified: MYSQLPlus/MYSQLPlusLib/MResultPlus.h
===================================================================
--- MYSQLPlus/MYSQLPlusLib/MResultPlus.h	2006-05-15 00:18:42 UTC (rev 236)
+++ MYSQLPlus/MYSQLPlusLib/MResultPlus.h	2006-05-15 02:20:13 UTC (rev 237)
@@ -39,6 +39,7 @@
 
 class MResultPlus : public MResult
 {
+    friend class MStatement;
 public:
     MResultPlus( MStatement *pStatement );
     ~MResultPlus();

Modified: MYSQLPlus/MYSQLPlusLib/MResultRes.h
===================================================================
--- MYSQLPlus/MYSQLPlusLib/MResultRes.h	2006-05-15 00:18:42 UTC (rev 236)
+++ MYSQLPlus/MYSQLPlusLib/MResultRes.h	2006-05-15 02:20:13 UTC (rev 237)
@@ -18,6 +18,7 @@
 */
 class MResultRes : public MResult
 {
+    friend class MStatement;
 public:
     MResultRes( MStatement *pStatement );
     ~MResultRes();

Modified: MYSQLPlus/MYSQLPlusLib/MResultStmt.h
===================================================================
--- MYSQLPlus/MYSQLPlusLib/MResultStmt.h	2006-05-15 00:18:42 UTC (rev 236)
+++ MYSQLPlus/MYSQLPlusLib/MResultStmt.h	2006-05-15 02:20:13 UTC (rev 237)
@@ -47,6 +47,7 @@
 */
 class MResultStmt : public MResult
 {
+    friend class MStatement;
 public:
     MResultStmt( MStatement *pStatement );
     ~MResultStmt();

Modified: MYSQLPlus/MYSQLPlusLib/MStatement.cpp
===================================================================
--- MYSQLPlus/MYSQLPlusLib/MStatement.cpp	2006-05-15 00:18:42 UTC (rev 236)
+++ MYSQLPlus/MYSQLPlusLib/MStatement.cpp	2006-05-15 02:20:13 UTC (rev 237)
@@ -1168,9 +1168,34 @@
     */
     pDiagnostic->doClear();
 
-    doStateRollBack( STATE_S3 );
+    /*!
+        \internal ODBC RULE
 
-    MYODBCDbgReturn( SQL_ERROR );
+        No cursor was open on the StatementHandle.
+    */
+    if ( getState() < STATE_S4 || getState() > STATE_S7 )
+        MYODBCDbgReturn( pDiagnostic->doAppend( MDiagnostic::DIA_24000 ) );
+
+    /*!
+        \internal ODBC RULE (DM)
+
+        An asynchronously executing function was called for the StatementHandle and was 
+        still executing when this function was called.
+    */
+    if ( isAsyncInProgress() )
+        MYODBCDbgReturn( pDiagnostic->doAppend( MDiagnostic::DIA_HY010 ) );
+
+    /*!
+        \internal ODBC RULE (DM)
+
+        SQLExecute, SQLExecDirect, SQLBulkOperations, or SQLSetPos was called for the
StatementHandle and 
+        returned SQL_NEED_DATA. This function was called before data was sent for all
data-at-execution 
+        parameters or columns.
+    */
+    if ( isDataNeeded() )
+        MYODBCDbgReturn( pDiagnostic->doAppend( MDiagnostic::DIA_HY010 ) );
+
+    MYODBCDbgReturn( doStateRollBack( STATE_S3 ) );
 }
 
 SQLRETURN MStatement::doColAttribute( SQLUSMALLINT nColumnNumber, SQLUSMALLINT
nFieldIdentifier, SQLPOINTER psCharacterAttributePtr, SQLSMALLINT nBufferLength,
SQLSMALLINT *pnStringLengthPtr, SQLPOINTER pnNumericAttributePtr )
@@ -1443,14 +1468,73 @@
     */
     pDiagnostic->doClear();
 
+    /*!
+        \internal ODBC RULE (DM)
+
+        An asynchronously executing function was called for the StatementHandle and was 
+        still executing when this function was called.
+    */
+    if ( isAsyncInProgress() )
+        MYODBCDbgReturn( pDiagnostic->doAppend( MDiagnostic::DIA_HY010 ) );
+
+    /*!
+        \internal ODBC RULE (DM)
+
+        SQLExecute, SQLExecDirect, SQLBulkOperations, or SQLSetPos was called for the
StatementHandle and 
+        returned SQL_NEED_DATA. This function was called before data was sent for all
data-at-execution 
+        parameters or columns.
+    */
+    if ( isDataNeeded() )
+        MYODBCDbgReturn( pDiagnostic->doAppend( MDiagnostic::DIA_HY010 ) );
+    
+    /* do it */
     switch ( nOption )
     {
         case SQL_CLOSE:
-            doStateRollBack( STATE_S3 );
-            break;
+            MYODBCDbgReturn( doStateRollBack( STATE_S3 ) );
+
+        case SQL_DROP:
+            MYODBCDbgReturn( pDiagnostic->doAppend( MDiagnostic::DIA_HY000, 0,
tr("Sorry; we do not delete ourself.") ) );
+
+        case SQL_UNBIND:
+            /*!
+                \internal ODBC RULE
+
+                Sets the SQL_DESC_COUNT field of the ARD to 0, releasing all column
buffers bound by SQLBindCol for the 
+                given StatementHandle. This does not unbind the bookmark column; to do
that, the SQL_DESC_DATA_PTR field 
+                of the ARD for the bookmark column is set to NULL.
+            */
+            /*!
+                \internal
+                \todo
+
+                Stop delete of bookmark bind.
+            */
+            MYODBCDbgReturn( getAppRowDesc()->setCount( 0, true ) );
+
+        case SQL_RESET_PARAMS:
+            /*!
+                \internal ODBC RULE
+
+                SQL_RESET_PARAMS: Sets the SQL_DESC_COUNT field of the APD to 0,
releasing all parameter buffers set by 
+                SQLBindParameter for the given StatementHandle.
+            */
+            MYODBCDbgReturn( getAppParamDesc()->setCount( 0, true ) );
+
+        default:
+            /*!
+                \internal ODBC RULE (DM)
+
+                The value specified for the argument Option was not:
+                    - SQL_CLOSE
+                    - SQL_DROP
+                    - SQL_UNBIND
+                    - SQL_RESET_PARAMS
+            */
+            MYODBCDbgReturn( pDiagnostic->doAppend( MDiagnostic::DIA_HY092 ) );
     }
 
-    MYODBCDbgReturn( SQL_ERROR );
+    MYODBCDbgReturn( SQL_SUCCESS );
 }
 
 SQLRETURN MStatement::doMoreResults()
@@ -2687,6 +2771,7 @@
         case STATE_S10:
         case STATE_S11:
         case STATE_S12:
+            pResult->doStateRollBack( MResult::STATE_PREPARED );
             setState( STATE_S2 );
             break;
 

Modified: doc/Project/SituationReport-20060519.ods
===================================================================
(Binary files differ)

Thread
Connector/ODBC 5 commit: r237 - MYSQLPlus/MYSQLPlusLib doc/Projectpharvey15 May