List:Commits« Previous MessageNext Message »
From:jbalint Date:January 23 2007 10:50pm
Subject:Connector/ODBC 5 commit: r768 - in trunk: . SDK/MYSQLPlus/Library
View as plain text  
Modified:
   trunk/
   trunk/SDK/MYSQLPlus/Library/MCommand.h
   trunk/SDK/MYSQLPlus/Library/MCommands.cpp
   trunk/SDK/MYSQLPlus/Library/MCommands.h
   trunk/SDK/MYSQLPlus/Library/MDescriptorRecord.h
   trunk/SDK/MYSQLPlus/Library/MDescriptorRecordIRD.cpp
   trunk/config.pri
Log:
small code cleanups



Property changes on: trunk
___________________________________________________________________
Name: svk:merge
   - 23770081-651f-0410-8754-a6a0be119b88:/work/c-odbc:880
ba6c4e7b-c7fc-804d-ac3d-40e5d3c52c2f:/local/odbc5_fix_regressions:770
   + 23770081-651f-0410-8754-a6a0be119b88:/work/c-odbc:880
ba6c4e7b-c7fc-804d-ac3d-40e5d3c52c2f:/local/odbc5_fix_regressions:772

Modified: trunk/SDK/MYSQLPlus/Library/MCommand.h
===================================================================
--- trunk/SDK/MYSQLPlus/Library/MCommand.h	2007-01-18 23:15:39 UTC (rev 767)
+++ trunk/SDK/MYSQLPlus/Library/MCommand.h	2007-01-23 22:50:40 UTC (rev 768)
@@ -41,26 +41,26 @@
     enum STATE
     {
         STATE_UNINITIALIZED,
-        STATE_INITIALIZED,      /*!< we are in a doClear state                        
     */
-        STATE_PARSED,           /*!< we have some form of parsed command text         
     */
-        STATE_WITH_RESULT       /*!< we have a MResult (may be in any MResult state)  
     */
+        STATE_INITIALIZED,      /*!< we are in a doClear state                      
*/
+        STATE_PARSED,           /*!< we have some form of parsed command text       
*/
+        STATE_WITH_RESULT       /*!< we have a MResult (may be in any MResult state)
*/
     };
 
     enum COMMAND_TYPE
     {
-        COMMAND_TYPE_NULL,          /*!< we do not have a command                     
         */
-        COMMAND_TYPE_SELECT,        /*!< SELECT command has been prepared             
         */
-        COMMAND_TYPE_SELECT_INTO,   /*!< SELECT INTO command has been prepared        
         */
-        COMMAND_TYPE_SHOW,          /*!< SHOW command has been prepared               
         */
-        COMMAND_TYPE_UPDATE,        /*!< UPDATE command has been prepared             
         */
-        COMMAND_TYPE_DELETE,        /*!< DELETE command has been prepared             
         */
-        COMMAND_TYPE_INSERT,        /*!< INSERT command has been prepared             
         */
-        COMMAND_TYPE_CALL,          /*!< CALL command has been prepared               
         */
-        COMMAND_TYPE_CREATE,        /*!< CREATE command has been prepared             
         */
-        COMMAND_TYPE_GRANT,         /*!< GRANT command has been prepared              
         */
-        COMMAND_TYPE_SET,           /*!< SET command has been prepared                
         */
-        COMMAND_TYPE_INTERNAL,      /*!< No command text and we want MResultPlus.     
         */
-        COMMAND_TYPE_UNKNOWN        /*!< command starts with unknown keyword          
         */
+        COMMAND_TYPE_NULL,          /*!< we do not have a command                 */
+        COMMAND_TYPE_SELECT,        /*!< SELECT command has been prepared         */
+        COMMAND_TYPE_SELECT_INTO,   /*!< SELECT INTO command has been prepared    */
+        COMMAND_TYPE_SHOW,          /*!< SHOW command has been prepared           */
+        COMMAND_TYPE_UPDATE,        /*!< UPDATE command has been prepared         */
+        COMMAND_TYPE_DELETE,        /*!< DELETE command has been prepared         */
+        COMMAND_TYPE_INSERT,        /*!< INSERT command has been prepared         */
+        COMMAND_TYPE_CALL,          /*!< CALL command has been prepared           */
+        COMMAND_TYPE_CREATE,        /*!< CREATE command has been prepared         */
+        COMMAND_TYPE_GRANT,         /*!< GRANT command has been prepared          */
+        COMMAND_TYPE_SET,           /*!< SET command has been prepared            */
+        COMMAND_TYPE_INTERNAL,      /*!< No command text and we want MResultPlus. */
+        COMMAND_TYPE_UNKNOWN        /*!< command starts with unknown keyword      */
     };
 
     MCommand( MCommands *pCommands );
@@ -103,11 +103,11 @@
     MCommands *     getCommands();
     MConnection *   getConnection();
     MDiagnostic *   getDiagnostic();
-    MDescriptor*    getImpRowDesc();                /*!< SQL_ATTR_IMP_ROW_DESC        
                                                     */
+    MDescriptor*    getImpRowDesc();                /*!< SQL_ATTR_IMP_ROW_DESC */
     MStatement *    getStatement();
 
     /* doers */
-    SQLRETURN       doCreateResult();               /*!< Advances state to
STATE_WITH_RESULT.                                               */ 
+    SQLRETURN       doCreateResult();               /*!< Advances state to
STATE_WITH_RESULT. */ 
     SQLRETURN       doStateRollBack( STATE nState );
 
 private:
@@ -124,4 +124,3 @@
 
 #endif
 
-

Modified: trunk/SDK/MYSQLPlus/Library/MCommands.cpp
===================================================================
--- trunk/SDK/MYSQLPlus/Library/MCommands.cpp	2007-01-18 23:15:39 UTC (rev 767)
+++ trunk/SDK/MYSQLPlus/Library/MCommands.cpp	2007-01-23 22:50:40 UTC (rev 768)
@@ -59,17 +59,17 @@
         BOOL    bLastChar   = ( nChar == (stringText.length() - 1) );
 
         /* catch some last char problems */
-        if ( bLastChar &&                                                   /* we
are on last char                                  */
-             ( ( !cQuote.isNull() && cQuote != cChar ) ||                   /*
last char is not going to close our quote            */
-               ( cQuote.isNull() && stringQuotes.contains( cChar ) ) )  )   /*
last char is going to open a quote                   */
+        if ( bLastChar &&                                                   /* we
are on last char                       */
+             ( ( !cQuote.isNull() && cQuote != cChar ) ||                   /*
last char is not going to close our quote */
+               ( cQuote.isNull() && stringQuotes.contains( cChar ) ) )  )   /*
last char is going to open a quote        */
         {
             doClear();
             MYODBCDbgReturn( getDiagnostic()->doAppend( MDiagnostic::STATE_HY000, 0,
QString( "unclosed quote near: " ).arg( stringCommand ) ) );
         }
 
         /* catch command separator (including implied after last command) */
-        if ( bLastChar ||                                       /* we are on last char   
                              */
-             ( cQuote.isNull() && cChar == cSeparater ) )       /* command
separater                                    */
+        if ( bLastChar ||                                       /* we are on last char */
+             ( cQuote.isNull() && cChar == cSeparater ) )       /* command
separater   */
         {
             if ( cChar != cSeparater )
                 stringCommand += cChar;
@@ -480,4 +480,3 @@
     MYODBCDbgReturn3( "%p", getStatement()->getDiagnostic() );
 }
 
-

Modified: trunk/SDK/MYSQLPlus/Library/MCommands.h
===================================================================
--- trunk/SDK/MYSQLPlus/Library/MCommands.h	2007-01-18 23:15:39 UTC (rev 767)
+++ trunk/SDK/MYSQLPlus/Library/MCommands.h	2007-01-23 22:50:40 UTC (rev 768)
@@ -36,7 +36,7 @@
 
     \note   This is not intended to be a complete SQL parser - mostly because that is a
lot of work. However;
             a complete parser would be useful as we can not get all of this information
via the 
-            mysqlclient/server - certianly not in the connection/statement states we need
them in.
+            mysqlclient/server - certainly not in the connection/statement states we need
them in.
 
             This is not, at this time, optimized for speed. The focus is on clarity. In
particular; this
             does multiple passes over the command(s).
@@ -47,6 +47,7 @@
 {
     friend class MCommand;
     friend class MResult;
+
 public:
     MCommands( MStatement *pStatement );
 
@@ -61,16 +62,16 @@
     QList<uint>     getParameterMarkers();          /*!< List of index pos into
getNative() where we can find parameter marker ( '?' ). */
     uint            getParameterMarkerCount();      /*!< save some cpu over calling
getParameterMarkers().count()                       */
     QString         getText();                      /*!< Return the string provided to
setText().                                       */
-                                                                                         
                                      
+
     /* doers */
-    void        doClear();                          /*!< Clear commands (reinit
ourself).                                               */
-    MCommand *  doFirst();                          /*!< Makes first MCommand current.
                                                 */
-    MCommand *  doNext();                           /*!< Makes next MCommand current. 
                                                 */
+    void        doClear();                          /*!< Clear commands (reinit
ourself). */
+    MCommand *  doFirst();                          /*!< Makes first MCommand current.
   */
+    MCommand *  doNext();                           /*!< Makes next MCommand current. 
   */
 
     /* isers */                                                                          
                                      
-    BOOL isTransactionPossible();       /*!< Returns true if transaction supported by
all commands.                         */ 
-    BOOL isResultSetPossible();         /*!< Returns true if any of the commands will
create resultset.                     */
-    BOOL isDataModificationPossible();  /*!< Returns true if any of the commands may
modify data.                           */
+    BOOL isTransactionPossible();       /*!< Returns true if transaction supported by
all commands.     */ 
+    BOOL isResultSetPossible();         /*!< Returns true if any of the commands will
create resultset. */
+    BOOL isDataModificationPossible();  /*!< Returns true if any of the commands may
modify data.       */
 
 protected:
     /* getters */
@@ -80,7 +81,6 @@
     MStatement *    getStatement();             /*!< The MStatement which 'owns' us.  
                                             */
     MDiagnostic *   getDiagnostic();            /*!< The MDiagnostic we are going to
use (from connection or statement).            */
 
-
 private:
     uint        nCommandCount;              /*!< Number of commands we have.          
                         */
     MCommand *  pCommandCurrent;            /*!< reference to current MCommand (may be
NULL)                    */
@@ -91,4 +91,3 @@
 
 #endif
 
-

Modified: trunk/SDK/MYSQLPlus/Library/MDescriptorRecord.h
===================================================================
--- trunk/SDK/MYSQLPlus/Library/MDescriptorRecord.h	2007-01-18 23:15:39 UTC (rev 767)
+++ trunk/SDK/MYSQLPlus/Library/MDescriptorRecord.h	2007-01-23 22:50:40 UTC (rev 768)
@@ -6,19 +6,19 @@
 /*!
     \brief  Descriptor records represent different things depending
             upon the type of descriptor;
-    
+
             APD - one record for each buffer bound to a paramter marker
             IPD - one record for each paramter marker
             ARD - one record for each buffer bound to a column
             IRD - one record for each column
-            
+
             This structure reflects *all* fields given in the ODBC 
             specification. However; some fields may be calculated or
             not used when part of a particular descriptor type.
-            
+
             In particular; the read-only fields can, in some cases, be 
             optimized away.
-            
+
             All fields are included for completeness and to help make 
             the code more understandable. Any storage which can be 
             optimized away would be very minimal so please leave all.

Modified: trunk/SDK/MYSQLPlus/Library/MDescriptorRecordIRD.cpp
===================================================================
--- trunk/SDK/MYSQLPlus/Library/MDescriptorRecordIRD.cpp	2007-01-18 23:15:39 UTC (rev 767)
+++ trunk/SDK/MYSQLPlus/Library/MDescriptorRecordIRD.cpp	2007-01-23 22:50:40 UTC (rev 768)
@@ -1,16 +1,5 @@
 #include "MDescriptorRecordIRD.h"
 
-/*!
-    \brief  zzzzz
-    
-            zzzzz
-
-    \param  zzzzz
-
-    \return zzzzz
-
-    \sa     zzzzz
-*/    
 MDescriptorRecordIRD::MDescriptorRecordIRD( MDescriptorIRD *pDescriptor )
     : MDescriptorRecord( pDescriptor )
 {
@@ -85,4 +74,3 @@
     MYODBCDbgReturn( setDefaultSQL( nConciseType ) );
 }
 
-

Modified: trunk/config.pri
===================================================================
--- trunk/config.pri	2007-01-18 23:15:39 UTC (rev 767)
+++ trunk/config.pri	2007-01-23 22:50:40 UTC (rev 768)
@@ -20,7 +20,7 @@
 #       debug | release
 #
 # #########################################################
-CONFIG		+= warn_on release
+CONFIG		+= warn_on debug
 CONFIG		+= thread
 
 

Thread
Connector/ODBC 5 commit: r768 - in trunk: . SDK/MYSQLPlus/Libraryjbalint23 Jan