List:Commits« Previous MessageNext Message »
From:ahristov Date:April 24 2007 12:23pm
Subject:Connector/ODBC 5 commit: r892 - branches/feature-cursor-design/SDK/MYSQLPlus/Library
View as plain text  
Modified:
   branches/feature-cursor-design/SDK/MYSQLPlus/Library/MCommand.cpp
   branches/feature-cursor-design/SDK/MYSQLPlus/Library/MCommand.h
   branches/feature-cursor-design/SDK/MYSQLPlus/Library/MCommands.cpp
   branches/feature-cursor-design/SDK/MYSQLPlus/Library/MCommands.h
   branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDescriptor.cpp
   branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDescriptorAPD.cpp
   branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDescriptorAPD.h
   branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDescriptorARD.cpp
   branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDescriptorARD.h
   branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDescriptorIPD.cpp
   branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDescriptorIPD.h
   branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDescriptorIRD.cpp
   branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDescriptorIRD.h
   branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDescriptorRecord.cpp
   branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDescriptorRecord.h
   branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDescriptorRecordAPD.cpp
   branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDescriptorRecordAPD.h
   branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDescriptorRecordARD.cpp
   branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDescriptorRecordARD.h
   branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDescriptorRecordIPD.cpp
   branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDescriptorRecordIPD.h
   branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDescriptorRecordIRD.cpp
   branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDescriptorRecordIRD.h
   branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDiagnostic.cpp
   branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDiagnostic.h
   branches/feature-cursor-design/SDK/MYSQLPlus/Library/MInternal.h
   branches/feature-cursor-design/SDK/MYSQLPlus/Library/MResult.cpp
   branches/feature-cursor-design/SDK/MYSQLPlus/Library/MResult.h
   branches/feature-cursor-design/SDK/MYSQLPlus/Library/MResultPlus.cpp
   branches/feature-cursor-design/SDK/MYSQLPlus/Library/MResultPlus.h
   branches/feature-cursor-design/SDK/MYSQLPlus/Library/MResultPlus_typeinfo.cpp
   branches/feature-cursor-design/SDK/MYSQLPlus/Library/MResultRes.cpp
   branches/feature-cursor-design/SDK/MYSQLPlus/Library/MResultRes.h
   branches/feature-cursor-design/SDK/MYSQLPlus/Library/MResultStmt.h
   branches/feature-cursor-design/SDK/MYSQLPlus/Library/MResult_data_toC.cpp
   branches/feature-cursor-design/SDK/MYSQLPlus/Library/MResult_data_toSQL.cpp
   branches/feature-cursor-design/SDK/MYSQLPlus/Library/MResult_props.cpp
   branches/feature-cursor-design/SDK/MYSQLPlus/Library/MStatement.cpp
   branches/feature-cursor-design/SDK/MYSQLPlus/Library/MStatement_catalog.cpp
   branches/feature-cursor-design/SDK/MYSQLPlus/Library/MStatement_props.cpp
Log:
Merge from trunk because the change in trunk was too pervasive.


Modified: branches/feature-cursor-design/SDK/MYSQLPlus/Library/MCommand.cpp
===================================================================
--- branches/feature-cursor-design/SDK/MYSQLPlus/Library/MCommand.cpp	2007-04-24 09:55:55
UTC (rev 891)
+++ branches/feature-cursor-design/SDK/MYSQLPlus/Library/MCommand.cpp	2007-04-24 10:23:09
UTC (rev 892)
@@ -26,15 +26,27 @@
               Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
 
+#include "MInternal.h"
 #include "MCommand.h"
+#include "MCommands.h"
+#include "MResult.h"
+#ifdef RESULTPLUS
+#include "MResultPlus.h"
+#endif
 
+#ifdef RESULTRES
+#include "MResultRes.h"
+#endif
+
+#ifdef RESULTSTMT
+#include "MResultStmt.h"
+#endif
+
+
 MCommand::MCommand( MCommands *pCommands )
-    : QObject( pCommands )
 {
     DBUG_ENTER("MCommand::MCommand");
 
-    setObjectName( "MCommand" );    // we avoid Q_OBJECT by avoiding className
-
     nState = STATE_UNINITIALIZED;
 
     stringNativeText.clear();
@@ -47,6 +59,8 @@
 
     nState = STATE_INITIALIZED;
 
+    parent = pCommands;
+
     DBUG_VOID_RETURN;
 }
 
@@ -491,6 +505,7 @@
 SQLRETURN MCommand::setText( const QString &stringText, uint nParameterOffset )
 {
     DBUG_ENTER("MCommand::setText");
+    DBUG_PRINT("enter", ("%s", ((const char *) stringText.toUtf8())));
 
     /*!
         \internal
@@ -678,8 +693,8 @@
 {
     DBUG_ENTER("MCommand::getCommands");
 
-    DBUG_PRINT("oreturn", ( "%p",  (MCommands*)parent() ));
-    DBUG_RETURN( (MCommands*)parent() );
+    DBUG_PRINT("oreturn", ( "%p",  (MCommands*)parent));
+    DBUG_RETURN( (MCommands*)parent);
 }
 
 MConnection *MCommand::getConnection()
@@ -761,7 +776,8 @@
     /* 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 &&
!isServerSidePreparePossible() )
     {
-        getDiagnostic()->doAppend( MDiagnostic::STATE_01S02, 0, tr("Server-side
prepare not possible for this command - using client-side.") );
+        getDiagnostic()->doAppend(MDiagnostic::STATE_01S02, 0,
+                                  QObject::tr("Server-side prepare not possible for this
command - using client-side.") );
         nStatementType = MConnection::STATEMENT_RES;
     }
 
@@ -789,7 +805,8 @@
             break;
 
         default:
-            DBUG_RETURN( getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, 0,
QString( tr("Unknown statement type %1") ).arg( nStatementType ) ) );
+            DBUG_RETURN( getDiagnostic()->doAppend(MDiagnostic::STATE_HY000, 0,
+                                                   QString(QObject::tr("Unknown statement
type %1")).arg(nStatementType)));
     }
 
     if ( !pResult )
@@ -818,12 +835,14 @@
     DBUG_ENTER("MCommand::doCreateResult");
 
     if ( getState() <= nState  )
-        DBUG_RETURN( getDiagnostic()->doAppend( MDiagnostic::STATE_01000, 0,
tr("Request to roll back state has no affect.") ) );
+        DBUG_RETURN( getDiagnostic()->doAppend(MDiagnostic::STATE_01000, 0,
+                                               QObject::tr("Request to roll back state
has no affect.")));
 
     switch ( getState() )
     {
         case STATE_UNINITIALIZED:
-            DBUG_RETURN( getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, 0,
tr("Invalid state; no state before STATE_UNINITIALIZED.") ) );
+            DBUG_RETURN( getDiagnostic()->doAppend(MDiagnostic::STATE_HY000, 0,
+                                                   QObject::tr("Invalid state; no state
before STATE_UNINITIALIZED.")));
             break;
 
         case STATE_INITIALIZED:

Modified: branches/feature-cursor-design/SDK/MYSQLPlus/Library/MCommand.h
===================================================================
--- branches/feature-cursor-design/SDK/MYSQLPlus/Library/MCommand.h	2007-04-24 09:55:55
UTC (rev 891)
+++ branches/feature-cursor-design/SDK/MYSQLPlus/Library/MCommand.h	2007-04-24 10:23:09
UTC (rev 892)
@@ -29,8 +29,6 @@
 #ifndef MCOMMAND_H
 #define MCOMMAND_H
 
-#include "MInternal.h"
-
 /*!
     \brief  A single command (usually a SQL DDL/DML statement) to be sent to the server.
 
@@ -51,7 +49,7 @@
 
     \sa     MCommands
 */
-class MCommand : public QObject
+class MCommand
 {
     friend class MStatement;
     friend class MCommands;
@@ -138,6 +136,8 @@
     STATE           nState;
     QString         stringText;             /*!< the command we are based upon (may
have ODBC _and/or_ server specifics)        */
     COMMAND_TYPE    nType;                  /*!< the command type (mostly based upon
first keyword in command)                  */
+
+    MCommands       *parent;
 };
 
 #endif

Modified: branches/feature-cursor-design/SDK/MYSQLPlus/Library/MCommands.cpp
===================================================================
--- branches/feature-cursor-design/SDK/MYSQLPlus/Library/MCommands.cpp	2007-04-24 09:55:55
UTC (rev 891)
+++ branches/feature-cursor-design/SDK/MYSQLPlus/Library/MCommands.cpp	2007-04-24 10:23:09
UTC (rev 892)
@@ -26,15 +26,16 @@
               Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
 
+#include "MInternal.h"
+#include "MCommand.h"
 #include "MCommands.h"
-#include "MInternal.h"
 
 MCommands::MCommands( MStatement *pStatement )
 {
     DBUG_ENTER("MCommands::MCommands");
 
-    Q_ASSERT( pStatement );
-    setObjectName( "MCommands" ); // we avoid Q_OBJECT by avoiding className
+//    Q_ASSERT( pStatement );
+//    setObjectName( "MCommands" ); // we avoid Q_OBJECT by avoiding className
     doClear();
 
     stmt = pStatement;
@@ -71,6 +72,7 @@
     QString     stringQuotes        = "\"'";        // the quote chars we respect
     QString     stringCommand;
 
+    DBUG_PRINT("oenter", ("%s", ((const char *)stringText.toUtf8())));
     /* clear out any previous commands processing */
     doClear();
 
@@ -97,9 +99,11 @@
 
             if ( !stringCommand.isEmpty() )
             {
-                MCommand *  pCommand    = new MCommand( this );
-                SQLRETURN   n           = pCommand->setText( stringCommand,
nParameterMarkerCount );
+                MCommand *  pCommand = new MCommand( this );
+                children.append(pCommand);
 
+                SQLRETURN n = pCommand->setText( stringCommand, nParameterMarkerCount
);
+
                 switch ( n )
                 {
                     case SQL_SUCCESS:
@@ -138,10 +142,12 @@
 SQLRETURN MCommands::setText()
 {
     DBUG_ENTER("MCommands::setText");
+    DBUG_PRINT("oenter", ("no params"));
 
     doClear();
 
     pCommandCurrent = new MCommand( this );
+    children.append(pCommandCurrent);
     pCommandCurrent->setText();
     nCommandCount   = 1;
 
@@ -204,11 +210,11 @@
 
     QString stringCommand;
 
-    QListIterator<QObject*> i( (QList<QObject*>)children() );
+    QListIterator<MCommand*> i(children);
 
     while ( i.hasNext() ) 
     {
-        MCommand *pCommand = (MCommand *)i.next();
+        MCommand *pCommand = i.next();
         if ( !stringCommand.isEmpty() )
             stringCommand += ";";
         stringCommand += pCommand->getNativeText();
@@ -236,11 +242,11 @@
     uint         nOffset = 0;
 
     /* for each command */
-    QListIterator<QObject*> i( (QList<QObject*>)children() );
+    QListIterator<MCommand*> i(children);
 
     while ( i.hasNext() ) 
     {
-        MCommand *  pCommand    = (MCommand *)i.next();
+        MCommand *  pCommand    = i.next();
         QList<uint> listMarkers = pCommand->getParameterMarkers();
 
         /* for each parameter marker */
@@ -297,9 +303,9 @@
     DBUG_ENTER("MCommands::doClear");
 
     /* delete any commands we may have */
-    while ( children().count() )
+    while ( children.count() )
     {
-        delete ((QObjectList)children()).takeLast();
+        delete children.takeLast();
     }
 
     nCommandCount           = 0;
@@ -351,11 +357,11 @@
 {
     DBUG_ENTER("MCommands::isTransactionPossible");
 
-    QListIterator<QObject*> i( (QList<QObject*>)children() );
+    QListIterator<MCommand*> i(children);
 
     while ( i.hasNext() ) 
     {
-        MCommand *pCommand = (MCommand *)i.next();
+        MCommand *pCommand = i.next();
         if ( !pCommand->isTransactionPossible() )
         {
             DBUG_PRINT("oreturn", ( "%d",  false ));
@@ -383,11 +389,11 @@
 {
     DBUG_ENTER("MCommands::isResultSetPossible");
 
-    QListIterator<QObject*> i( (QList<QObject*>)children() );
+    QListIterator<MCommand*> i(children);
 
     while ( i.hasNext() ) 
     {
-        MCommand *pCommand = (MCommand *)i.next();
+        MCommand *pCommand = i.next();
         if ( !pCommand->isResultSetPossible() )
         {
             DBUG_PRINT("oreturn", ( "%d",  true ));
@@ -416,11 +422,11 @@
 {
     DBUG_ENTER("MCommands::isDataModificationPossible");
 
-    QListIterator<QObject*> i( (QList<QObject*>)children() );
+    QListIterator<MCommand*> i(children);
 
     while ( i.hasNext() ) 
     {
-        MCommand *pCommand = (MCommand *)i.next();
+        MCommand *pCommand = i.next();
         if ( !pCommand->isDataModificationPossible() )
         {
             DBUG_PRINT("oreturn", ( "%d",  true ));
@@ -444,13 +450,11 @@
 MCommand *MCommands::getCommand( uint nIndex )
 {
     DBUG_ENTER("MCommands::getCommand");
+    MCommand *pCommand = NULL;
 
-    MCommand *          pCommand            = NULL;
-    const QObjectList & objectlistChildren  = children();
+    if ( nIndex < nCommandCount && nIndex < (uint)children.count()  )
+        pCommand = children.at((int)nIndex);
 
-    if ( nIndex < nCommandCount && nIndex <
(uint)objectlistChildren.count()  )
-        pCommand = (MCommand*)children().at( (int)nIndex );
-
     DBUG_PRINT("oreturn", ( "%p",  pCommand ));
     DBUG_RETURN( pCommand );
 }
@@ -526,3 +530,8 @@
     DBUG_RETURN( getStatement()->getDiagnostic() );
 }
 
+
+MCommands::~MCommands()
+{
+    doClear();
+}

Modified: branches/feature-cursor-design/SDK/MYSQLPlus/Library/MCommands.h
===================================================================
--- branches/feature-cursor-design/SDK/MYSQLPlus/Library/MCommands.h	2007-04-24 09:55:55
UTC (rev 891)
+++ branches/feature-cursor-design/SDK/MYSQLPlus/Library/MCommands.h	2007-04-24 10:23:09
UTC (rev 892)
@@ -34,12 +34,10 @@
 #include <QList>
 #include <QString>
 
-class MConnection;
+
+class MCommand;
 class MStatement;
-class MDiagnostic;
 
-#include "MCommand.h"
-
 /*!
     \brief  List of commands (usually SQL DDL/DML statements) to be sent to the server.
 
@@ -63,14 +61,15 @@
 
     \sa     MCommand
 */
-class MCommands : public QObject
+class MCommands
 {
     friend class MCommand;
     friend class MResult;
-
 public:
     MCommands( MStatement *pStatement );
+    ~MCommands();
 
+
     /* setters */
     SQLRETURN setText( const QString &stringText ); /*!< Set commands. Can include
ODBC specifics.                                      */
     SQLRETURN setText();                            /*!< Set commands. In this case we
create one MCommand with empty text.             */
@@ -108,6 +107,8 @@
     uint        nParameterMarkerCount;      /*!< Number of parameter markers.         
                         */
     QString     stringText;                 /*!< commands string as provided to
setText()                       */
     MStatement *stmt;
+
+    QList       <MCommand*>children;
 };
 
 #endif

Modified: branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDescriptor.cpp
===================================================================
--- branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDescriptor.cpp	2007-04-24
09:55:55 UTC (rev 891)
+++ branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDescriptor.cpp	2007-04-24
10:23:09 UTC (rev 892)
@@ -28,6 +28,8 @@
 */
 
 #include "MInternal.h"
+#include "MDescriptorRecord.h"
+#include "MDiagnosticRecord.h"
 #include "MValidator.h"
 
 /*!

Modified: branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDescriptorAPD.cpp
===================================================================
--- branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDescriptorAPD.cpp	2007-04-24
09:55:55 UTC (rev 891)
+++ branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDescriptorAPD.cpp	2007-04-24
10:23:09 UTC (rev 892)
@@ -26,6 +26,9 @@
               Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
 
+#include "MInternal.h"
+#include "MDescriptorRecord.h"
+#include "MDescriptorRecordAPD.h"
 #include "MDescriptorAPD.h"
 
 MDescriptorAPD::MDescriptorAPD( SQLSMALLINT odbcVersion, SQLSMALLINT allocType )

Modified: branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDescriptorAPD.h
===================================================================
--- branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDescriptorAPD.h	2007-04-24
09:55:55 UTC (rev 891)
+++ branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDescriptorAPD.h	2007-04-24
10:23:09 UTC (rev 892)
@@ -32,8 +32,6 @@
 #ifndef MDESCRIPTORAPD_H
 #define MDESCRIPTORAPD_H
 
-#include "MInternal.h"
-
 /*!
     \brief  Application parameter descriptor (APD).
 
@@ -46,13 +44,13 @@
 */
 class MDescriptorAPD : public MDescriptor
 {
-    friend class MDescriptorRecordAPD;
 public:
     MDescriptorAPD( SQLSMALLINT odbcVersion, SQLSMALLINT allocType );
     virtual ~MDescriptorAPD() {};
 
     /* setters */
-    SQLRETURN setDescField( SQLSMALLINT nRecNumber, SQLSMALLINT nFieldIdentifier,
SQLPOINTER pValuePtr, SQLINTEGER nBufferLength );
+    SQLRETURN setDescField(SQLSMALLINT nRecNumber, SQLSMALLINT nFieldIdentifier,
+                           SQLPOINTER pValuePtr, SQLINTEGER nBufferLength);
 
     /* getters */
 

Modified: branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDescriptorARD.cpp
===================================================================
--- branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDescriptorARD.cpp	2007-04-24
09:55:55 UTC (rev 891)
+++ branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDescriptorARD.cpp	2007-04-24
10:23:09 UTC (rev 892)
@@ -25,6 +25,10 @@
               along with this program; if not, write to the Free Software
               Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
+#include "MInternal.h"
+
+#include "MDescriptorRecord.h"
+#include "MDescriptorRecordARD.h"
 #include "MDescriptorARD.h"
 
 MDescriptorARD::MDescriptorARD( SQLSMALLINT odbcVersion, SQLSMALLINT allocType )

Modified: branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDescriptorARD.h
===================================================================
--- branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDescriptorARD.h	2007-04-24
09:55:55 UTC (rev 891)
+++ branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDescriptorARD.h	2007-04-24
10:23:09 UTC (rev 892)
@@ -30,8 +30,6 @@
 #ifndef MDESCRIPTORARD_H
 #define MDESCRIPTORARD_H
 
-#include "MInternal.h"
-
 /*!
     \brief  
     \sa     

Modified: branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDescriptorIPD.cpp
===================================================================
--- branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDescriptorIPD.cpp	2007-04-24
09:55:55 UTC (rev 891)
+++ branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDescriptorIPD.cpp	2007-04-24
10:23:09 UTC (rev 892)
@@ -26,6 +26,11 @@
               Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
 
+#include "MInternal.h"
+
+#include "MDescriptorRecord.h"
+#include "MDescriptorRecordIPD.h"
+
 #include "MDescriptorIPD.h"
 
 MDescriptorIPD::MDescriptorIPD( SQLSMALLINT odbcVersion )

Modified: branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDescriptorIPD.h
===================================================================
--- branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDescriptorIPD.h	2007-04-24
09:55:55 UTC (rev 891)
+++ branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDescriptorIPD.h	2007-04-24
10:23:09 UTC (rev 892)
@@ -30,21 +30,19 @@
 #ifndef MDESCRIPTORIPD_H
 #define MDESCRIPTORIPD_H
 
-#include "MInternal.h"
-
 /*!
     \brief  
     \sa     
 */
 class MDescriptorIPD : public MDescriptor
 {
-    friend class MDescriptorRecordIPD;
 public:
     MDescriptorIPD( SQLSMALLINT odbcVersion );
     virtual ~MDescriptorIPD() {};
 
     /* setters */
-    SQLRETURN setDescField( SQLSMALLINT nRecNumber, SQLSMALLINT nFieldIdentifier,
SQLPOINTER pValuePtr, SQLINTEGER nBufferLength );
+    SQLRETURN setDescField(SQLSMALLINT nRecNumber, SQLSMALLINT nFieldIdentifier,
+                           SQLPOINTER pValuePtr, SQLINTEGER nBufferLength);
 
     /* getters */
 

Modified: branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDescriptorIRD.cpp
===================================================================
--- branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDescriptorIRD.cpp	2007-04-24
09:55:55 UTC (rev 891)
+++ branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDescriptorIRD.cpp	2007-04-24
10:23:09 UTC (rev 892)
@@ -25,7 +25,11 @@
               along with this program; if not, write to the Free Software
               Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
+#include "MInternal.h"
 
+#include "MDescriptorRecord.h"
+#include "MDescriptorRecordIRD.h"
+
 #include "MDescriptorIRD.h"
 
 MDescriptorIRD::MDescriptorIRD( SQLSMALLINT odbcVersion )

Modified: branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDescriptorIRD.h
===================================================================
--- branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDescriptorIRD.h	2007-04-24
09:55:55 UTC (rev 891)
+++ branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDescriptorIRD.h	2007-04-24
10:23:09 UTC (rev 892)
@@ -29,21 +29,19 @@
 #ifndef MDESCRIPTORIRD_H
 #define MDESCRIPTORIRD_H
 
-#include "MInternal.h"
-
 /*!
     \brief  
     \sa     
 */
 class MDescriptorIRD : public MDescriptor
 {
-    friend class MDescriptorRecordIRD;
 public:
     MDescriptorIRD( SQLSMALLINT odbcVersion );
     virtual ~MDescriptorIRD() {};
 
     /* setters */
-    SQLRETURN setDescField( SQLSMALLINT nRecNumber, SQLSMALLINT nFieldIdentifier,
SQLPOINTER pValuePtr, SQLINTEGER nBufferLength );
+    SQLRETURN setDescField(SQLSMALLINT nRecNumber, SQLSMALLINT nFieldIdentifier,
+                           SQLPOINTER pValuePtr, SQLINTEGER nBufferLength);
 
     /* getters */
 

Modified: branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDescriptorRecord.cpp
===================================================================
--- branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDescriptorRecord.cpp	2007-04-24
09:55:55 UTC (rev 891)
+++ branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDescriptorRecord.cpp	2007-04-24
10:23:09 UTC (rev 892)
@@ -27,6 +27,7 @@
 */
 
 #include "MInternal.h"
+#include "MDescriptorRecord.h"
 #include "MValidator.h"
 
 /*!

Modified: branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDescriptorRecord.h
===================================================================
--- branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDescriptorRecord.h	2007-04-24
09:55:55 UTC (rev 891)
+++ branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDescriptorRecord.h	2007-04-24
10:23:09 UTC (rev 892)
@@ -29,8 +29,6 @@
 #ifndef MDESCRIPTORRECORD_H
 #define MDESCRIPTORRECORD_H
 
-#include "MInternal.h"
-
 /*!
     \brief  Descriptor records represent different things depending
             upon the type of descriptor;

Modified: branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDescriptorRecordAPD.cpp
===================================================================
---
branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDescriptorRecordAPD.cpp	2007-04-24
09:55:55 UTC (rev 891)
+++
branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDescriptorRecordAPD.cpp	2007-04-24
10:23:09 UTC (rev 892)
@@ -26,8 +26,13 @@
               Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
 
+#include "MInternal.h"
+
+#include "MDescriptorRecord.h"
 #include "MDescriptorRecordAPD.h"
 
+#include "MDescriptorAPD.h"
+
 /*!
     \brief  zzzzz
     

Modified: branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDescriptorRecordAPD.h
===================================================================
--- branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDescriptorRecordAPD.h	2007-04-24
09:55:55 UTC (rev 891)
+++ branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDescriptorRecordAPD.h	2007-04-24
10:23:09 UTC (rev 892)
@@ -29,7 +29,7 @@
 #ifndef MDESCRIPTORRECORDAPD_H
 #define MDESCRIPTORRECORDAPD_H
 
-#include "MInternal.h"
+class MDescriptorAPD;
 
 class MDescriptorRecordAPD : public MDescriptorRecord
 {

Modified: branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDescriptorRecordARD.cpp
===================================================================
---
branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDescriptorRecordARD.cpp	2007-04-24
09:55:55 UTC (rev 891)
+++
branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDescriptorRecordARD.cpp	2007-04-24
10:23:09 UTC (rev 892)
@@ -26,9 +26,13 @@
               Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
 
+#include "MInternal.h"
+#include "MDescriptorRecord.h"
 #include "MDescriptorRecordARD.h"
 
+#include "MDescriptorARD.h"
 
+
 MDescriptorRecordARD::MDescriptorRecordARD( MDescriptorARD *pDescriptor )
     : MDescriptorRecord( pDescriptor )
 {

Modified: branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDescriptorRecordARD.h
===================================================================
--- branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDescriptorRecordARD.h	2007-04-24
09:55:55 UTC (rev 891)
+++ branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDescriptorRecordARD.h	2007-04-24
10:23:09 UTC (rev 892)
@@ -29,7 +29,7 @@
 #ifndef MDESCRIPTORRECORDARD_H
 #define MDESCRIPTORRECORDARD_H
 
-#include "MInternal.h"
+class MDescriptorARD;
 
 class MDescriptorRecordARD : public MDescriptorRecord
 {

Modified: branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDescriptorRecordIPD.cpp
===================================================================
---
branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDescriptorRecordIPD.cpp	2007-04-24
09:55:55 UTC (rev 891)
+++
branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDescriptorRecordIPD.cpp	2007-04-24
10:23:09 UTC (rev 892)
@@ -26,9 +26,13 @@
               Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
 
+#include "MInternal.h"
+#include "MDescriptorRecord.h"
 #include "MDescriptorRecordIPD.h"
 
+#include "MDescriptorIPD.h"
 
+
 MDescriptorRecordIPD::MDescriptorRecordIPD( MDescriptorIPD *pDescriptor )
     : MDescriptorRecord( pDescriptor )
 {

Modified: branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDescriptorRecordIPD.h
===================================================================
--- branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDescriptorRecordIPD.h	2007-04-24
09:55:55 UTC (rev 891)
+++ branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDescriptorRecordIPD.h	2007-04-24
10:23:09 UTC (rev 892)
@@ -29,7 +29,7 @@
 #ifndef MDESCRIPTORRECORDIPD_H
 #define MDESCRIPTORRECORDIPD_H
 
-#include "MInternal.h"
+class MDescriptorIPD;
 
 class MDescriptorRecordIPD : public MDescriptorRecord
 {

Modified: branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDescriptorRecordIRD.cpp
===================================================================
---
branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDescriptorRecordIRD.cpp	2007-04-24
09:55:55 UTC (rev 891)
+++
branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDescriptorRecordIRD.cpp	2007-04-24
10:23:09 UTC (rev 892)
@@ -26,8 +26,12 @@
               Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
 
+#include "MInternal.h"
+#include "MDescriptorRecord.h"
 #include "MDescriptorRecordIRD.h"
 
+#include "MDescriptorIRD.h"
+
 MDescriptorRecordIRD::MDescriptorRecordIRD( MDescriptorIRD *pDescriptor )
     : MDescriptorRecord( pDescriptor )
 {

Modified: branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDescriptorRecordIRD.h
===================================================================
--- branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDescriptorRecordIRD.h	2007-04-24
09:55:55 UTC (rev 891)
+++ branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDescriptorRecordIRD.h	2007-04-24
10:23:09 UTC (rev 892)
@@ -29,7 +29,7 @@
 #ifndef MDESCRIPTORRECORDIRD_H
 #define MDESCRIPTORRECORDIRD_H
 
-#include "MInternal.h"
+class MDescriptorIRD;
 
 class MDescriptorRecordIRD : public MDescriptorRecord
 {

Modified: branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDiagnostic.cpp
===================================================================
--- branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDiagnostic.cpp	2007-04-24
09:55:55 UTC (rev 891)
+++ branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDiagnostic.cpp	2007-04-24
10:23:09 UTC (rev 892)
@@ -26,7 +26,9 @@
               Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
 
+#include "MInternal.h"
 #include "MDiagnostic.h"
+#include "MDiagnosticRecord.h"
 
 /*!
     \brief  Allocates a new diagnostics structure.

Modified: branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDiagnostic.h
===================================================================
--- branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDiagnostic.h	2007-04-24 09:55:55
UTC (rev 891)
+++ branches/feature-cursor-design/SDK/MYSQLPlus/Library/MDiagnostic.h	2007-04-24 10:23:09
UTC (rev 892)
@@ -49,8 +49,8 @@
 #ifndef MDIAGNOSTIC_H
 #define MDIAGNOSTIC_H
 
-#include "MInternal.h"
 
+class MDiagnosticRecord;
 /*!
     \internal
     \brief  This is the main handle for diagnostic information.

Modified: branches/feature-cursor-design/SDK/MYSQLPlus/Library/MInternal.h
===================================================================
--- branches/feature-cursor-design/SDK/MYSQLPlus/Library/MInternal.h	2007-04-24 09:55:55
UTC (rev 891)
+++ branches/feature-cursor-design/SDK/MYSQLPlus/Library/MInternal.h	2007-04-24 10:23:09
UTC (rev 892)
@@ -47,68 +47,6 @@
 
 #include <myodbc_dbug.h>
 
-class MCommands;
-class MCommand;
-class MResult;
-class MStatePutData;
-#ifdef RESULTPLUS
-class MResultPlus;
-#endif
-#ifdef RESULTRES
-class MResultRes;
-#endif
-#ifdef RESULTSTMT
-class MResultStmt;
-#endif
-class MDiagnostic;
-class MDiagnosticRecord;
-class MDescriptorAPD;
-class MDescriptorARD;
-class MDescriptorIPD;
-class MDescriptorIRD;
-class MDescriptorRecord;
-class MDescriptorRecordAPD;
-class MDescriptorRecordARD;
-class MDescriptorRecordIPD;
-class MDescriptorRecordIRD;
-
-/*!
-    \internal
-    \note
-
-    Some compilers/version do not support;
-
-        QVector<QVector<QVariant>>
-
-    So we typedef. For example; MS VC v7 or older.
-*/
-typedef QVector<QVariant> MResultColumns;
-typedef QVector<MResultColumns> MResultRows;
-
-#include "MCommands.h"
-#include "MCommand.h"
 #include "MDiagnostic.h"
-#include "MDiagnosticRecord.h"
-#include "MDescriptorAPD.h"
-#include "MDescriptorARD.h"
-#include "MDescriptorIPD.h"
-#include "MDescriptorIRD.h"
-#include "MDescriptorRecord.h"
-#include "MDescriptorRecordAPD.h"
-#include "MDescriptorRecordARD.h"
-#include "MDescriptorRecordIPD.h"
-#include "MDescriptorRecordIRD.h"
-#include "MResult.h"
-#ifdef RESULTPLUS
-    #include "MResultPlus.h"
-#endif
-#ifdef RESULTRES
-    #include "MResultRes.h"
-#endif
-#ifdef RESULTSTMT
-    #include "MResultStmt.h"
-#endif
 
 #endif
-
-

Modified: branches/feature-cursor-design/SDK/MYSQLPlus/Library/MResult.cpp
===================================================================
--- branches/feature-cursor-design/SDK/MYSQLPlus/Library/MResult.cpp	2007-04-24 09:55:55
UTC (rev 891)
+++ branches/feature-cursor-design/SDK/MYSQLPlus/Library/MResult.cpp	2007-04-24 10:23:09
UTC (rev 892)
@@ -47,6 +47,13 @@
 */    
 
 #include "MInternal.h"
+#include "MResult.h"
+
+#include "MDescriptorRecord.h"
+#include "MDescriptorIRD.h"
+
+#include "MCommand.h"
+#include "MCommands.h"
 #include <stdlib.h>
 
 MStateExecute::MStateExecute()
@@ -84,18 +91,9 @@
         MResultStmt
 */
 MResult::MResult( MCommand *pCommand )
-    : QObject( pCommand )
 {
     DBUG_ENTER("MResult::MResult");
 
-    /*!
-        \internal
-        \todo
-
-        Decouple MResult from MCommand more not less.
-    */
-    Q_ASSERT( pCommand );
-
     bResultSetRowsKnown = false;
     nBuffered           = BUFFERED_UNBUFFERED;              // no ResultSet buffering 
     nConcurrency        = SQL_CONCUR_READ_ONLY;             // ReadOnly ResultSet
@@ -115,6 +113,14 @@
     nSimulateCursor     = SQL_SC_TRY_UNIQUE;       // we try to ensure pos update/delete
affects 1 row but in case of no unique row id - we may affect more than 1 row 
     vectorStatus.resize( nRowSetSize );
 
+    /*!
+        \internal
+        \todo
+
+        Decouple MResult from MCommand more not less.
+    */
+    parent             = pCommand;
+
     DBUG_VOID_RETURN;
 }
 
@@ -127,7 +133,7 @@
 SQLRETURN MResult::doPutData( SQLPOINTER, SQLINTEGER )
 {
     DBUG_ENTER("MResult::doPutData");
-    DBUG_RETURN( getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, 0, tr("Call
unsupported for this result class.") ) );
+    DBUG_RETURN( getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, 0,
QObject::tr("Call unsupported for this result class.") ) );
 }
 
 /*!
@@ -237,7 +243,7 @@
 SQLRETURN MResult::doExecute()
 {
     DBUG_ENTER("MResult::doExecute");
-    DBUG_RETURN( getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, 0, QString(
tr("Call is unsupported in this result class (%1).") ).arg( objectName() ) ) );
+    DBUG_RETURN( getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, 0, QString(
QObject::tr("Call is unsupported in this result class (%1).") ).arg( objectName() ) ) );
 }
 
 /*!
@@ -500,13 +506,13 @@
     if ( nResultSetRow + nRowSetSize > getResultSetRows() )
         DBUG_RETURN( setAfterEnd() );
 
-    DBUG_RETURN( getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, 0, tr("Unknown
condition in doNext().") ) );
+    DBUG_RETURN( getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, 0,
QObject::tr("Unknown condition in doNext().") ) );
 }
 
 SQLRETURN MResult::doPrepare()
 {
     DBUG_ENTER("MResult::doPrepare");
-    DBUG_RETURN( getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, 0, QString(
tr("Call is unsupported in this result class (%1).") ).arg( objectName() ) ) );
+    DBUG_RETURN( getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, 0, QString(
QObject::tr("Call is unsupported in this result class (%1).") ).arg( objectName() ) ) );
 }
 
 /*!
@@ -661,7 +667,7 @@
         DBUG_RETURN(SQL_SUCCESS);
     }
 
-    DBUG_RETURN( getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, 0, tr("Unknown
condition in doPrev().") ) );
+    DBUG_RETURN( getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, 0,
QObject::tr("Unknown condition in doPrev().") ) );
 }
 
 /*!
@@ -693,7 +699,7 @@
         DBUG_RETURN( getDiagnostic()->doAppend( MDiagnostic::STATE_HY010 ) );
 
     if ( nRows == 0 )
-        DBUG_RETURN( getDiagnostic()->doAppend( MDiagnostic::STATE_01000, 0,
tr("doSkip(0) is pointless.") ) );
+        DBUG_RETURN( getDiagnostic()->doAppend( MDiagnostic::STATE_01000, 0,
QObject::tr("doSkip(0) is pointless.") ) );
 
     stateExecute.doClear();
     stateGetData.doClear();
@@ -823,7 +829,7 @@
     if ( isAfterEnd() && nRows >= 0 )
         DBUG_RETURN( setAfterEnd() );
 
-    DBUG_RETURN( getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, 0, tr("Unknown
condition in doSkip().") ) );
+    DBUG_RETURN( getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, 0,
QObject::tr("Unknown condition in doSkip().") ) );
 }
 
 /*!
@@ -859,7 +865,7 @@
         DBUG_RETURN( getDiagnostic()->doAppend( MDiagnostic::STATE_HY010 ) );
 
     if ( getStatement()->getCursorType() == SQL_CURSOR_FORWARD_ONLY )
-        DBUG_RETURN( getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, 0,
tr("doGoto() not supported when SQL_CURSOR_FORWARD_ONLY") ) );
+        DBUG_RETURN( getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, 0,
QObject::tr("doGoto() not supported when SQL_CURSOR_FORWARD_ONLY") ) );
 
     stateExecute.doClear();
     stateGetData.doClear();
@@ -976,91 +982,91 @@
     if ( nRow > nResultSetRow )
         DBUG_RETURN( setAfterEnd() );
 
-    DBUG_RETURN( getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, 0, tr("Unknown
condition in doGoto().") ) );
+    DBUG_RETURN( getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, 0,
QObject::tr("Unknown condition in doGoto().") ) );
 }
 
 SQLRETURN MResult::doColumnPrivileges( const QString &, const QString &, const
QString &, const QString & )
 {
     DBUG_ENTER("MResult::doColumnPrivileges");
-    DBUG_RETURN( getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, 0, QString(
tr("Call is unsupported in this result class (%1).") ).arg( objectName() ) ) );
+    DBUG_RETURN( getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, 0, QString(
QObject::tr("Call is unsupported in this result class (%1).") ).arg( objectName() ) ) );
 }
 
 SQLRETURN MResult::doColumns( const QString &, const QString &, const QString
&, const QString & )
 {
     DBUG_ENTER("MResult::doColumns");
-    DBUG_RETURN( getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, 0, QString(
tr("Call is unsupported in this result class (%1).") ).arg( objectName() ) ) );
+    DBUG_RETURN( getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, 0, QString(
QObject::tr("Call is unsupported in this result class (%1).") ).arg( objectName() ) ) );
 }
 
 SQLRETURN MResult::doForeignKeys( const QString &, const QString &, const QString
&, const QString &, const QString &, const QString & )
 {
     DBUG_ENTER("MResult::doForeignKeys");
-    DBUG_RETURN( getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, 0, QString(
tr("Call is unsupported in this result class (%1).") ).arg( objectName() ) ) );
+    DBUG_RETURN( getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, 0, QString(
QObject::tr("Call is unsupported in this result class (%1).") ).arg( objectName() ) ) );
 }
 
 SQLRETURN MResult::doPrimaryKeys( const QString &, const QString &, const QString
& )
 {
     DBUG_ENTER("MResult::doPrimaryKeys");
-    DBUG_RETURN( getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, 0, QString(
tr("Call is unsupported in this result class (%1).") ).arg( objectName() ) ) );
+    DBUG_RETURN( getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, 0, QString(
QObject::tr("Call is unsupported in this result class (%1).") ).arg( objectName() ) ) );
 }
 
 SQLRETURN MResult::doProcedures( const QString &, const QString &, const QString
& )
 {
     DBUG_ENTER("MResult::doProcedures");
-    DBUG_RETURN( getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, 0, QString(
tr("Call is unsupported in this result class (%1).") ).arg( objectName() ) ) );
+    DBUG_RETURN( getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, 0, QString(
QObject::tr("Call is unsupported in this result class (%1).") ).arg( objectName() ) ) );
 }
 
 SQLRETURN MResult::doProcedureColumns( const QString &, const QString &, const
QString &, const QString & )
 {
     DBUG_ENTER("MResult::doProcedureColumns");
-    DBUG_RETURN( getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, 0, QString(
tr("Call is unsupported in this result class (%1).") ).arg( objectName() ) ) );
+    DBUG_RETURN( getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, 0, QString(
QObject::tr("Call is unsupported in this result class (%1).") ).arg( objectName() ) ) );
 }
 
 SQLRETURN MResult::doSpecialColumns( SQLUSMALLINT , const QString &, const QString
&, const QString &, SQLUSMALLINT , SQLUSMALLINT  )
 {
     DBUG_ENTER("MResult::doSpecialColumns");
-    DBUG_RETURN( getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, 0, QString(
tr("Call is unsupported in this result class (%1).") ).arg( objectName() ) ) );
+    DBUG_RETURN( getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, 0, QString(
QObject::tr("Call is unsupported in this result class (%1).") ).arg( objectName() ) ) );
 }
 
 SQLRETURN MResult::doStatistics( const QString &, const QString &, const QString
&, SQLUSMALLINT , SQLUSMALLINT  )
 {
     DBUG_ENTER("MResult::doStatistics");
-    DBUG_RETURN( getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, 0, QString(
tr("Call is unsupported in this result class (%1).") ).arg( objectName() ) ) );
+    DBUG_RETURN( getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, 0, QString(
QObject::tr("Call is unsupported in this result class (%1).") ).arg( objectName() ) ) );
 }
 
 SQLRETURN MResult::doTablePrivileges( const QString &, const QString &, const
QString & )
 {
     DBUG_ENTER("MResult::doTablePrivileges");
-    DBUG_RETURN( getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, 0, QString(
tr("Call is unsupported in this result class (%1).") ).arg( objectName() ) ) );
+    DBUG_RETURN( getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, 0, QString(
QObject::tr("Call is unsupported in this result class (%1).") ).arg( objectName() ) ) );
 }
 
 SQLRETURN MResult::doTables( const QString &, const QString &, const QString
&, const QString & )
 {
     DBUG_ENTER("MResult::doTables");
-    DBUG_RETURN( getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, 0, QString(
tr("Call is unsupported in this result class (%1).") ).arg( objectName() ) ) );
+    DBUG_RETURN( getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, 0, QString(
QObject::tr("Call is unsupported in this result class (%1).") ).arg( objectName() ) ) );
 }
 
 SQLRETURN MResult::doTypeInfo( SQLSMALLINT  )
 {
     DBUG_ENTER("MResult::doTypeInfo");
-    DBUG_RETURN( getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, 0, QString(
tr("Call is unsupported in this result class (%1).") ).arg( objectName() ) ) );
+    DBUG_RETURN( getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, 0, QString(
QObject::tr("Call is unsupported in this result class (%1).") ).arg( objectName() ) ) );
 }
 
 SQLRETURN MResult::doExecuteServer()
 {
     DBUG_ENTER("MResult::doExecuteServer");
-    DBUG_RETURN( getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, 0, QString(
tr("Call is unsupported in this result class (%1).") ).arg( objectName() ) ) );
+    DBUG_RETURN( getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, 0, QString(
QObject::tr("Call is unsupported in this result class (%1).") ).arg( objectName() ) ) );
 }
 
 SQLRETURN MResult::doGetParameters()
 {
     DBUG_ENTER("MResult::doGetParameters");
-    DBUG_RETURN( getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, 0, QString(
tr("Call is unsupported in this result class (%1).") ).arg( objectName() ) ) );
+    DBUG_RETURN( getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, 0, QString(
QObject::tr("Call is unsupported in this result class (%1).") ).arg( objectName() ) ) );
 }
 
 SQLRETURN MResult::doGetParameter()
 {
     DBUG_ENTER("MResult::doGetParameter");
-    DBUG_RETURN( getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, 0, QString(
tr("Call is unsupported in this result class (%1).") ).arg( objectName() ) ) );
+    DBUG_RETURN( getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, 0, QString(
QObject::tr("Call is unsupported in this result class (%1).") ).arg( objectName() ) ) );
 }
 
 /*! 
@@ -1082,10 +1088,10 @@
     DBUG_ENTER("MResult::doLoadMetaDataField");
 
     if ( !pField )
-        DBUG_RETURN( getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, 0,
tr("Invalid field structure. Failed to store field descriptor information.") ) );
+        DBUG_RETURN( getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, 0,
QObject::tr("Invalid field structure. Failed to store field descriptor information.") )
);
 
     if ( nField > (unsigned int)pDescriptor->getCount() )
-        DBUG_RETURN( getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, 0, tr("Field
index out of range. Failed to store field descriptor information.") ) );
+        DBUG_RETURN( getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, 0,
QObject::tr("Field index out of range. Failed to store field descriptor information.") )
);
 
     /*
         WARNING!!!
@@ -1514,7 +1520,7 @@
             break;
         default:
         {
-            DBUG_RETURN( getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, 0,
QString( "%1 %2" ).arg( pField->type ).arg( tr(" is an unknown MYSQL column data
type.") ) ) );
+            DBUG_RETURN( getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, 0,
QString( "%1 %2" ).arg( pField->type ).arg( QObject::tr(" is an unknown MYSQL column
data type.") ) ) );
         }
     }
 
@@ -1664,6 +1670,6 @@
 SQLRETURN MResult::doRefreshArray( SQLUINTEGER /* nRowSetRow */, SQLUINTEGER /* nLength
*/ )
 {
     DBUG_ENTER("MResult::doRefreshArray");
-    DBUG_RETURN( getDiagnostic()->doAppend( MDiagnostic::STATE_HYC00, 0, tr("Row-wise
binding not supported.") ) );
+    DBUG_RETURN( getDiagnostic()->doAppend( MDiagnostic::STATE_HYC00, 0,
QObject::tr("Row-wise binding not supported.") ) );
 }
 

Modified: branches/feature-cursor-design/SDK/MYSQLPlus/Library/MResult.h
===================================================================
--- branches/feature-cursor-design/SDK/MYSQLPlus/Library/MResult.h	2007-04-24 09:55:55 UTC
(rev 891)
+++ branches/feature-cursor-design/SDK/MYSQLPlus/Library/MResult.h	2007-04-24 10:23:09 UTC
(rev 892)
@@ -29,8 +29,14 @@
 #ifndef MRESULT_H
 #define MRESULT_H
 
-#include "MInternal.h"
 
+class MDescriptor;
+class MDescriptorIRD;
+class MDescriptorRecordAPD;
+class MDescriptorRecordARD;
+class MDescriptorRecordIPD;
+class MDescriptorRecordIRD;
+
 /*!
     \brief      Data to support getData.
 
@@ -188,6 +194,20 @@
 
 
 /*!
+    \internal
+    \note
+
+    Some compilers/version do not support;
+
+        QVector<QVector<QVariant>>
+
+    So we typedef. For example; MS VC v7 or older.
+*/
+typedef QVector<QVariant> MResultColumns;
+typedef QVector<MResultColumns> MResultRows;
+
+
+/*!
     \brief  ResultSet abstraction.
 
             This is the base class (pure virtual) for a result-set. The problem this
@@ -274,7 +294,7 @@
             MResultStmt
             MStatement
 */
-class MResult : public QObject
+class MResult
 {
     friend class MStatement;
 public:
@@ -424,6 +444,8 @@
     virtual BOOL isValidResultSetRow();
     virtual BOOL isValidRowSetRow();
 
+    virtual QString objectName() { return "MResult";}
+
 protected:
     MStateGetData       stateGetData;       /*!< to allow getData to support chunking
data out (via successive getData calls on same column) */
     MStateExecute       stateExecute;       /*!< to allow doExecute to support
chunking data in (via doParamData & doPutData)                */
@@ -591,6 +613,8 @@
     qulonglong      nResultSetRows;         /*!< \todo qulonglong may be bigger than
SQLUINTEGER but still - see about getting rid of this limitation.          */
     qulonglong      nRowsAffected;          /*!< number of rows affected by a
non-SELECT statement (catalog and SHOW statements count as SELECT in this case)   */
     STATE           nState;                 /*!< our state                            
                                                                         */
+
+    MCommand        *parent;
 };
 
 #endif

Modified: branches/feature-cursor-design/SDK/MYSQLPlus/Library/MResultPlus.cpp
===================================================================
--- branches/feature-cursor-design/SDK/MYSQLPlus/Library/MResultPlus.cpp	2007-04-24
09:55:55 UTC (rev 891)
+++ branches/feature-cursor-design/SDK/MYSQLPlus/Library/MResultPlus.cpp	2007-04-24
10:23:09 UTC (rev 892)
@@ -25,9 +25,15 @@
               along with this program; if not, write to the Free Software
               Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
+#include "MInternal.h"
 
+#include "MResult.h"
 #include "MResultPlus.h"
 
+#include "MDescriptorIRD.h"
+#include "MDescriptorRecord.h"
+#include "MDescriptorRecordIRD.h"
+
 /* TODO XXX !!! any parameters need to be escaped */
 
 MResultPlus::MResultPlus( MCommand *pCommand )
@@ -35,7 +41,7 @@
 {
     DBUG_ENTER("MResultPlus::MResultPlus");
 
-    setObjectName( "MResultPlus" ); // we avoid Q_OBJECT by avoiding className
+//    setObjectName( "MResultPlus" ); // we avoid Q_OBJECT by avoiding className
 
     stringlistTableTypesPossible << "SYSTEM TABLE" << "TABLE";
     setState( STATE_INITIALIZED );
@@ -68,18 +74,22 @@
         if ( getState() < STATE_EXECUTED )
             DBUG_RETURN(getDiagnostic()->doAppend( MDiagnostic::STATE_HY010 ) );
 
-        DBUG_RETURN(getDiagnostic()->doAppend( MDiagnostic::STATE_HY010, 0,
tr("Resultset is read-only.") ) );
+        DBUG_RETURN(getDiagnostic()->doAppend(MDiagnostic::STATE_HY010, 0,
+                                              QObject::tr("Resultset is read-only.")));
     }
 
     if ( !isValidRowSetRow() )
-        DBUG_RETURN(getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, 0,
tr("Invalid row.") ) );
+        DBUG_RETURN(getDiagnostic()->doAppend(MDiagnostic::STATE_HY000, 0,
+                                              QObject::tr("Invalid row.")));
 
     if ( !isValidColumn( nColumn ) )
-        DBUG_RETURN(getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, 0,
tr("Invalid column.") ) );
+        DBUG_RETURN(getDiagnostic()->doAppend(MDiagnostic::STATE_HY000, 0,
+                                              QObject::tr("Invalid column.")));
 
     // can not write this column (and it does not really exist anyway as bookmark is row
num)
     if (  nColumn == 0 )
-        DBUG_RETURN(getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, 0,
tr("Invalid column. Bookmark column is read-only.") ) );
+        DBUG_RETURN(getDiagnostic()->doAppend(MDiagnostic::STATE_HY000, 0,
+                                              QObject::tr("Invalid column. Bookmark
column is read-only.")));
 
     stateGetData.doClear();
 
@@ -103,7 +113,8 @@
         if ( getState() < STATE_EXECUTED )
             DBUG_RETURN(getDiagnostic()->doAppend( MDiagnostic::STATE_HY010 ) );
 
-        DBUG_RETURN(getDiagnostic()->doAppend( MDiagnostic::STATE_HY010, 0,
tr("Resultset is read-only.") ) );
+        DBUG_RETURN(getDiagnostic()->doAppend(MDiagnostic::STATE_HY010, 0,
+                                              QObject::tr("Resultset is read-only.")));
     }
 
     stateGetData.doClear();
@@ -164,7 +175,8 @@
 
     stateGetData.doClear();
 
-    DBUG_RETURN(getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, 0, tr("Resultset
is read-only.") ) );
+    DBUG_RETURN(getDiagnostic()->doAppend(MDiagnostic::STATE_HY000, 0,
+                                          QObject::tr("Resultset is read-only.")));
 }
 
 SQLRETURN MResultPlus::doInsert()
@@ -176,7 +188,8 @@
 
     stateGetData.doClear();
 
-    DBUG_RETURN(getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, 0, tr("Resultset
is read-only.") ) );
+    DBUG_RETURN(getDiagnostic()->doAppend(MDiagnostic::STATE_HY000, 0,
+                                          QObject::tr("Resultset is read-only.")));
 }
 
 SQLRETURN MResultPlus::doCommit()
@@ -186,7 +199,8 @@
     if ( getState() < STATE_EXECUTED )
         DBUG_RETURN(getDiagnostic()->doAppend( MDiagnostic::STATE_HY010 ) );
 
-    DBUG_RETURN(getDiagnostic()->doAppend( MDiagnostic::STATE_HY010, 0, tr("Resultset
is read-only.") ) );
+    DBUG_RETURN(getDiagnostic()->doAppend(MDiagnostic::STATE_HY010, 0,
+                                          QObject::tr("Resultset is read-only.")));
 }
 
 SQLRETURN MResultPlus::doColumnPrivileges( const QString &stringCatalog, const
QString &, const QString &stringTableFilter, const QString
&stringColumnFilter )
@@ -215,6 +229,7 @@
         QString     stringStatement;
         MYSQL_RES * pResult = NULL;
         MYSQL_ROW   pRow;
+        MYSQL     * mysql = getMySQL();
 
         stringStatement = "SELECT   TABLE_SCHEMA AS TABLE_CAT, "
                           "         TABLE_NAME, "
@@ -228,12 +243,16 @@
                           "         COLUMN_NAME  LIKE '" + stringColumnFilter + "' "
                           "ORDER BY TABLE_CAT, TABLE_NAME, COLUMN_NAME, PRIVILEGE,
GRANTEE";
 
-        if ( mysql_query( getMySQL(), stringStatement.toUtf8().data() ) )
-            DBUG_RETURN(getDiagnostic()->doAppend( MDiagnostic::STATE_HY000,
mysql_errno( getMySQL() ), mysql_error( getMySQL() ) ) );
+        if ( mysql_query(mysql, stringStatement.toUtf8().data() ) )
+            DBUG_RETURN(getDiagnostic()->doAppend(MDiagnostic::STATE_HY000,
+                                                  mysql_errno(mysql),
+                                                  mysql_error(mysql)));
 
-        pResult = mysql_use_result( getMySQL() );
+        pResult = mysql_use_result(mysql);
         if ( !pResult )
-            DBUG_RETURN(getDiagnostic()->doAppend( MDiagnostic::STATE_HY000,
mysql_errno( getMySQL() ), mysql_error( getMySQL() ) ) );
+            DBUG_RETURN(getDiagnostic()->doAppend(MDiagnostic::STATE_HY000,
+                                                  mysql_errno(mysql),
+                                                  mysql_error(mysql)));
 
         while ((pRow = mysql_fetch_row(pResult)))
         {
@@ -392,18 +411,23 @@
         QString     stringStatement;
         MYSQL_RES * pResult = NULL;
         MYSQL_ROW   pRow;
+        MYSQL     * mysql = getMySQL();
 
         stringStatement = "SELECT COLUMN_NAME, SEQ_IN_INDEX "
                           "FROM   INFORMATION_SCHEMA.STATISTICS "
                           "WHERE  TABLE_SCHEMA='" + stringCatalog + "' AND TABLE_NAME='"
+ stringTable + "' AND INDEX_NAME='PRIMARY' "
                           "ORDER BY SEQ_IN_INDEX ";
 
-        if ( mysql_query( getMySQL(), stringStatement.toUtf8().data() ) )
-            DBUG_RETURN(getDiagnostic()->doAppend( MDiagnostic::STATE_HY000,
mysql_errno( getMySQL() ), mysql_error( getMySQL() ) ) );
+        if ( mysql_query(mysql, stringStatement.toUtf8().data()))
+            DBUG_RETURN(getDiagnostic()->doAppend(MDiagnostic::STATE_HY000,
+                                                  mysql_errno(mysql),
+                                                  mysql_error(mysql)));
 
-        pResult = mysql_use_result( getMySQL() );
+        pResult = mysql_use_result(mysql);
         if ( !pResult )
-            DBUG_RETURN(getDiagnostic()->doAppend( MDiagnostic::STATE_HY000,
mysql_errno( getMySQL() ), mysql_error( getMySQL() ) ) );
+            DBUG_RETURN(getDiagnostic()->doAppend(MDiagnostic::STATE_HY000,
+                                                  mysql_errno(mysql),
+                                                  mysql_error(mysql)));
 
         while ((pRow = mysql_fetch_row(pResult)))
         {
@@ -452,6 +476,7 @@
         QString     stringStatement;
         MYSQL_RES * pResult = NULL;
         MYSQL_ROW   pRow;
+        MYSQL     * mysql = getMySQL();
 
         stringStatement = "SELECT   ROUTINE_SCHEMA  AS PROCEDURE_CAT,"
                           "         ROUTINE_NAME    AS PROCEDURE_NAME,"
@@ -462,12 +487,16 @@
                           "         ROUTINE_NAME   LIKE '" + stringProcedure + "' "
                           "ORDER BY PROCEDURE_CAT, PROCEDURE_NAME";
 
-        if ( mysql_query( getMySQL(), stringStatement.toUtf8().data() ) )
-            DBUG_RETURN(getDiagnostic()->doAppend( MDiagnostic::STATE_HY000,
mysql_errno( getMySQL() ), mysql_error( getMySQL() ) ) );
+        if (mysql_query(mysql, stringStatement.toUtf8().data()))
+            DBUG_RETURN(getDiagnostic()->doAppend(MDiagnostic::STATE_HY000,
+                                                  mysql_errno(mysql),
+                                                  mysql_error(mysql)));
 
-        pResult = mysql_use_result( getMySQL() );
+        pResult = mysql_use_result(mysql);
         if ( !pResult )
-            DBUG_RETURN(getDiagnostic()->doAppend( MDiagnostic::STATE_HY000,
mysql_errno( getMySQL() ), mysql_error( getMySQL() ) ) );
+            DBUG_RETURN(getDiagnostic()->doAppend(MDiagnostic::STATE_HY000,
+                                                  mysql_errno(mysql),
+                                                  mysql_error(mysql)));
 
         while ((pRow = mysql_fetch_row(pResult)))
         {
@@ -550,6 +579,7 @@
         QString     stringStatement;
         MYSQL_RES * pResult = NULL;
         MYSQL_ROW   pRow;
+        MYSQL     * mysql = getMySQL();
 
         /*! \todo handle FUNCTION */
         stringStatement = "SHOW CREATE PROCEDURE ";
@@ -557,12 +587,16 @@
             stringStatement += ( stringCatalog + "." );
         stringStatement += stringProcedure;
 
-        if ( mysql_query( getMySQL(), stringStatement.toUtf8().data() ) )
-            DBUG_RETURN(getDiagnostic()->doAppend( MDiagnostic::STATE_HY000,
mysql_errno( getMySQL() ), mysql_error( getMySQL() ) ) );
+        if (mysql_query(mysql, stringStatement.toUtf8().data()))
+            DBUG_RETURN(getDiagnostic()->doAppend(MDiagnostic::STATE_HY000,
+                                                  mysql_errno(mysql),
+                                                  mysql_error(mysql)));
 
-        pResult = mysql_use_result( getMySQL() );
+        pResult = mysql_use_result(mysql);
         if ( !pResult )
-            DBUG_RETURN(getDiagnostic()->doAppend( MDiagnostic::STATE_HY000,
mysql_errno( getMySQL() ), mysql_error( getMySQL() ) ) );
+            DBUG_RETURN(getDiagnostic()->doAppend(MDiagnostic::STATE_HY000,
+                                                  mysql_errno(mysql),
+                                                  mysql_error(mysql)));
 
         if ((pRow = mysql_fetch_row(pResult)))
             stringCreateProcedureCommand = QString::fromUtf8( pRow[2] );
@@ -689,6 +723,7 @@
         QString     stringStatement;
         MYSQL_RES * pResult = NULL;
         MYSQL_ROW   pRow;
+        MYSQL     * mysql = getMySQL();
 
         stringStatement = "SELECT * "
                           "FROM   INFORMATION_SCHEMA.STATISTICS "
@@ -696,12 +731,16 @@
                           ( nUnique == SQL_INDEX_UNIQUE ? " AND NON_UNIQUE=0 " : " " );
                           "ORDER BY NON_UNIQUE, TYPE, INDEX_QUALIFIER, INDEX_NAME, and
ORDINAL_POSITION ";
 
-        if ( mysql_query( getMySQL(), stringStatement.toUtf8().data() ) )
-            DBUG_RETURN(getDiagnostic()->doAppend( MDiagnostic::STATE_HY000,
mysql_errno( getMySQL() ), mysql_error( getMySQL() ) ) );
+        if (mysql_query(mysql, stringStatement.toUtf8().data()))
+            DBUG_RETURN(getDiagnostic()->doAppend(MDiagnostic::STATE_HY000,
+                                                  mysql_errno(mysql),
+                                                  mysql_error(mysql)));
 
-        pResult = mysql_use_result( getMySQL() );
+        pResult = mysql_use_result(mysql);
         if ( !pResult )
-            DBUG_RETURN(getDiagnostic()->doAppend( MDiagnostic::STATE_HY000,
mysql_errno( getMySQL() ), mysql_error( getMySQL() ) ) );
+            DBUG_RETURN(getDiagnostic()->doAppend(MDiagnostic::STATE_HY000,
+                                                  mysql_errno(mysql),
+                                                  mysql_error(mysql)));
 
         while ((pRow = mysql_fetch_row(pResult)))
         {
@@ -771,6 +810,7 @@
         QString     stringStatement;
         MYSQL_RES * pResult = NULL;
         MYSQL_ROW   pRow;
+        MYSQL     * mysql = getMySQL();
 
         stringStatement = "SELECT   TABLE_SCHEMA AS TABLE_CAT, "
                           "         TABLE_NAME, "
@@ -782,12 +822,16 @@
                           "         TABLE_NAME   LIKE '" + stringTableFilter + "' "
                           "ORDER BY TABLE_CAT, TABLE_NAME, PRIVILEGE, GRANTEE";
 
-        if ( mysql_query( getMySQL(), stringStatement.toUtf8().data() ) )
-            DBUG_RETURN(getDiagnostic()->doAppend( MDiagnostic::STATE_HY000,
mysql_errno( getMySQL() ), mysql_error( getMySQL() ) ) );
+        if (mysql_query(mysql, stringStatement.toUtf8().data()))
+            DBUG_RETURN(getDiagnostic()->doAppend(MDiagnostic::STATE_HY000,
+                                                  mysql_errno(mysql),
+                                                  mysql_error(mysql)));
 
-        pResult = mysql_use_result( getMySQL() );
-        if ( !pResult )
-            DBUG_RETURN(getDiagnostic()->doAppend( MDiagnostic::STATE_HY000,
mysql_errno( getMySQL() ), mysql_error( getMySQL() ) ) );
+        pResult = mysql_use_result(mysql);
+        if (!pResult )
+            DBUG_RETURN(getDiagnostic()->doAppend(MDiagnostic::STATE_HY000,
+                                                  mysql_errno(mysql),
+                                                  mysql_error(mysql)));
 
         while ((pRow = mysql_fetch_row(pResult)))
         {
@@ -901,12 +945,14 @@
     DBUG_ENTER("MResultPlus::doStateRollBack");
 
     if ( getState() <= nState  )
-        DBUG_RETURN(getDiagnostic()->doAppend( MDiagnostic::STATE_01000, 0,
tr("Request to roll back state has no affect.") ) );
+        DBUG_RETURN(getDiagnostic()->doAppend(MDiagnostic::STATE_01000, 0,
+                                              QObject::tr("Request to roll back state has
no affect.") ) );
 
     switch ( getState() )
     {
         case STATE_UNINITIALIZED:
-            DBUG_RETURN(getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, 0,
tr("Invalid state; no state before STATE_UNINITIALIZED.") ) );
+            DBUG_RETURN(getDiagnostic()->doAppend(MDiagnostic::STATE_HY000, 0,
+                                                  QObject::tr("Invalid state; no state
before STATE_UNINITIALIZED.")));
             break;
 
         case STATE_INITIALIZED:
@@ -930,7 +976,8 @@
             break;
 
         default:
-            DBUG_RETURN(getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, 0,
tr("Unknown state.") ) );
+            DBUG_RETURN(getDiagnostic()->doAppend(MDiagnostic::STATE_HY000, 0,
+                                                  QObject::tr("Unknown state.")));
     }
 
     /* recurse to roll-back more as needed */
@@ -1028,8 +1075,9 @@
     QStringList stringlistCatalogs;
     MYSQL_RES * pResult = NULL;
     MYSQL_ROW   pRow;
+    MYSQL     * mysql = getMySQL();
 
-    pResult = mysql_list_dbs( getMySQL(), stringFilter.toAscii().data() );
+    pResult = mysql_list_dbs(mysql, stringFilter.toAscii().data() );
     if ( pResult )
     {
         while ((pRow = mysql_fetch_row(pResult)))
@@ -1040,7 +1088,8 @@
         mysql_free_result( pResult ); 
     }
     else
-        getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, mysql_errno( getMySQL()
), mysql_error( getMySQL() ) );
+        getDiagnostic()->doAppend(MDiagnostic::STATE_HY000, mysql_errno(mysql),
+                                  mysql_error(mysql) );
 
     DBUG_PRINT("oreturn", ("%s", (const char *) stringlistCatalogs.join(",").toUtf8()));
     DBUG_RETURN(stringlistCatalogs);
@@ -1072,6 +1121,7 @@
     QStringList stringlistTables;
     MYSQL_RES * pResult = NULL;
     MYSQL_ROW   pRow;
+    MYSQL     * mysql = getMySQL();
 
     DBUG_ENTER("MResultPlus::getTables");
 
@@ -1086,15 +1136,17 @@
     if ( !stringTableFilter.isEmpty() )
         stringStatement += ( " LIKE '" + stringTableFilter + "'" );
 
-    if ( mysql_query( getMySQL(), stringStatement.toUtf8().data() ) )
+    if (mysql_query(mysql, stringStatement.toUtf8().data()))
     {
-        getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, mysql_errno( getMySQL()
), mysql_error( getMySQL() ) );
+        getDiagnostic()->doAppend(MDiagnostic::STATE_HY000, mysql_errno(mysql),
+                                  mysql_error(mysql));
     }
 
-    pResult = mysql_use_result( getMySQL() );
+    pResult = mysql_use_result(mysql);
     if ( !pResult )
     {
-        getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, mysql_errno( getMySQL()
), mysql_error( getMySQL() ) );
+        getDiagnostic()->doAppend(MDiagnostic::STATE_HY000, mysql_errno(mysql),
+                                  mysql_error(mysql));
         goto end;
     }
 
@@ -1117,6 +1169,7 @@
     QStringList stringlistColumns;
     MYSQL_RES * pResult = NULL;
     MYSQL_ROW   pRow;
+    MYSQL     * mysql = getMySQL();
 
     DBUG_ENTER("MResultPlus::getPrimaryKeyColumns");
 
@@ -1125,16 +1178,18 @@
                       "WHERE  TABLE_SCHEMA='" + stringCatalog + "' AND TABLE_NAME='" +
stringTable + "' AND INDEX_NAME='PRIMARY' "
                       "ORDER BY SEQ_IN_INDEX ";
 
-    if ( mysql_query( getMySQL(), stringStatement.toUtf8().data() ) )
+    if (mysql_query(mysql, stringStatement.toUtf8().data()))
     {
-        getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, mysql_errno( getMySQL()
), mysql_error( getMySQL() ) );
+        getDiagnostic()->doAppend(MDiagnostic::STATE_HY000, mysql_errno(mysql),
+                                  mysql_error(mysql));
         goto end;
     }
 
-    pResult = mysql_use_result( getMySQL() );
+    pResult = mysql_use_result(mysql);
     if ( !pResult )
     {
-        getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, mysql_errno( getMySQL()
), mysql_error( getMySQL() ) );
+        getDiagnostic()->doAppend(MDiagnostic::STATE_HY000, mysql_errno(mysql),
+                                  mysql_error(mysql));
         goto end;
     }
 
@@ -1156,22 +1211,26 @@
     QStringList stringlistForeignKeys;
     MYSQL_RES * pResult = NULL;
     MYSQL_ROW   pRow;
+    MYSQL     * mysql = getMySQL();
 
     DBUG_ENTER("MResultPlus::getForeignKeys");
 
     stringStatement  = "SELECT DISTINCT CONSTRAINT_NAME FROM
INFORMATION_SCHEMA.KEY_COLUMN_USAGE WHERE CONSTRAINT_NAME != 'PRIMARY' ";
     stringStatement += "AND TABLE_SCHEMA='" + stringCatalog + "' AND TABLE_NAME='" +
stringTable + "' ";
     stringStatement += "ORDER BY CONSTRAINT_NAME";
-    if ( mysql_query( getMySQL(), stringStatement.toUtf8().data() ) )
+
+    if (mysql_query(mysql, stringStatement.toUtf8().data()))
     {
-        getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, mysql_errno( getMySQL()
), mysql_error( getMySQL() ) );
+        getDiagnostic()->doAppend(MDiagnostic::STATE_HY000, mysql_errno(mysql),
+                                  mysql_error(mysql) );
         goto end;
     }
 
-    pResult = mysql_use_result( getMySQL() );
+    pResult = mysql_use_result(mysql);
     if ( !pResult )
     {
-        getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, mysql_errno( getMySQL()
), mysql_error( getMySQL() ) );
+        getDiagnostic()->doAppend(MDiagnostic::STATE_HY000, mysql_errno(mysql),
+                                  mysql_error(mysql));
         goto end;
     }
 
@@ -1194,6 +1253,7 @@
     QStringList stringlistColumns;
     MYSQL_RES * pResult = NULL;
     MYSQL_ROW   pRow;
+    MYSQL     * mysql = getMySQL();
 
     DBUG_ENTER("MResultPlus::getForeignKeyColumns");
 
@@ -1202,16 +1262,19 @@
     stringStatement += "WHERE CONSTRAINT_NAME = '" + stringForeignKeyName + "' ";
     stringStatement += "AND TABLE_SCHEMA='" + stringCatalog + "' AND TABLE_NAME='" +
stringTable + "' ";
     stringStatement += "ORDER BY ORDINAL_POSITION";
-    if ( mysql_query( getMySQL(), stringStatement.toUtf8().data() ) )
+
+    if (mysql_query(mysql, stringStatement.toUtf8().data()))
     {
-        getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, mysql_errno( getMySQL()
), mysql_error( getMySQL() ) );
+        getDiagnostic()->doAppend(MDiagnostic::STATE_HY000, mysql_errno(mysql),
+                                  mysql_error(mysql));
         goto end;
     }
 
-    pResult = mysql_use_result( getMySQL() );
+    pResult = mysql_use_result(mysql);
     if ( !pResult )
     {
-        getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, mysql_errno( getMySQL()
), mysql_error( getMySQL() ) );
+        getDiagnostic()->doAppend(MDiagnostic::STATE_HY000, mysql_errno(mysql),
+                                  mysql_error(mysql));
         goto end;
     }
 
@@ -1234,6 +1297,7 @@
     QStringList stringlistIndexs;
     MYSQL_RES * pResult = NULL;
     MYSQL_ROW   pRow;
+    MYSQL     * mysql = getMySQL();
 
     DBUG_ENTER("MResultPlus::getUniqueIndexs");
 
@@ -1242,16 +1306,18 @@
     stringStatement += "WHERE  TABLE_SCHEMA='" + stringCatalog + "' AND TABLE_NAME='" +
stringTable + "' AND NON_UNIQUE = 0 " + ( bExcludePrimary ? " AND INDEX_NAME != 'PRIMARY'
" : "" );
     stringStatement += "ORDER BY INDEX_NAME ";
 
-    if ( mysql_query( getMySQL(), stringStatement.toUtf8().data() ) )
+    if (mysql_query(mysql, stringStatement.toUtf8().data()))
     {
-        getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, mysql_errno( getMySQL()
), mysql_error( getMySQL() ) );
+        getDiagnostic()->doAppend(MDiagnostic::STATE_HY000, mysql_errno(mysql),
+                                  mysql_error(mysql));
         goto end;
     }
 
-    pResult = mysql_use_result( getMySQL() );
+    pResult = mysql_use_result(mysql);
     if ( !pResult )
     {
-        getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, mysql_errno( getMySQL()
), mysql_error( getMySQL() ) );
+        getDiagnostic()->doAppend(MDiagnostic::STATE_HY000, mysql_errno(mysql),
+                                  mysql_error(mysql) );
         goto end;
     }
 
@@ -1274,6 +1340,7 @@
     QStringList stringlistColumns;
     MYSQL_RES * pResult = NULL;
     MYSQL_ROW   pRow;
+    MYSQL     * mysql;
 
     DBUG_ENTER("MResultPlus::getUniqueIndexColumns");
 
@@ -1282,16 +1349,18 @@
     stringStatement += "WHERE  TABLE_SCHEMA='" + stringCatalog + "' AND TABLE_NAME='" +
stringTable + "' AND INDEX_NAME = '" + stringIndexName + "' ";
     stringStatement += "ORDER BY SEQ_IN_INDEX ";
 
-    if ( mysql_query( getMySQL(), stringStatement.toUtf8().data() ) )
+    if (mysql_query(mysql, stringStatement.toUtf8().data()))
     {
-        getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, mysql_errno( getMySQL()
), mysql_error( getMySQL() ) );
+        getDiagnostic()->doAppend(MDiagnostic::STATE_HY000, mysql_errno(mysql),
+                                  mysql_error(mysql));
         goto end;
     }
 
-    pResult = mysql_use_result( getMySQL() );
+    pResult = mysql_use_result(mysql);
     if ( !pResult )
     {
-        getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, mysql_errno( getMySQL()
), mysql_error( getMySQL() ) );
+        getDiagnostic()->doAppend(MDiagnostic::STATE_HY000, mysql_errno(mysql),
+                                  mysql_error(mysql));
         goto end;
     }
 
@@ -1349,7 +1418,6 @@
 
     DBUG_RETURN(SQL_SUCCESS);
 }
-
 SQLRETURN MResultPlus::doAppendTablesCatalogs()
 {
     DBUG_ENTER("MResultPlus::doAppendTablesCatalogs");
@@ -1599,6 +1667,7 @@
     unsigned int    nFields;
     unsigned int    nField;
     SQLRETURN       nReturn = SQL_SUCCESS;
+    MYSQL           *mysql;
 
     DBUG_ENTER("MResultPlus::doAppendColumnsColumns");
 
@@ -1615,16 +1684,22 @@
     */
     stringSQL = "SELECT * FROM `" + stringCatalog + "`.`" + stringTable + "` LIMIT 0";
 
-    if ( mysql_query( getMySQL(), stringSQL.toUtf8().data() ) )
-        DBUG_RETURN(getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, mysql_errno(
getMySQL() ), mysql_error( getMySQL() ) ) );
+    mysql = getMySQL();
+    if ( mysql_query( mysql, stringSQL.toUtf8().data() ) )
+        DBUG_RETURN(getDiagnostic()->doAppend(MDiagnostic::STATE_HY000,
+                                              mysql_errno(mysql),
+                                              mysql_error(mysql)));
 
-    pResult = mysql_use_result( getMySQL() );
+    pResult = mysql_use_result(mysql);
     if ( !pResult )
-        DBUG_RETURN(getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, mysql_errno(
getMySQL() ), mysql_error( getMySQL() ) ) );
+        DBUG_RETURN(getDiagnostic()->doAppend(MDiagnostic::STATE_HY000,
+                                              mysql_errno(mysql),
+                                              mysql_error(mysql)));
 
     nFields = mysql_num_fields( pResult );
     if ( !nFields ) 
-        DBUG_RETURN(getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, 0,
tr("mysql_num_fields() failed to return number of fields") ) );
+        DBUG_RETURN(getDiagnostic()->doAppend(MDiagnostic::STATE_HY000, 0,
+                                              QObject::tr("mysql_num_fields() failed to
return number of fields")));
 
     MDescriptorIRD descriptor( getEnvironment()->getODBCVersion() );
     descriptor.setCount( nFields, true );
@@ -1649,7 +1724,8 @@
         nReturn = doLoadMetaDataField( nField + 1, mysql_fetch_field_direct( pResult,
nField ), &descriptor );
         if ( !SQL_SUCCEEDED( nReturn ) )
         {
-            getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, 0, tr("Failed to
store field descriptor information.") );
+            getDiagnostic()->doAppend(MDiagnostic::STATE_HY000, 0,
+                                      QObject::tr("Failed to store field descriptor
information."));
             break;
         }
 
@@ -1742,6 +1818,7 @@
     MYSQL_FIELD *   pField;
     SQLRETURN       nReturn = SQL_SUCCESS;
     QStringList     stringlistColumns;
+    MYSQL           *mysql;
 
     DBUG_ENTER("MResultPlus::doAppendSpecialColumnsRowID");
     /*!
@@ -1785,16 +1862,22 @@
     */
     stringSQL = "SELECT " + stringlistColumns.join( QChar( ',' ) ) + " FROM `" +
stringCatalog + "`.`" + stringTable + "` LIMIT 0";
 
-    if ( mysql_query( getMySQL(), stringSQL.toUtf8().data() ) )
-        DBUG_RETURN(getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, mysql_errno(
getMySQL() ), mysql_error( getMySQL() ) ) );
+    mysql = getMySQL();
+    if ( mysql_query(mysql, stringSQL.toUtf8().data() ) )
+        DBUG_RETURN(getDiagnostic()->doAppend(MDiagnostic::STATE_HY000,
+                                              mysql_errno(mysql),
+                                              mysql_error(mysql)));
 
-    pResult = mysql_use_result( getMySQL() );
+    pResult = mysql_use_result(mysql);
     if ( !pResult )
-        DBUG_RETURN(getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, mysql_errno(
getMySQL() ), mysql_error( getMySQL() ) ) );
+        DBUG_RETURN(getDiagnostic()->doAppend(MDiagnostic::STATE_HY000,
+                                              mysql_errno(mysql),
+                                              mysql_error(mysql)));
 
     nFields = mysql_num_fields( pResult );
     if ( !nFields ) 
-        DBUG_RETURN(getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, 0,
tr("mysql_num_fields() failed to return number of fields") ) );
+        DBUG_RETURN(getDiagnostic()->doAppend(MDiagnostic::STATE_HY000, 0,
+                                              QObject::tr("mysql_num_fields() failed to
return number of fields")));
 
     MDescriptorIRD descriptor( getEnvironment()->getODBCVersion() );
     descriptor.setCount( nFields, true );
@@ -1806,7 +1889,8 @@
         nReturn = doLoadMetaDataField( nField + 1, pField, &descriptor );
         if ( !SQL_SUCCEEDED( nReturn ) )
         {
-            getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, 0, tr("Failed to
store field descriptor information.") );
+            getDiagnostic()->doAppend(MDiagnostic::STATE_HY000, 0,
+                                      QObject::tr("Failed to store field descriptor
information."));
             break;
         }
 
@@ -1916,6 +2000,7 @@
     QStringList stringlistColumns;
     MYSQL_RES * pResult = NULL;
     MYSQL_ROW   pRow;
+    MYSQL       *mysql;
 
     DBUG_ENTER("MResultPlus::doAppendForeignKeysColumns");
 
@@ -1937,12 +2022,17 @@
     }
     stringStatement += "ORDER BY TABLE_SCHEMA, TABLE_NAME, COLUMN_NAME,
ORDINAL_POSITION";
 
-    if ( mysql_query( getMySQL(), stringStatement.toUtf8().data() ) )
-        DBUG_RETURN(getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, mysql_errno(
getMySQL() ), mysql_error( getMySQL() ) ) );
+    mysql = getMySQL();
+    if ( mysql_query(mysql, stringStatement.toUtf8().data()))
+        DBUG_RETURN(getDiagnostic()->doAppend(MDiagnostic::STATE_HY000,
+                                              mysql_errno(mysql),
+                                              mysql_error(mysql)));
 
-    pResult = mysql_use_result( getMySQL() );
+    pResult = mysql_use_result(mysql);
     if ( !pResult )
-        DBUG_RETURN(getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, mysql_errno(
getMySQL() ), mysql_error( getMySQL() ) ) );
+        DBUG_RETURN(getDiagnostic()->doAppend(MDiagnostic::STATE_HY000,
+                                              mysql_errno(mysql),
+                                              mysql_error(mysql)));
 
     while ((pRow = mysql_fetch_row(pResult)))
     {
@@ -1976,6 +2066,7 @@
     QStringList stringlistColumns;
     MYSQL_RES * pResult = NULL;
     MYSQL_ROW   pRow;
+    MYSQL       *mysql;
 
     DBUG_ENTER("MResultPlus::doAppendForeignKeysFKColumns");
 
@@ -1999,12 +2090,17 @@
     }
     stringStatement += "ORDER BY TABLE_SCHEMA, TABLE_NAME, COLUMN_NAME,
ORDINAL_POSITION";
 
-    if ( mysql_query( getMySQL(), stringStatement.toUtf8().data() ) )
-        DBUG_RETURN(getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, mysql_errno(
getMySQL() ), mysql_error( getMySQL() ) ) );
+    mysql = getMySQL();
+    if ( mysql_query(mysql, stringStatement.toUtf8().data() ) )
+        DBUG_RETURN(getDiagnostic()->doAppend(MDiagnostic::STATE_HY000,
+                                              mysql_errno(mysql),
+                                              mysql_error(mysql)));
 
-    pResult = mysql_use_result( getMySQL() );
+    pResult = mysql_use_result(mysql);
     if ( !pResult )
-        DBUG_RETURN(getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, mysql_errno(
getMySQL() ), mysql_error( getMySQL() ) ) );
+        DBUG_RETURN(getDiagnostic()->doAppend(MDiagnostic::STATE_HY000,
+                                              mysql_errno(mysql),
+                                              mysql_error(mysql)));
 
     while ((pRow = mysql_fetch_row(pResult)))
     {
@@ -2037,6 +2133,7 @@
     QString     stringStatement;
     MYSQL_RES * pResult = NULL;
     MYSQL_ROW   pRow;
+    MYSQL       *mysql;
 
     DBUG_ENTER("MResultPlus::doAppendForeignKeysPKColumns");
 
@@ -2063,12 +2160,17 @@
         }
         stringStatement += "ORDER BY TABLE_SCHEMA, TABLE_NAME, COLUMN_NAME,
ORDINAL_POSITION";
 
-        if ( mysql_query( getMySQL(), stringStatement.toUtf8().data() ) )
-            DBUG_RETURN(getDiagnostic()->doAppend( MDiagnostic::STATE_HY000,
mysql_errno( getMySQL() ), mysql_error( getMySQL() ) ) );
+        mysql = getMySQL();
+        if ( mysql_query(mysql, stringStatement.toUtf8().data() ) )
+            DBUG_RETURN(getDiagnostic()->doAppend(MDiagnostic::STATE_HY000,
+                                                  mysql_errno(mysql),
+                                                  mysql_error(mysql)));
 
-        pResult = mysql_use_result( getMySQL() );
+        pResult = mysql_use_result(mysql);
         if ( !pResult )
-            DBUG_RETURN(getDiagnostic()->doAppend( MDiagnostic::STATE_HY000,
mysql_errno( getMySQL() ), mysql_error( getMySQL() ) ) );
+            DBUG_RETURN(getDiagnostic()->doAppend(MDiagnostic::STATE_HY000,
+                                                  mysql_errno(mysql),
+                                                  mysql_error(mysql)));
 
         while ((pRow = mysql_fetch_row(pResult)))
         {

Modified: branches/feature-cursor-design/SDK/MYSQLPlus/Library/MResultPlus.h
===================================================================
--- branches/feature-cursor-design/SDK/MYSQLPlus/Library/MResultPlus.h	2007-04-24 09:55:55
UTC (rev 891)
+++ branches/feature-cursor-design/SDK/MYSQLPlus/Library/MResultPlus.h	2007-04-24 10:23:09
UTC (rev 892)
@@ -29,8 +29,6 @@
 #ifndef MRESULTPLUS_H
 #define MRESULTPLUS_H
 
-#include "MInternal.h"
-
 /*!
     \brief  This is a statement where the result-set is created and maintained within
MYSQLPlus.
 
@@ -104,6 +102,8 @@
     /* isers */
     BOOL isResultSetPossible();
 
+    virtual QString objectName() { return "MResultPlus";}
+
 protected:
     /* doers */
     SQLRETURN doStateRollBack( STATE nState );

Modified: branches/feature-cursor-design/SDK/MYSQLPlus/Library/MResultPlus_typeinfo.cpp
===================================================================
---
branches/feature-cursor-design/SDK/MYSQLPlus/Library/MResultPlus_typeinfo.cpp	2007-04-24
09:55:55 UTC (rev 891)
+++
branches/feature-cursor-design/SDK/MYSQLPlus/Library/MResultPlus_typeinfo.cpp	2007-04-24
10:23:09 UTC (rev 892)
@@ -31,6 +31,8 @@
  * for SQLGetTypeInfo().                                              *
  **********************************************************************/
 
+#include "MInternal.h"
+#include "MResult.h"
 #include "MResultPlus.h"
 
 SQLRETURN MResultPlus::doTypeInfo( SQLSMALLINT nDataType )

Modified: branches/feature-cursor-design/SDK/MYSQLPlus/Library/MResultRes.cpp
===================================================================
--- branches/feature-cursor-design/SDK/MYSQLPlus/Library/MResultRes.cpp	2007-04-24
09:55:55 UTC (rev 891)
+++ branches/feature-cursor-design/SDK/MYSQLPlus/Library/MResultRes.cpp	2007-04-24
10:23:09 UTC (rev 892)
@@ -26,6 +26,8 @@
               Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
 
+#include "MInternal.h"
+#include "MResult.h"
 #include "MResultRes.h"
 
 /*! 
@@ -38,7 +40,7 @@
 {
     DBUG_ENTER("MResultRes::MResultRes");
 
-    setObjectName( "MResultRes" ); // we avoid Q_OBJECT by avoiding className
+//    setObjectName( "MResultRes" ); // we avoid Q_OBJECT by avoiding className
 
     pRes = NULL;
     setState( STATE_INITIALIZED );
@@ -84,7 +86,7 @@
     */
 
     DBUG_RETURN(getDiagnostic()->doAppend(MDiagnostic::STATE_HY000, 0,
-                                          tr("setData() not supported in this
context")));
+                                          QObject::tr("setData() not supported in this
context")));
 }
 
 /*! 
@@ -114,7 +116,7 @@
     */
 
     DBUG_RETURN(getDiagnostic()->doAppend(MDiagnostic::STATE_HY000, 0,
-                                          tr("doAppend() not supported in this
context")));
+                                          QObject::tr("doAppend() not supported in this
context")));
 }
 
 SQLRETURN MResultRes::doCommit()
@@ -131,7 +133,7 @@
     */
 
     DBUG_RETURN(getDiagnostic()->doAppend(MDiagnostic::STATE_HY000, 0,
-                                          tr("doCommit() not supported in this
context")));
+                                          QObject::tr("doCommit() not supported in this
context")));
 }
 
 /*! 
@@ -158,7 +160,7 @@
     */
 
     DBUG_RETURN(getDiagnostic()->doAppend(MDiagnostic::STATE_HY000, 0, 
-                                          tr("doDelete() not supported in this
context")));
+                                          QObject::tr("doDelete() not supported in this
context")));
 }
 
 /*! 
@@ -221,8 +223,8 @@
 
     if ( getImpParamDesc()->getCount() < pCommand->getParameterMarkerCount() )
         DBUG_RETURN(getDiagnostic()->doAppend(MDiagnostic::STATE_07002, 0,
-                                              QString(tr("number of IPD records (%1) must
be >= "
-                                                         "number of parameter markers
(%2)"))
+                                              QString(QObject::tr("number of IPD records
(%1) must be >= "
+                                                                  "number of parameter
markers (%2)"))
                                                       .arg(
getImpParamDesc()->getCount())
                                                       .arg(
pCommand->getParameterMarkerCount())));
 
@@ -234,8 +236,8 @@
     */
     if ( getAppParamDesc()->getCount() < pCommand->getParameterMarkerCount() )
         DBUG_RETURN(getDiagnostic()->doAppend(MDiagnostic::STATE_07002, 0,
-                                              QString(tr("number of APD records (%1) must
be >= "
-                                                         "number of parameter markers
(%2)"))
+                                              QString(QObject::tr("number of APD records
(%1) must be >= "
+                                                                  "number of parameter
markers (%2)"))
                                                      
.arg(getAppParamDesc()->getCount())
                                                      
.arg(pCommand->getParameterMarkerCount())));
 
@@ -284,7 +286,8 @@
         \sa MResultStmt::doInsert
     */
 
-    DBUG_RETURN( getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, 0,
tr("doInsert() not supported in this context") ) );
+    DBUG_RETURN(getDiagnostic()->doAppend(MDiagnostic::STATE_HY000, 0,
+                                          QObject::tr("doInsert() not supported in this
context")));
 }
 
 /*! 
@@ -445,7 +448,8 @@
 
     if ( nParameter >= stateExecute.vectorParameters.count() )
     {
-        getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, 0, tr("Parameter count
mismatch.") );
+        getDiagnostic()->doAppend(MDiagnostic::STATE_HY000, 0,
+                                  QObject::tr("Parameter count mismatch.") );
         DBUG_PRINT("oreturn", ("%p", &( stringParameter )));
         DBUG_RETURN( stringParameter );
     }
@@ -566,7 +570,7 @@
 
             case SQL_DEFAULT_PARAM:
                 DBUG_RETURN(getDiagnostic()->doAppend(MDiagnostic::STATE_07006, 0,
-                                                      tr("SQL_DEFAULT_PARAM not supported
at this time")));
+                                                      QObject::tr("SQL_DEFAULT_PARAM not
supported at this time")));
         }
     }
 
@@ -647,7 +651,8 @@
             pRes = mysql_store_result(getMySQL());    // bring all rows to client now
             break;
         default:
-            DBUG_RETURN( getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, 0,
tr("Unknown buffer type.") ) );
+            DBUG_RETURN(getDiagnostic()->doAppend(MDiagnostic::STATE_HY000, 0,
+                                                  QObject::tr("Unknown buffer type.")));
     }
 
     if ((!pRes && mysql_field_count(getMySQL())) || mysql_errno(getMySQL()))
@@ -697,7 +702,7 @@
                 break;
             default:
                 DBUG_RETURN(getDiagnostic()->doAppend(MDiagnostic::STATE_HY000, 0,
-                                                      tr("Unknown buffer type.")));
+                                                      QObject::tr("Unknown buffer
type.")));
         }
     }
 
@@ -787,7 +792,7 @@
 
         default:
             DBUG_RETURN( getDiagnostic()->doAppend(MDiagnostic::STATE_HY000, 0,
-                                                   tr("Unknown buffer type.")));
+                                                   QObject::tr("Unknown buffer type.")));
     }
 
     DBUG_RETURN(nReturn1);
@@ -851,7 +856,7 @@
 
         default:
             DBUG_RETURN(getDiagnostic()->doAppend(MDiagnostic::STATE_HY000, 0,
-                                                  tr("Unknown buffer type.")));
+                                                  QObject::tr("Unknown buffer type.")));
     }
 
     DBUG_RETURN(nReturn1);
@@ -898,7 +903,7 @@
 
         default:
             DBUG_RETURN(getDiagnostic()->doAppend(MDiagnostic::STATE_HY000, 0,
-                                                  tr("Unknown buffer type.")));
+                                                  QObject::tr("Unknown buffer type.")));
     }
 
     DBUG_RETURN(nReturn1);
@@ -947,7 +952,7 @@
 
         default:
             DBUG_RETURN(getDiagnostic()->doAppend(MDiagnostic::STATE_HY000, 0,
-                                                  tr("Unknown buffer type.")));
+                                                  QObject::tr("Unknown buffer type.")));
     }
 
     DBUG_RETURN(nReturn1);
@@ -990,7 +995,7 @@
 
         default:
             DBUG_RETURN(getDiagnostic()->doAppend(MDiagnostic::STATE_HY000, 0,
-                                                  tr("Unknown buffer type.")));
+                                                  QObject::tr("Unknown buffer type.")));
     }
 
     DBUG_RETURN(nReturn1);
@@ -1046,7 +1051,7 @@
 
         default:
             DBUG_RETURN(getDiagnostic()->doAppend(MDiagnostic::STATE_HY000, 0,
-                                                  tr("Unknown buffer type.")));
+                                                  QObject::tr("Unknown buffer type.")));
     }
 
     DBUG_RETURN(nReturn1);
@@ -1134,13 +1139,13 @@
 
     if ( getState() <= nState  )
         DBUG_RETURN(getDiagnostic()->doAppend(MDiagnostic::STATE_01000, 0,
-                                              tr("Request to roll back state has no
affect.")));
+                                              QObject::tr("Request to roll back state has
no affect.")));
 
     switch ( getState() )
     {
         case STATE_UNINITIALIZED:
             DBUG_RETURN(getDiagnostic()->doAppend(MDiagnostic::STATE_HY000, 0,
-                                                  tr("Invalid state; no state before
STATE_UNINITIALIZED.")));
+                                                  QObject::tr("Invalid state; no state
before STATE_UNINITIALIZED.")));
             break;
 
         case STATE_INITIALIZED:
@@ -1203,7 +1208,7 @@
 
     if ( getRowSetSize() < 1 )
         DBUG_RETURN(getDiagnostic()->doAppend(MDiagnostic::STATE_HY000, 0,
-                                              tr("RowSetSize < 1")));
+                                              QObject::tr("RowSetSize < 1")));
 
     switch ( getBuffered() )
     {
@@ -1257,7 +1262,7 @@
 
         default:
             DBUG_RETURN(getDiagnostic()->doAppend(MDiagnostic::STATE_HY000, 0,
-                                                  tr("Invalid buffer type.")));
+                                                  QObject::tr("Invalid buffer type.")));
     }
 
     DBUG_RETURN(SQL_SUCCESS);
@@ -1342,7 +1347,7 @@
                         pFieldLengths = mysql_fetch_lengths( pRes );
                     if ( pFieldLengths == NULL )
                        
DBUG_RETURN(getDiagnostic()->doAppend(MDiagnostic::STATE_HY000, 0,
-                                                              tr("mysql_fetch_lengths
failed.")));
+                                                             
QObject::tr("mysql_fetch_lengths failed.")));
 
                     vectorRows[nRow][nColumn].setValue(
                             QByteArray( (const char *)pRow[nColumn],
@@ -1350,7 +1355,7 @@
                     break;
                 default:
                     getDiagnostic()->doAppend(MDiagnostic::STATE_HY000, 0,
-                                              tr("Invalid column data type."));
+                                              QObject::tr("Invalid column data type."));
                     DBUG_RETURN(SQL_ROW_ERROR);
             }
         }
@@ -1408,7 +1413,7 @@
         SQLRETURN nReturn = doLoadMetaDataField( nField + 1, pField,
(MDescriptorIRD*)getImpRowDesc() );
         if ( !SQL_SUCCEEDED( nReturn ) )
             DBUG_RETURN(getDiagnostic()->doAppend(MDiagnostic::STATE_HY000, 0,
-                                                  tr("Failed to store field descriptor
information.")));
+                                                  QObject::tr("Failed to store field
descriptor information.")));
     }
 
     DBUG_RETURN(SQL_SUCCESS);

Modified: branches/feature-cursor-design/SDK/MYSQLPlus/Library/MResultRes.h
===================================================================
--- branches/feature-cursor-design/SDK/MYSQLPlus/Library/MResultRes.h	2007-04-24 09:55:55
UTC (rev 891)
+++ branches/feature-cursor-design/SDK/MYSQLPlus/Library/MResultRes.h	2007-04-24 10:23:09
UTC (rev 892)
@@ -69,6 +69,8 @@
     /* isers */
     BOOL isResultSetPossible();
 
+    virtual QString objectName() { return "MResultRes";}
+
 protected:
 
     /* getters */

Modified: branches/feature-cursor-design/SDK/MYSQLPlus/Library/MResultStmt.h
===================================================================
--- branches/feature-cursor-design/SDK/MYSQLPlus/Library/MResultStmt.h	2007-04-24 09:55:55
UTC (rev 891)
+++ branches/feature-cursor-design/SDK/MYSQLPlus/Library/MResultStmt.h	2007-04-24 10:23:09
UTC (rev 892)
@@ -77,7 +77,6 @@
 */
 class MResultStmt : public MResult
 {
-    friend class MStatement;
 public:
     MResultStmt( MStatement *pStatement );
     ~MResultStmt();
@@ -101,6 +100,8 @@
     SQLRETURN doSkip( qlonglong nRows );
     SQLRETURN doCommit();
 
+    virtual QString objectName() { return "MResultStmt";}
+
 protected:
 
     /* doers */

Modified: branches/feature-cursor-design/SDK/MYSQLPlus/Library/MResult_data_toC.cpp
===================================================================
--- branches/feature-cursor-design/SDK/MYSQLPlus/Library/MResult_data_toC.cpp	2007-04-24
09:55:55 UTC (rev 891)
+++ branches/feature-cursor-design/SDK/MYSQLPlus/Library/MResult_data_toC.cpp	2007-04-24
10:23:09 UTC (rev 892)
@@ -32,7 +32,13 @@
  **********************************************************************/
 
 #include "MInternal.h"
+#include "MResult.h"
+#include "MCommands.h"
 
+#include "MDescriptorRecord.h"
+#include "MDescriptorRecordIRD.h"
+#include "MDescriptorRecordARD.h"
+
 #include "MDataConvert.h"
 #include "MValidator.h"
 
@@ -240,7 +246,7 @@
         if ( nTargetType == SQL_ARD_TYPE )
             DBUG_RETURN( getDiagnostic()->doAppend(
                         MDiagnostic::STATE_HY000, 0,
-                        tr("SQL_ARD_TYPE is invalid target type for ARD") ) );
+                        QObject::tr("SQL_ARD_TYPE is invalid target type for ARD")));
 
         /* get prec+scale if using numeric struct */
         if ( nTargetType == SQL_C_NUMERIC )
@@ -310,7 +316,7 @@
                 {
                     *(SQLCHAR *)pTarget = 1;
                     getDiagnostic()->doAppend(MDiagnostic::STATE_01000, 0,
-                                              tr("value out of range for a bit - has been
forced to 1") );
+                                              QObject::tr("value out of range for a bit -
has been forced to 1"));
                 }
             case SQL_C_UTINYINT:
                 *(SQLCHAR *)pTarget = val.toUInt();
@@ -462,7 +468,7 @@
                 if ( stringlistData.count() > 2 )
                     DBUG_RETURN(getDiagnostic()->doAppend(
                                 MDiagnostic::STATE_07006, 0,
-                                tr("Data was converted to string but then had too many
decimal points.") ) );
+                                QObject::tr("Data was converted to string but then had
too many decimal points.")));
                 if ( stringlistData.count() > 1 )
                      nDecimal = stringlistData[1].length();
                 if ( stringlistData.count() > 0 )

Modified: branches/feature-cursor-design/SDK/MYSQLPlus/Library/MResult_data_toSQL.cpp
===================================================================
--- branches/feature-cursor-design/SDK/MYSQLPlus/Library/MResult_data_toSQL.cpp	2007-04-24
09:55:55 UTC (rev 891)
+++ branches/feature-cursor-design/SDK/MYSQLPlus/Library/MResult_data_toSQL.cpp	2007-04-24
10:23:09 UTC (rev 892)
@@ -33,7 +33,12 @@
  **********************************************************************/
 
 #include "MInternal.h"
+#include "MResult.h"
 
+#include "MDescriptorRecord.h"
+#include "MDescriptorRecordIPD.h"
+#include "MDescriptorRecordAPD.h"
+
 #include "MDataConvert.h"
 
 MStatePutData::MStatePutData()
@@ -232,7 +237,9 @@
 
     /* this is hokey but works */
     if ( objectName() == "MResultPlus" )
-        DBUG_RETURN(getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, 0, QString(
tr("Call is unsupported in this result class (%1).") ).arg( objectName() ) ) );
+        DBUG_RETURN(getDiagnostic()->doAppend(MDiagnostic::STATE_HY000, 0,
+                                              QString(QObject::tr("Call is unsupported in
this result class (%1).") ).
+                                                arg( objectName())));
 
     SQLRETURN nReturn;
 
@@ -308,7 +315,7 @@
                 pStatePutData->variantData ) )
     {
         DBUG_RETURN(getDiagnostic()->doAppend(MDiagnostic::STATE_HY000, 0,
-                                              QString( tr("unknown C data type %1")).
+                                              QString(QObject::tr("unknown C data type
%1")).
                                                arg( pStatePutData->getConciseTypeC() )
) );
     }
 
@@ -319,12 +326,12 @@
     if ( destType == QVariant::Invalid )
     {
         DBUG_RETURN(getDiagnostic()->doAppend(MDiagnostic::STATE_07006, 0,
-                                              tr("SQL data type not supported")));
+                                              QObject::tr("SQL data type not
supported")));
     }
     else if ( !v.canConvert( destType ) )
     {
         DBUG_RETURN(getDiagnostic()->doAppend(MDiagnostic::STATE_07006, 0,
-                                              tr("Conversion to SQL data type not
supported")));
+                                              QObject::tr("Conversion to SQL data type
not supported")));
     }
 
     /* convert data to format needed for execution */

Modified: branches/feature-cursor-design/SDK/MYSQLPlus/Library/MResult_props.cpp
===================================================================
--- branches/feature-cursor-design/SDK/MYSQLPlus/Library/MResult_props.cpp	2007-04-24
09:55:55 UTC (rev 891)
+++ branches/feature-cursor-design/SDK/MYSQLPlus/Library/MResult_props.cpp	2007-04-24
10:23:09 UTC (rev 892)
@@ -31,6 +31,9 @@
  *********************************************************************/
 
 #include "MInternal.h"
+#include "MResult.h"
+#include "MCommand.h"
+#include "MCommands.h"
 
 /*!
     \brief  Set concurrency.
@@ -285,10 +288,12 @@
         DBUG_RETURN( getDiagnostic()->doAppend( MDiagnostic::STATE_HY109 ) );
 
     if ( nRowSetRow > getRowSetSize() )
-        DBUG_RETURN( getDiagnostic()->doAppend( MDiagnostic::STATE_HY107, 0,
tr("Requested row exceeds RowSetSize.") ) );
+        DBUG_RETURN( getDiagnostic()->doAppend(MDiagnostic::STATE_HY107, 0,
+                                               QObject::tr("Requested row exceeds
RowSetSize.")));
 
     if ( nRowSetRow > getRowSetRows() )
-        DBUG_RETURN( getDiagnostic()->doAppend( MDiagnostic::STATE_HY107, 0,
tr("Requested row exceeds RowSetRows.") ) );
+        DBUG_RETURN( getDiagnostic()->doAppend(MDiagnostic::STATE_HY107, 0,
+                                               QObject::tr("Requested row exceeds
RowSetRows.")));
 
     stateExecute.doClear();
     stateGetData.doClear();
@@ -313,7 +318,8 @@
         DBUG_RETURN( getDiagnostic()->doAppend( MDiagnostic::STATE_HY010 ) );
 
     if ( nRowSetSize < 1 )
-        DBUG_RETURN( getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, 0,
tr("RowSetSize must be > 0.") ) );
+        DBUG_RETURN( getDiagnostic()->doAppend(MDiagnostic::STATE_HY000, 0,
+                                               QObject::tr("RowSetSize must be >
0.")));
 
     this->nRowSetSize = nRowSetSize;
     vectorStatus.resize( nRowSetSize );
@@ -667,7 +673,7 @@
 
 MCommand *MResult::getCommand()
 {
-    return (MCommand*)parent();
+    return parent;
 }
 
 MCommands *MResult::getCommands()

Modified: branches/feature-cursor-design/SDK/MYSQLPlus/Library/MStatement.cpp
===================================================================
--- branches/feature-cursor-design/SDK/MYSQLPlus/Library/MStatement.cpp	2007-04-24
09:55:55 UTC (rev 891)
+++ branches/feature-cursor-design/SDK/MYSQLPlus/Library/MStatement.cpp	2007-04-24
10:23:09 UTC (rev 892)
@@ -26,9 +26,26 @@
               Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
 
+#include "MValidator.h"
 #include "MInternal.h"
-#include "MValidator.h"
+#include "MResult.h"
 
+#include "MDiagnostic.h"
+
+#include "MCommand.h"
+#include "MCommands.h"
+
+#include "MDescriptorAPD.h"
+#include "MDescriptorARD.h"
+#include "MDescriptorIPD.h"
+#include "MDescriptorIRD.h"
+
+#include "MDescriptorRecord.h"
+#include "MDescriptorRecordAPD.h"
+#include "MDescriptorRecordARD.h"
+#include "MDescriptorRecordIPD.h"
+#include "MDescriptorRecordIRD.h"
+
 /*!
     \brief  Construct a MStatement.
 

Modified: branches/feature-cursor-design/SDK/MYSQLPlus/Library/MStatement_catalog.cpp
===================================================================
--- branches/feature-cursor-design/SDK/MYSQLPlus/Library/MStatement_catalog.cpp	2007-04-24
09:55:55 UTC (rev 891)
+++ branches/feature-cursor-design/SDK/MYSQLPlus/Library/MStatement_catalog.cpp	2007-04-24
10:23:09 UTC (rev 892)
@@ -31,6 +31,9 @@
  **********************************************************************/
 
 #include "MInternal.h"
+#include "MResult.h"
+#include "MCommand.h"
+#include "MCommands.h"
 
 SQLRETURN MStatement::doColumnPrivileges( SQLWCHAR *psCatalog, SQLSMALLINT nLength1,
SQLWCHAR *psSchema, SQLSMALLINT nLength2, SQLWCHAR *psTable, SQLSMALLINT nLength3,
SQLWCHAR *psColumn, SQLSMALLINT nLength4 )
 {

Modified: branches/feature-cursor-design/SDK/MYSQLPlus/Library/MStatement_props.cpp
===================================================================
--- branches/feature-cursor-design/SDK/MYSQLPlus/Library/MStatement_props.cpp	2007-04-24
09:55:55 UTC (rev 891)
+++ branches/feature-cursor-design/SDK/MYSQLPlus/Library/MStatement_props.cpp	2007-04-24
10:23:09 UTC (rev 892)
@@ -5,10 +5,12 @@
     \version  Connector/ODBC v5
     \date       2007
     
-    \license  Copyright (C) 2004-2007 MySQL AB
+  #include "MResult.h"
+#include "MResult.h"
+  \license  Copyright (C) 2004-2007 MySQL AB
 
               This program is free software; you can redistribute it and/or modify
-              it under the terms of the GNU General Public License as published by
+               it under the terms of the GNU General Public License as published by
               the Free Software Foundation; either version 2 of the License, or
               (at your option) any later version.
             
@@ -31,6 +33,9 @@
  **********************************************************************/
 
 #include "MInternal.h"
+#include "MResult.h"
+#include "MCommand.h"
+#include "MCommands.h"
 
 SQLRETURN MStatement::setCursorName( SQLWCHAR *pszCursorName, SQLSMALLINT nNameLength )
 {

Thread
Connector/ODBC 5 commit: r892 - branches/feature-cursor-design/SDK/MYSQLPlus/Libraryahristov24 Apr