Modified:
trunk/MYSQLPlus/MYSQLPlusLib/MCommand.cpp
trunk/MYSQLPlus/MYSQLPlusLib/MCommand.h
trunk/MYSQLPlus/MYSQLPlusLib/MCommands.cpp
trunk/MYSQLPlus/MYSQLPlusLib/MCommands.h
trunk/MYSQLPlus/MYSQLPlusLib/MConnection.cpp
trunk/MYSQLPlus/MYSQLPlusLib/MResultRes.h
Log:
Modified: trunk/MYSQLPlus/MYSQLPlusLib/MCommand.cpp
===================================================================
--- trunk/MYSQLPlus/MYSQLPlusLib/MCommand.cpp 2006-07-14 06:31:47 UTC (rev 442)
+++ trunk/MYSQLPlus/MYSQLPlusLib/MCommand.cpp 2006-07-16 18:59:26 UTC (rev 443)
@@ -7,6 +7,7 @@
*/
#include "MCommand.h"
+#include "MInternal.h"
MCommand::MCommand( MConnection *pConnection )
{
Modified: trunk/MYSQLPlus/MYSQLPlusLib/MCommand.h
===================================================================
--- trunk/MYSQLPlus/MYSQLPlusLib/MCommand.h 2006-07-14 06:31:47 UTC (rev 442)
+++ trunk/MYSQLPlus/MYSQLPlusLib/MCommand.h 2006-07-16 18:59:26 UTC (rev 443)
@@ -9,8 +9,16 @@
#ifndef MCOMMAND_H
#define MCOMMAND_H
-#include "MInternal.h"
+#include <MYODBCC.h>
+#include <QList>
+#include <QString>
+
+class MConnection;
+class MStatement;
+class MDiagnostic;
+
+
/*!
\brief A single command (usually a SQL DDL/DML statement) to be sent to the server.
@@ -57,7 +65,7 @@
SQLRETURN setCommand( const QString &stringCommand ); // this can include ODBC
and/or server specific syntax
/* getters */
- QString getCommand(); // simply returns the Text provided to
setText()
+ QString getCommand(); // simply returns the Text provided to
setCommand()
QString getCommandNative(); // version of text which has any ODBC
specifics switched to server friendly syntax
QList<int> getParameterMarkers(); // list of index pos into native
command string where we can find parameter marker ( '?' )
COMMAND_TYPE getCommandType(); // general type of the command as
indicated by first keyword
Modified: trunk/MYSQLPlus/MYSQLPlusLib/MCommands.cpp
===================================================================
--- trunk/MYSQLPlus/MYSQLPlusLib/MCommands.cpp 2006-07-14 06:31:47 UTC (rev 442)
+++ trunk/MYSQLPlus/MYSQLPlusLib/MCommands.cpp 2006-07-16 18:59:26 UTC (rev 443)
@@ -7,6 +7,7 @@
*/
#include "MCommands.h"
+#include "MInternal.h"
MCommands::MCommands( MConnection *pConnection )
{
Modified: trunk/MYSQLPlus/MYSQLPlusLib/MCommands.h
===================================================================
--- trunk/MYSQLPlus/MYSQLPlusLib/MCommands.h 2006-07-14 06:31:47 UTC (rev 442)
+++ trunk/MYSQLPlus/MYSQLPlusLib/MCommands.h 2006-07-16 18:59:26 UTC (rev 443)
@@ -9,8 +9,17 @@
#ifndef MCOMMANDS_H
#define MCOMMANDS_H
-#include "MInternal.h"
+#include <MYODBCC.h>
+#include <QList>
+#include <QString>
+
+class MConnection;
+class MStatement;
+class MDiagnostic;
+
+#include "MCommand.h"
+
/*!
\brief List of commands (usually SQL DDL/DML statements) to be sent to the server.
Modified: trunk/MYSQLPlus/MYSQLPlusLib/MConnection.cpp
===================================================================
--- trunk/MYSQLPlus/MYSQLPlusLib/MConnection.cpp 2006-07-14 06:31:47 UTC (rev 442)
+++ trunk/MYSQLPlus/MYSQLPlusLib/MConnection.cpp 2006-07-16 18:59:26 UTC (rev 443)
@@ -1277,15 +1277,6 @@
{
MYODBCDbgEnter();
- /*!
- \internal ODBC RULE
-
- It is possible for a connection to be in state C6 with no statements allocated on
the
- connection. For example, suppose the connection is in manual commit mode and is
in
- state C4. If a statement is allocated, executed (starting a transaction), and
then
- freed, the transaction remains active but there are no statements on the
connection.
- */
-
/* Its possible our state has changed but we do not know it yet so... */
if ( nState == STATE_C4 )
{
@@ -1298,6 +1289,23 @@
setState( STATE_C4 );
}
+ /*!
+ \internal ODBC RULE
+
+ It is possible for a connection to be in state C6 with no statements allocated on
the
+ connection. For example, suppose the connection is in manual commit mode and is
in
+ state C4. If a statement is allocated, executed (starting a transaction), and
then
+ freed, the transaction remains active but there are no statements on the
connection.
+ */
+ /*!
+ \internal MYODBC RULE
+ \todo
+
+ What the server tells us about a transaction has precedence over what we may
think?
+
+ \sa SERVER_STATUS_IN_TRANS
+ */
+
MYODBCDbgReturn3( "%d", nState );
}
@@ -4880,7 +4888,7 @@
state; the application can reuse them for subsequent SQL requests or can call
SQLFreeStmt or
SQLFreeHandle with a HandleType of SQL_HANDLE_STMT to deallocate them.
*/
- if ( nCompletionType == SQL_COMMIT && getInfoCursorCommitBehavior() ==
SQL_CB_DELETE )
+ if ( getInfoCursorCommitBehavior() == SQL_CB_DELETE )
{
QList<QObject*> listObjects;
QListIterator<QObject*> i( (QList<QObject*>)children() );
@@ -4904,7 +4912,7 @@
present in a prepared state; the application can call SQLExecute for a statement
associated with the
connection without first calling SQLPrepare.
*/
- if ( nCompletionType == SQL_COMMIT && getInfoCursorCommitBehavior() ==
SQL_CB_CLOSE )
+ if ( getInfoCursorCommitBehavior() == SQL_CB_CLOSE )
{
QList<QObject*> listObjects;
QListIterator<QObject*> i( (QList<QObject*>)children() );
@@ -4930,7 +4938,7 @@
does not affect open cursors associated with the connection. Cursors remain at
the row they pointed to
prior to the call to SQLEndTran.
*/
- if ( nCompletionType == SQL_COMMIT && getInfoCursorCommitBehavior() ==
SQL_CB_PRESERVE )
+ if ( getInfoCursorCommitBehavior() == SQL_CB_PRESERVE )
{
/* do nothing special */
}
Modified: trunk/MYSQLPlus/MYSQLPlusLib/MResultRes.h
===================================================================
--- trunk/MYSQLPlus/MYSQLPlusLib/MResultRes.h 2006-07-14 06:31:47 UTC (rev 442)
+++ trunk/MYSQLPlus/MYSQLPlusLib/MResultRes.h 2006-07-16 18:59:26 UTC (rev 443)
@@ -1,7 +1,7 @@
#ifndef MRESULTRES_H
#define MRESULTRES_H
-#include "MCommand.H"
+#include "MCommand.h"
#include "MInternal.h"
/*!
| Thread |
|---|
| • Connector/ODBC 5 commit: r443 - trunk/MYSQLPlus/MYSQLPlusLib | pharvey | 16 Jul |