List:Commits« Previous MessageNext Message »
From:pharvey Date:October 12 2006 5:47am
Subject:Connector/ODBC 5 commit: r598 - in trunk: Driver/Driver/Tests SDK/MYSQLPlus/Library
View as plain text  
Modified:
   trunk/Driver/Driver/Tests/MYODBCDriverTest.c
   trunk/SDK/MYSQLPlus/Library/MConnection.cpp
   trunk/SDK/MYSQLPlus/Library/MDescriptorRecord.cpp
   trunk/SDK/MYSQLPlus/Library/MResult.cpp
   trunk/SDK/MYSQLPlus/Library/MResultPlus.cpp
Log:
ENH: Added more trace output.
FIX: SQLGetTypeInfo properly sets IRD SQL_DESC_UNSIGNED (more details need to be set).
FIX: SQLGetData -> SQL_C_DEFAULT had its -/+ reversed for numeric types (double
negative :( ).  


Modified: trunk/Driver/Driver/Tests/MYODBCDriverTest.c
===================================================================
--- trunk/Driver/Driver/Tests/MYODBCDriverTest.c	2006-10-12 04:36:43 UTC (rev 597)
+++ trunk/Driver/Driver/Tests/MYODBCDriverTest.c	2006-10-12 05:47:30 UTC (rev 598)
@@ -49,7 +49,7 @@
         {"SQLGetTypeInfo", TSTGetTypeInfo},
         {"SQLNumResultCols", TSTNumResultCols},
         {"SQLFetch", TSTFetch},
-/* PAH        {"SQLGetData", TSTGetData}, */
+        {"SQLGetData", TSTGetData},
         {"SQLFreeHandle (stm)", TSTFreeHandleStm},
         {"SQLDisconnect", TSTDisconnect},
         {"SQLFreeHandle (dbc)", TSTFreeHandleDbc},

Modified: trunk/SDK/MYSQLPlus/Library/MConnection.cpp
===================================================================
--- trunk/SDK/MYSQLPlus/Library/MConnection.cpp	2006-10-12 04:36:43 UTC (rev 597)
+++ trunk/SDK/MYSQLPlus/Library/MConnection.cpp	2006-10-12 05:47:30 UTC (rev 598)
@@ -4225,7 +4225,6 @@
         community.
     */
     MYODBCDbgReturn1( SQL_SPEC_STRING );
-    // MYODBCDbgReturn1( "03.51" );
 }
 
 QString MConnection::getInfoDriverVer()
@@ -4750,24 +4749,27 @@
 SQLUSMALLINT MConnection::getInfoOdbcApiConformance()
 {
     MYODBCDbgEnter();
+
+    /*!
+        \internal
+        \note
+
+        MS Access 2000 (possibly other versions) requires a driver to report
+        SQL_OAC_LEVEL1 or better.
+    */
     MYODBCDbgReturn3( "%d", SQL_OAC_LEVEL1 );
 }
 
 SQLUINTEGER  MConnection::getInfoOdbcInterfaceConformance()
 {
     MYODBCDbgEnter();
-
-//    MYODBCDbgReturn3( "%d", SQL_OIC_LEVEL1 );
-
-// PAH - downgrade for testing
-    MYODBCDbgReturn3( "%d", SQL_OAC_NONE /* SQL_OAC_CORE */ );
+    MYODBCDbgReturn3( "%d", SQL_OIC_CORE );
 }
 
 SQLSMALLINT  MConnection::getInfoOdbcSqlConformance()
 {
     MYODBCDbgEnter();
-
-    MYODBCDbgReturn3( "%d", SQL_OAC_NONE /* SQL_OAC_CORE */ );
+    MYODBCDbgReturn3( "%d", SQL_OSC_MINIMUM );
 }
 
 QString MConnection::getInfoOdbcVer()

Modified: trunk/SDK/MYSQLPlus/Library/MDescriptorRecord.cpp
===================================================================
--- trunk/SDK/MYSQLPlus/Library/MDescriptorRecord.cpp	2006-10-12 04:36:43 UTC (rev 597)
+++ trunk/SDK/MYSQLPlus/Library/MDescriptorRecord.cpp	2006-10-12 05:47:30 UTC (rev 598)
@@ -2014,6 +2014,10 @@
 {
     MYODBCDbgEnter();
 
+#if MYODBC_DBG > 1
+    MYODBCDbgInfo( QString( "nConciseType=%1=%2" ).arg( nConciseType ).arg(
MYODBCC::getConciseTypeStringC( nConciseType ) ) );
+#endif
+
     /*
         \internal ODBC Rule
 
@@ -2203,6 +2207,9 @@
 {
     MYODBCDbgEnter();
 
+#if MYODBC_DBG > 1
+    MYODBCDbgInfo( QString( "nConciseType=%1=%2" ).arg( nConciseType ).arg(
MYODBCC::getConciseTypeStringSQL( nConciseType ) ) );
+#endif
     /*
         \internal ODBC Rule
 

Modified: trunk/SDK/MYSQLPlus/Library/MResult.cpp
===================================================================
--- trunk/SDK/MYSQLPlus/Library/MResult.cpp	2006-10-12 04:36:43 UTC (rev 597)
+++ trunk/SDK/MYSQLPlus/Library/MResult.cpp	2006-10-12 05:47:30 UTC (rev 598)
@@ -1680,30 +1680,30 @@
 
         case SQL_TINYINT:
             if ( resultGetData.pImpRowDescRec->getUnsigned() == SQL_TRUE )
+                resultGetData.nTargetTypeAdjusted = SQL_C_UTINYINT;
+            else
                 resultGetData.nTargetTypeAdjusted = SQL_C_STINYINT;
-            else
-                resultGetData.nTargetTypeAdjusted = SQL_C_UTINYINT;
             break;
 
         case SQL_SMALLINT:
             if ( resultGetData.pImpRowDescRec->getUnsigned() == SQL_TRUE )
+                resultGetData.nTargetTypeAdjusted = SQL_C_USHORT;
+            else
                 resultGetData.nTargetTypeAdjusted = SQL_C_SSHORT;
-            else
-                resultGetData.nTargetTypeAdjusted = SQL_C_USHORT;
             break;
 
         case SQL_INTEGER:
             if ( resultGetData.pImpRowDescRec->getUnsigned() == SQL_TRUE )
+                resultGetData.nTargetTypeAdjusted = SQL_C_ULONG;
+            else
                 resultGetData.nTargetTypeAdjusted = SQL_C_SLONG;
-            else
-                resultGetData.nTargetTypeAdjusted = SQL_C_ULONG;
             break;
 
         case SQL_BIGINT:
             if ( resultGetData.pImpRowDescRec->getUnsigned() == SQL_TRUE )
+                resultGetData.nTargetTypeAdjusted = SQL_C_UBIGINT;
+            else
                 resultGetData.nTargetTypeAdjusted = SQL_C_SBIGINT;
-            else
-                resultGetData.nTargetTypeAdjusted = SQL_C_UBIGINT;
             break;
 
         case SQL_REAL:
@@ -2107,7 +2107,7 @@
     }
 
 #if MYODBC_DBG > 1
-    MYODBCDbgInfo( QString( "resultGetData.pImpRowDescRec->getConciseType()=%1=%2"
).arg( resultGetData.pImpRowDescRec->getConciseType() ).arg(
MYODBCC::getConciseTypeStringC( resultGetData.pImpRowDescRec->getConciseType(),
getEnvironment()->getODBCVersion() ) ) );
+    MYODBCDbgInfo( QString( "resultGetData.pImpRowDescRec->getConciseType()=%1=%2"
).arg( resultGetData.pImpRowDescRec->getConciseType() ).arg(
MYODBCC::getConciseTypeStringSQL( resultGetData.pImpRowDescRec->getConciseType(),
getEnvironment()->getODBCVersion() ) ) );
     MYODBCDbgInfo( QString( "resultGetData.nTargetTypeAdjusted=%1=%2" ).arg(
resultGetData.nTargetTypeAdjusted ).arg( MYODBCC::getConciseTypeStringC(
resultGetData.nTargetTypeAdjusted, getEnvironment()->getODBCVersion() ) ) );
 #endif
 

Modified: trunk/SDK/MYSQLPlus/Library/MResultPlus.cpp
===================================================================
--- trunk/SDK/MYSQLPlus/Library/MResultPlus.cpp	2006-10-12 04:36:43 UTC (rev 597)
+++ trunk/SDK/MYSQLPlus/Library/MResultPlus.cpp	2006-10-12 05:47:30 UTC (rev 598)
@@ -866,24 +866,24 @@
 
     pDescriptor = getImpRowDesc();
     pDescriptor->doAppend( SQL_VARCHAR, "TYPE_NAME", SQL_NO_NULLS );
-    pDescriptor->doAppend( SQL_SMALLINT, "DATA_TYPE", SQL_NO_NULLS );
-    pDescriptor->doAppend( SQL_INTEGER, "COLUMN_SIZE" );
+    pDescriptor->doAppend( SQL_SMALLINT, "DATA_TYPE", SQL_NO_NULLS, SQL_FALSE );
+    pDescriptor->doAppend( SQL_INTEGER, "COLUMN_SIZE", SQL_NULLABLE, SQL_FALSE );
     pDescriptor->doAppend( SQL_VARCHAR, "LITERAL_PREFIX" );
     pDescriptor->doAppend( SQL_VARCHAR, "LITERAL_SUFFIX" );
     pDescriptor->doAppend( SQL_VARCHAR, "CREATE_PARAMS" );
-    pDescriptor->doAppend( SQL_SMALLINT, "NULLABLE", SQL_NO_NULLS );
-    pDescriptor->doAppend( SQL_SMALLINT, "CASE_SENSITIVE", SQL_NO_NULLS );
-    pDescriptor->doAppend( SQL_SMALLINT, "SEARCHABLE", SQL_NO_NULLS );
-    pDescriptor->doAppend( SQL_SMALLINT, "UNSIGNED_ATTRIBUTE" );
-    pDescriptor->doAppend( SQL_SMALLINT, "FIXED_PREC_SCALE" );
-    pDescriptor->doAppend( SQL_SMALLINT, "AUTO_UNIQUE_VALUE", SQL_NO_NULLS );
+    pDescriptor->doAppend( SQL_SMALLINT, "NULLABLE", SQL_NO_NULLS, SQL_FALSE );
+    pDescriptor->doAppend( SQL_SMALLINT, "CASE_SENSITIVE", SQL_NO_NULLS, SQL_FALSE );
+    pDescriptor->doAppend( SQL_SMALLINT, "SEARCHABLE", SQL_NO_NULLS, SQL_FALSE );
+    pDescriptor->doAppend( SQL_SMALLINT, "UNSIGNED_ATTRIBUTE", SQL_NULLABLE, SQL_FALSE
);
+    pDescriptor->doAppend( SQL_SMALLINT, "FIXED_PREC_SCALE", SQL_NULLABLE, SQL_FALSE
);
+    pDescriptor->doAppend( SQL_SMALLINT, "AUTO_UNIQUE_VALUE", SQL_NO_NULLS, SQL_FALSE
);
     pDescriptor->doAppend( SQL_VARCHAR, "LOCAL_TYPE_NAME" );
-    pDescriptor->doAppend( SQL_SMALLINT, "MINIMUM_SCALE" );
-    pDescriptor->doAppend( SQL_SMALLINT, "MAXIMUM_SCALE" );
-    pDescriptor->doAppend( SQL_SMALLINT, "SQL_DATA_TYPE", SQL_NO_NULLS );
-    pDescriptor->doAppend( SQL_SMALLINT, "SQL_DATETIME_SUB" );
-    pDescriptor->doAppend( SQL_INTEGER, "NUM_PREC_RADIX" );
-    pDescriptor->doAppend( SQL_SMALLINT, "INTERVAL_PRECISION" );
+    pDescriptor->doAppend( SQL_SMALLINT, "MINIMUM_SCALE", SQL_NULLABLE, SQL_FALSE );
+    pDescriptor->doAppend( SQL_SMALLINT, "MAXIMUM_SCALE", SQL_NULLABLE, SQL_FALSE );
+    pDescriptor->doAppend( SQL_SMALLINT, "SQL_DATA_TYPE", SQL_NO_NULLS, SQL_FALSE );
+    pDescriptor->doAppend( SQL_SMALLINT, "SQL_DATETIME_SUB", SQL_NULLABLE, SQL_FALSE
);
+    pDescriptor->doAppend( SQL_INTEGER, "NUM_PREC_RADIX", SQL_NULLABLE, SQL_FALSE );
+    pDescriptor->doAppend( SQL_SMALLINT, "INTERVAL_PRECISION", SQL_NULLABLE, SQL_FALSE
);
 
     /* rows */
     /* append rows to result */

Thread
Connector/ODBC 5 commit: r598 - in trunk: Driver/Driver/Tests SDK/MYSQLPlus/Librarypharvey12 Oct