You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(11) |
Oct
(17) |
Nov
(62) |
Dec
(1) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(25) |
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
(9) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: David F. <dav...@us...> - 2005-11-09 15:53:16
|
Update of /cvsroot/myoledb/myoledb3 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14014 Modified Files: mysql.cpp Log Message: row offset needs to be calculated based on parameter set we are on (otherwise we try reinsert them 2nd parameter set repeatedly) Index: mysql.cpp =================================================================== RCS file: /cvsroot/myoledb/myoledb3/mysql.cpp,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- mysql.cpp 9 Nov 2005 15:48:31 -0000 1.28 +++ mysql.cpp 9 Nov 2005 15:53:08 -0000 1.29 @@ -1833,7 +1833,6 @@ void* pSrc = dwPart & DBPART_VALUE ? ((BYTE*) pData + pBinding[nBinding].obValue) : NULL; ULONG* pulSrcLength = dwPart & DBPART_LENGTH ? (ULONG *) ((BYTE*) pData + pBinding[nBinding].obLength) : NULL; DWORD* pdwSrcStatus = dwPart & DBPART_STATUS ? (ULONG *) ((BYTE*) pData + pBinding[nBinding].obStatus) : NULL; - DWORD dwSrcStatus = pdwSrcStatus ? (*pdwSrcStatus) : 0; mysql_bindings[nBinding].buffer = pSrc; mysql_bindings[nBinding].buffer_length = pBinding[nBinding].cbMaxLen; @@ -1939,13 +1938,13 @@ // See accessor.cpp, CreateAccessor's cbRowSize is what we need for (int i = 1;i < cParamSets;i++) { + ULONG cbRowOffset = cbRowSize * i; for (int nBinding = 0;nBinding < cBindings;nBinding++) { DWORD dwPart = pBinding[nBinding].dwPart; - void* pSrc = dwPart & DBPART_VALUE ? ((BYTE*) pData + pBinding[nBinding].obValue + cbRowSize) : NULL; - ULONG* pulSrcLength = dwPart & DBPART_LENGTH ? (ULONG *) ((BYTE*) pData + pBinding[nBinding].obLength + cbRowSize) : NULL; - DWORD* pdwSrcStatus = dwPart & DBPART_STATUS ? (ULONG *) ((BYTE*) pData + pBinding[nBinding].obStatus + cbRowSize) : NULL; - DWORD dwSrcStatus = pdwSrcStatus ? (*pdwSrcStatus) : 0; + void* pSrc = dwPart & DBPART_VALUE ? ((BYTE*) pData + pBinding[nBinding].obValue + cbRowOffset) : NULL; + ULONG* pulSrcLength = dwPart & DBPART_LENGTH ? (ULONG *) ((BYTE*) pData + pBinding[nBinding].obLength + cbRowOffset) : NULL; + DWORD* pdwSrcStatus = dwPart & DBPART_STATUS ? (ULONG *) ((BYTE*) pData + pBinding[nBinding].obStatus + cbRowOffset) : NULL; mysql_bindings[nBinding].buffer = pSrc; mysql_bindings[nBinding].buffer_length = pBinding[nBinding].cbMaxLen; mysql_bindings[nBinding].length = pulSrcLength; |
From: David F. <dav...@us...> - 2005-11-09 15:48:47
|
Update of /cvsroot/myoledb/myoledb3 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13052 Modified Files: accessor.cpp command.cpp myprov.h mysql.cpp mysql.h Log Message: add support for multiple parameter sets for this we need somewhere to store the rowsize in the accessor, and to pass it into Init calculate length and status offsets properly (this code being as similar to normal binds as possible...) also fixed up TRACE statements for critical sections so they are numbered correctly for their parameters Index: myprov.h =================================================================== RCS file: /cvsroot/myoledb/myoledb3/myprov.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- myprov.h 27 Oct 2005 08:13:21 -0000 1.2 +++ myprov.h 9 Nov 2005 15:48:31 -0000 1.3 @@ -125,6 +125,7 @@ LONG cRef; ULONG cBindings; bool bNullAccessor; + ULONG cbRowSize; DBBINDING rgBindings[1]; } ACCESSOR, *PACCESSOR; Index: mysql.h =================================================================== RCS file: /cvsroot/myoledb/myoledb3/mysql.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- mysql.h 1 Nov 2005 14:37:10 -0000 1.4 +++ mysql.h 9 Nov 2005 15:48:31 -0000 1.5 @@ -84,7 +84,7 @@ ~CMySql(); //Initialize object and execute query - HRESULT Init(CDataSource* pDataSrc, LPCOLESTR pszCat, LPCSTR szSQL, DWORD* pdwAffectedRows, ULONG cBindings=0, DBBINDING *pBinding=NULL, void *pData=NULL, int cParamSets=0); + HRESULT Init(CDataSource* pDataSrc, LPCOLESTR pszCat, LPCSTR szSQL, DWORD* pdwAffectedRows, ULONG cBindings=0, DBBINDING *pBinding=NULL, void *pData=NULL, int cParamSets=0, ULONG cbRowSize=0); protected: //@cmember Converts position to bookmark Index: mysql.cpp =================================================================== RCS file: /cvsroot/myoledb/myoledb3/mysql.cpp,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- mysql.cpp 9 Nov 2005 12:15:24 -0000 1.27 +++ mysql.cpp 9 Nov 2005 15:48:31 -0000 1.28 @@ -38,15 +38,15 @@ #define ROW_WHERE 0 #define ROW_INSERT 0 -#define ENTER_CRIT_SECT() TRACE2("*** waiting for critical section line %d on SQL statement %x ***", __LINE__, m_hstmt); \ +#define ENTER_CRIT_SECT() TRACE3("*** waiting for critical section line %d on SQL statement %x ***", __LINE__, m_hstmt); \ EnterCriticalSection(&(pDataSource->database_critsect)); \ - TRACE2("*** entered critical section line %d on SQL statement %x ***", __LINE__, m_hstmt); -#define LEAVE_CRIT_SECT() TRACE2("*** leaving critical section line %d on SQL statement %x ***", __LINE__, m_hstmt); \ + TRACE3("*** entered critical section line %d on SQL statement %x ***", __LINE__, m_hstmt); +#define LEAVE_CRIT_SECT() TRACE3("*** leaving critical section line %d on SQL statement %x ***", __LINE__, m_hstmt); \ LeaveCriticalSection(&(pDataSource->database_critsect)); -#define ENTER_CRIT_SECT_SQL() TRACE3("*** waiting for critical section line %d on SQL statement %x *** %s", __LINE__, m_hstmt, lpszSQL); \ +#define ENTER_CRIT_SECT_SQL() TRACE4("*** waiting for critical section line %d on SQL statement %x *** %s", __LINE__, m_hstmt, lpszSQL); \ EnterCriticalSection(&(pDataSource->database_critsect)); \ - TRACE3("*** entered critical section line %d on SQL statement %x *** %s", __LINE__, m_hstmt, lpszSQL); -#define LEAVE_CRIT_SECT_SQL() TRACE3("*** leaving critical section line %d on SQL statement %x *** %s", __LINE__, m_hstmt, lpszSQL); \ + TRACE4("*** entered critical section line %d on SQL statement %x *** %s", __LINE__, m_hstmt, lpszSQL); +#define LEAVE_CRIT_SECT_SQL() TRACE4("*** leaving critical section line %d on SQL statement %x *** %s", __LINE__, m_hstmt, lpszSQL); \ LeaveCriticalSection(&(pDataSource->database_critsect)); DBTYPE GetOledbTypeFromName(LPOLESTR wszName, BOOL* pbIsMySqlBlob ) @@ -1758,7 +1758,8 @@ ULONG cBindings, //@parm IN | number of bindings DBBINDING* pBinding, //@parm IN | actual bindings void* pData, //@parm IN | data for the bindings - int cParamSets //@parm IN | number of parameter sets + int cParamSets, //@parm IN | number of parameter sets + ULONG cbRowSize //@parm IN | offset between parameter sets ) { HRESULT hr = S_OK; @@ -1935,12 +1936,25 @@ if (cBindings && cParamSets > 1) { - // FIXME: these bindings need to be updated properly, including lengths and statuses - int BufferJump = pBinding[1].obValue - pBinding[0].obValue; + // See accessor.cpp, CreateAccessor's cbRowSize is what we need for (int i = 1;i < cParamSets;i++) { for (int nBinding = 0;nBinding < cBindings;nBinding++) - mysql_bindings[nBinding].buffer = (void *) ((unsigned long)mysql_bindings[nBinding].buffer + BufferJump); + { + DWORD dwPart = pBinding[nBinding].dwPart; + void* pSrc = dwPart & DBPART_VALUE ? ((BYTE*) pData + pBinding[nBinding].obValue + cbRowSize) : NULL; + ULONG* pulSrcLength = dwPart & DBPART_LENGTH ? (ULONG *) ((BYTE*) pData + pBinding[nBinding].obLength + cbRowSize) : NULL; + DWORD* pdwSrcStatus = dwPart & DBPART_STATUS ? (ULONG *) ((BYTE*) pData + pBinding[nBinding].obStatus + cbRowSize) : NULL; + DWORD dwSrcStatus = pdwSrcStatus ? (*pdwSrcStatus) : 0; + mysql_bindings[nBinding].buffer = pSrc; + mysql_bindings[nBinding].buffer_length = pBinding[nBinding].cbMaxLen; + mysql_bindings[nBinding].length = pulSrcLength; + if (pdwSrcStatus) + { + mysql_bindings[nBinding].is_null = &(mysql_bindings[nBinding].is_null_value); + mysql_bindings[nBinding].is_null_value = (*pdwSrcStatus == DBSTATUS_S_ISNULL) ? true : false; + } + } ENTER_CRIT_SECT_SQL(); if (mysql_stmt_bind_param(m_hstmt, mysql_bindings)) { Index: accessor.cpp =================================================================== RCS file: /cvsroot/myoledb/myoledb3/accessor.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- accessor.cpp 21 Sep 2005 08:25:25 -0000 1.2 +++ accessor.cpp 9 Nov 2005 15:48:31 -0000 1.3 @@ -402,6 +402,7 @@ pAccessor->cBindings = cBindings; pAccessor->bNullAccessor = bNullAccessor; pAccessor->cRef = 1; // Establish Reference count. + pAccessor->cbRowSize = cbRowSize; memcpy( &(pAccessor->rgBindings[0]), &pBindings[0], cBindings*sizeof( DBBINDING )); // fill out-param and return Index: command.cpp =================================================================== RCS file: /cvsroot/myoledb/myoledb3/command.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- command.cpp 3 Nov 2005 18:05:37 -0000 1.3 +++ command.cpp 9 Nov 2005 15:48:31 -0000 1.4 @@ -974,6 +974,7 @@ PACCESSOR pAccessor; ULONG cBindings = 0; DBBINDING *pBinding = NULL; + ULONG cbRowSize = 0; void* ptData = pParams ? pParams->pData : NULL; int cParamSets = pParams ? pParams->cParamSets : 0; if (pParams) @@ -985,9 +986,10 @@ assert( pAccessor ); cBindings = pAccessor->cBindings; pBinding = pAccessor->rgBindings; + cbRowSize = pAccessor->cbRowSize; } - hr = pMySql->Init( m_pObj->m_pDBSession->m_pCDataSource, NULL, pszSQL, &dwAffectedRows, cBindings, pBinding, ptData, cParamSets ); + hr = pMySql->Init( m_pObj->m_pDBSession->m_pCDataSource, NULL, pszSQL, &dwAffectedRows, cBindings, pBinding, ptData, cParamSets, cbRowSize ); pData = pMySql; wAdvancedInterfaces = ROWSET_FIND | ROWSET_SCROLL | ROWSET_CHANGE; } |
From: David F. <dav...@us...> - 2005-11-09 15:26:09
|
Update of /cvsroot/myoledb/myoledb3 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8609 Modified Files: asserts.cpp Log Message: only compile the asserts code in debug builds comment out HARD_TRACE by default as this tracing to a file isn't threadsafe and causes errors Index: asserts.cpp =================================================================== RCS file: /cvsroot/myoledb/myoledb3/asserts.cpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- asserts.cpp 20 Sep 2005 14:44:32 -0000 1.1.1.1 +++ asserts.cpp 9 Nov 2005 15:26:02 -0000 1.2 @@ -21,8 +21,8 @@ #include <time.h> #include "asserts.h" -//#ifdef DEBUG // only compile for debug! -#define HARD_TRACE "c:\\SWSTPROV_DEBUG.TXT" +#ifdef DEBUG // only compile for debug! +// #define HARD_TRACE "myoledb-debug.log" #ifdef HARD_TRACE @@ -134,5 +134,5 @@ abort(); // Raises SIGABRT } } -//#endif +#endif |
From: David F. <dav...@us...> - 2005-11-09 12:15:39
|
Update of /cvsroot/myoledb/myoledb3 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26568 Modified Files: mysql.cpp Log Message: iHint won't ever be SQL_NO_TOTAL though uiLength might. need to clear up on SQL_NO_TOTAL but the logic was wrong this meant once a hint was set to null it remained so forever... Index: mysql.cpp =================================================================== RCS file: /cvsroot/myoledb/myoledb3/mysql.cpp,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- mysql.cpp 8 Nov 2005 20:40:22 -0000 1.26 +++ mysql.cpp 9 Nov 2005 12:15:24 -0000 1.27 @@ -910,8 +910,8 @@ } // TODO: check what SQL_NO_TOTAL means (won't be in iHint...) - if( iHint == SQL_NO_TOTAL ) - iHint = m_pColumnInfo[dwColumn].uiLength; + // if( iHint == SQL_NO_TOTAL ) + iHint = m_pColumnInfo[dwColumn].uiLength; // Correct some data types switch( m_pColumnInfo[dwColumn].wOleDbType ) |
From: David F. <dav...@us...> - 2005-11-09 10:26:30
|
Update of /cvsroot/myoledb/myoledb3 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32276 Added Files: changeversion.py Log Message: added python utility to automatically change version number using sed --- NEW FILE: changeversion.py --- #!/usr/bin/env python import sys import re import os if len(sys.argv) != 2: print "need to supply version as first argument" sys.exit() version = sys.argv[1] versionparts = [int(part) for part in version.split(".")] versionparts2 = list(versionparts)[:2] + [0] * (2 - len(versionparts)) versionparts2dot = ".".join([str(part) for part in versionparts2]) versionparts4 = list(versionparts)[:4] + [0] * (4 - len(versionparts)) versionparts4dot = ".".join([str(part) for part in versionparts4]) versionparts4comma = ",".join([str(part) for part in versionparts4]) win32version = "%02d.%02d.%02d%02d" % tuple(versionparts4) win32commaversion = "%02d,%02d,%02d%02d" % tuple(versionparts4) print "altering version numbers" print version print versionparts print versionparts4 print versionparts4dot print versionparts4comma print win32version print win32commaversion def dosubst(search, replace, filenames): os.system("sed -i 's/%s/%s/' %s" % (search, replace, filenames)) dosubst(r'^\(version=\).*$', r'\1%s' % version, 'Makefile') dosubst(r'\(\<Version=\)"[^"]*"', r'\1"%s"' % versionparts4dot, 'myoledb-debug.wxs myoledb.wxs') dosubst(r'\(\(FILE\|PRODUCT\)VERSION\) .*$', r'\1 %s' % versionparts4comma, 'myprov.rc') dosubst(r'\(VALUE "\(File\|Product\)Version",\) ".*"$', r'\1 "%s\\0"' % win32version, 'myprov.rc') dosubst(r'\(#define VER_\(FILE\|PRODUCT\)VERSION\) *[0-9,]*$', r'\1 %s' % win32commaversion, 'myver.h') dosubst(r'\(#define VER_\(FILE\|PRODUCT\)VERSION_STR\) *".*"', r'\1 "%s\\0"' % win32version, 'myver.h') # this handles the MySqlProv OLE DB Provider version dosubst(r'\(MySqlProv\)[.][0-9]*[.][0-9]*', r'\1.%s' % versionparts2dot, 'classfac.cpp myoledb.wxs myoledb-debug.wxs') |
From: David F. <dav...@us...> - 2005-11-09 10:22:29
|
Update of /cvsroot/myoledb/myoledb3 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31499 Modified Files: Makefile myoledb-debug.wxs myoledb.wxs myprov.rc myver.h Log Message: version 3.9.2, using slightly different version numbering format for win32 strings this is now done by a python program that calls sed, that I'll commit shortly Index: myver.h =================================================================== RCS file: /cvsroot/myoledb/myoledb3/myver.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- myver.h 4 Nov 2005 16:49:20 -0000 1.3 +++ myver.h 9 Nov 2005 10:22:21 -0000 1.4 @@ -19,10 +19,10 @@ #ifndef _AXVER_H_ #define _AXVER_H_ -#define VER_FILEVERSION 03,90,0001 -#define VER_FILEVERSION_STR "03.90.0001\0" -#define VER_PRODUCTVERSION 03,90,0001 -#define VER_PRODUCTVERSION_STR "03.90.0001\0" +#define VER_FILEVERSION 03,09,0200 +#define VER_FILEVERSION_STR "03.09.0200\0" +#define VER_PRODUCTVERSION 03,09,0200 +#define VER_PRODUCTVERSION_STR "03.09.0200\0" #define VER_LFILEVERSION_STR L"03.90" #define VER_FILEFLAGSMASK (VS_FF_DEBUG | VS_FF_PRERELEASE) Index: myoledb-debug.wxs =================================================================== RCS file: /cvsroot/myoledb/myoledb3/myoledb-debug.wxs,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- myoledb-debug.wxs 4 Nov 2005 16:49:20 -0000 1.2 +++ myoledb-debug.wxs 9 Nov 2005 10:22:21 -0000 1.3 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <Wix xmlns="http://schemas.microsoft.com/wix/2003/01/wi"> - <Product Id="E170C29B-5F08-4759-8538-2B685F7CFC39" Name="MyOleDB" Language="1033" Version="3.9.1.0" Manufacturer="St. James Software"> + <Product Id="E170C29B-5F08-4759-8538-2B685F7CFC39" Name="MyOleDB" Language="1033" Version="3.9.2.0" Manufacturer="St. James Software"> <Package Id="????????-????-????-????-????????????" Description="MyOleDB Installer" Comments="An OleDB driver for MySQL (debug version)" Manufacturer="St. James Software" InstallerVersion="200" Compressed="yes"/> Index: myprov.rc =================================================================== RCS file: /cvsroot/myoledb/myoledb3/myprov.rc,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- myprov.rc 4 Nov 2005 16:49:20 -0000 1.4 +++ myprov.rc 9 Nov 2005 10:22:21 -0000 1.5 @@ -32,8 +32,8 @@ // VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,9,1,0 - PRODUCTVERSION 3,9,1,0 + FILEVERSION 3,9,2,0 + PRODUCTVERSION 3,9,2,0 FILEFLAGSMASK 0x3L #ifdef _DEBUG FILEFLAGS 0x1L @@ -51,14 +51,14 @@ VALUE "Comments", "\0" VALUE "CompanyName", "Standard&Western Software\0" VALUE "FileDescription", "MyOLEDB Provider \0" - VALUE "FileVersion", "03.90.0001\0" + VALUE "FileVersion", "03.09.0200\0" VALUE "InternalName", "MYSQLPROV\0" VALUE "LegalCopyright", "Copyright © SWsoft 1998-2000\0" VALUE "LegalTrademarks", "Windows(TM) is a trademark of Microsoft Corporation. Microsoft® is a registered trademark of Microsoft Corporation.\0" VALUE "OriginalFilename", "MYPROV.DLL\0" VALUE "PrivateBuild", "\0" VALUE "ProductName", "OLE DB Provider for MySQL\0" - VALUE "ProductVersion", "03.90.0001\0" + VALUE "ProductVersion", "03.09.0200\0" VALUE "SpecialBuild", "\0" END END Index: Makefile =================================================================== RCS file: /cvsroot/myoledb/myoledb3/Makefile,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- Makefile 9 Nov 2005 10:04:10 -0000 1.4 +++ Makefile 9 Nov 2005 10:22:21 -0000 1.5 @@ -2,7 +2,7 @@ wixdir="c:/DevTools/wix/" mysqllibdir="e:/sjsoft/code/mysql-libraries/mysql-5.0.15-win" -version=3.9.1 +version=3.9.2 MAKEFLAGS= # work out the sourcefiles from the Visual C++ Makefile Index: myoledb.wxs =================================================================== RCS file: /cvsroot/myoledb/myoledb3/myoledb.wxs,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- myoledb.wxs 8 Nov 2005 13:27:26 -0000 1.8 +++ myoledb.wxs 9 Nov 2005 10:22:21 -0000 1.9 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <Wix xmlns="http://schemas.microsoft.com/wix/2003/01/wi"> - <Product Id="E170C29B-5F08-4759-8538-2B685F7CFC39" UpgradeCode="09A01F85-AC55-41E4-80DE-293C35AF7796" Name="MyOleDB" Language="1033" Version="3.9.1.0" Manufacturer="St. James Software"> + <Product Id="E170C29B-5F08-4759-8538-2B685F7CFC39" UpgradeCode="09A01F85-AC55-41E4-80DE-293C35AF7796" Name="MyOleDB" Language="1033" Version="3.9.2.0" Manufacturer="St. James Software"> <Package Id="????????-????-????-????-????????????" Description="MyOleDB Installer" Comments="An OleDB driver for MySQL" Manufacturer="St. James Software" InstallerVersion="200" Compressed="yes"/> |
From: David F. <dav...@us...> - 2005-11-09 10:04:18
|
Update of /cvsroot/myoledb/myoledb3 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27675 Modified Files: Makefile Log Message: added helpers to register the debug or release version of the dll Index: Makefile =================================================================== RCS file: /cvsroot/myoledb/myoledb3/Makefile,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- Makefile 4 Nov 2005 16:49:20 -0000 1.3 +++ Makefile 9 Nov 2005 10:04:10 -0000 1.4 @@ -20,6 +20,12 @@ release: Release/MyProv.dll +registerdebug: Debug/MyProv.dll + regsvr32 -s $^ + +registerrelease: Release/MyProv.dll + regsvr32 -s $^ + clean: rm myoledb-${version}.msi myoledb-${version}-debug.msi Debug/MyProv.dll Release/MyProv.dll myoledb.wixobj $(DEBUG_OBJS) $(RELEASE_OBJS) |
From: David F. <dav...@us...> - 2005-11-08 20:40:30
|
Update of /cvsroot/myoledb/myoledb3 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26377 Modified Files: mysql.cpp Log Message: defined macros to make doing critical sections easier, and provide loads of debug information added critical sections around every function which uses m_hstmt as these all potentially communicate with the server Index: mysql.cpp =================================================================== RCS file: /cvsroot/myoledb/myoledb3/mysql.cpp,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- mysql.cpp 8 Nov 2005 14:46:36 -0000 1.25 +++ mysql.cpp 8 Nov 2005 20:40:22 -0000 1.26 @@ -38,6 +38,16 @@ #define ROW_WHERE 0 #define ROW_INSERT 0 +#define ENTER_CRIT_SECT() TRACE2("*** waiting for critical section line %d on SQL statement %x ***", __LINE__, m_hstmt); \ + EnterCriticalSection(&(pDataSource->database_critsect)); \ + TRACE2("*** entered critical section line %d on SQL statement %x ***", __LINE__, m_hstmt); +#define LEAVE_CRIT_SECT() TRACE2("*** leaving critical section line %d on SQL statement %x ***", __LINE__, m_hstmt); \ + LeaveCriticalSection(&(pDataSource->database_critsect)); +#define ENTER_CRIT_SECT_SQL() TRACE3("*** waiting for critical section line %d on SQL statement %x *** %s", __LINE__, m_hstmt, lpszSQL); \ + EnterCriticalSection(&(pDataSource->database_critsect)); \ + TRACE3("*** entered critical section line %d on SQL statement %x *** %s", __LINE__, m_hstmt, lpszSQL); +#define LEAVE_CRIT_SECT_SQL() TRACE3("*** leaving critical section line %d on SQL statement %x *** %s", __LINE__, m_hstmt, lpszSQL); \ + LeaveCriticalSection(&(pDataSource->database_critsect)); DBTYPE GetOledbTypeFromName(LPOLESTR wszName, BOOL* pbIsMySqlBlob ) { @@ -422,7 +432,10 @@ delete [] stmt_results; return E_FAIL; } } - if (!SUCCEEDED(mysql_stmt_bind_result(m_hstmt, stmt_results))) + ENTER_CRIT_SECT(); + HRESULT hr = mysql_stmt_bind_result(m_hstmt, stmt_results); + LEAVE_CRIT_SECT(); + if (!SUCCEEDED(hr)) { delete [] stmt_results; return E_FAIL; @@ -468,8 +481,10 @@ // What is dwFetchSince meant to be? Seems from above, if nRows is > 0 it's the next row // and if it's <0 it's an actual absolute position + ENTER_CRIT_SECT(); mysql_stmt_data_seek(m_hstmt, dwFetchSince); int ret = mysql_stmt_fetch( m_hstmt); + LEAVE_CRIT_SECT(); if ( SUCCEEDED( ret ) && ret != MYSQL_NO_DATA ) NumRows = 1; if( SUCCEEDED( ret ) || ret == MYSQL_NO_DATA ) @@ -516,9 +531,11 @@ // Effect of Fetch: Returns the first row in the rowset + ENTER_CRIT_SECT(); mysql_stmt_data_seek(m_hstmt, 0); int ret = mysql_stmt_fetch( m_hstmt); + LEAVE_CRIT_SECT(); if( ret == MYSQL_NO_DATA) return m_hrLastMoveInfo = DB_S_ENDOFROWSET; @@ -549,8 +566,10 @@ // Effect of Fetch: Return the last row in the rowset + ENTER_CRIT_SECT(); mysql_stmt_data_seek(m_hstmt, mysql_stmt_num_rows(m_hstmt)-1); int ret = mysql_stmt_fetch( m_hstmt); + LEAVE_CRIT_SECT(); if( ret == MYSQL_NO_DATA ) return m_hrLastMoveInfo = DB_S_ENDOFROWSET; @@ -586,8 +605,10 @@ // Effect of fetch: Seems to just be fetching the next row + ENTER_CRIT_SECT(); mysql_stmt_data_seek(m_hstmt, pos); int ret = mysql_stmt_fetch( m_hstmt); + LEAVE_CRIT_SECT(); if( ret == MYSQL_NO_DATA ) return m_hrLastMoveInfo = DB_E_BADBOOKMARK; @@ -1562,7 +1583,9 @@ { if( m_hstmt != NULL ) { + ENTER_CRIT_SECT(); mysql_stmt_close(m_hstmt); + LEAVE_CRIT_SECT(); m_hstmt = NULL; } if( m_hstmtChange != NULL ) @@ -1787,17 +1810,12 @@ // 6) Execute a query // FIXME: Preparation and binding should happen at the correct times, not at this time // 6a) Prepare the query - // if (!TryEnterCriticalSection(&(pDataSource->database_critsect))) - // { - TRACE2("*** waiting for critical section on SQL statement *** %s", lpszSQL); - // this way we can trap when something is blocking... - EnterCriticalSection(&(pDataSource->database_critsect)); - // } + ENTER_CRIT_SECT_SQL(); if ( mysql_stmt_prepare(m_hstmt, lpszSQL, strlen(lpszSQL))) { mysql_stmt_close(m_hstmt); m_hstmt = NULL; - LeaveCriticalSection(&(pDataSource->database_critsect)); + LEAVE_CRIT_SECT_SQL(); return DB_E_ERRORSINCOMMAND; } @@ -1874,7 +1892,7 @@ mysql_stmt_close(m_hstmt); m_hstmt = NULL; delete [] mysql_bindings; - LeaveCriticalSection(&(pDataSource->database_critsect)); + LEAVE_CRIT_SECT_SQL(); return DB_E_ERRORSINCOMMAND; } } @@ -1883,7 +1901,7 @@ mysql_stmt_close(m_hstmt); m_hstmt = NULL; delete [] mysql_bindings; - LeaveCriticalSection(&(pDataSource->database_critsect)); + LEAVE_CRIT_SECT_SQL(); return DB_E_ERRORSINCOMMAND; } @@ -1897,7 +1915,7 @@ mysql_stmt_close(m_hstmt); m_hstmt = NULL; delete [] mysql_bindings; - LeaveCriticalSection(&(pDataSource->database_critsect)); + LEAVE_CRIT_SECT_SQL(); return DB_E_ERRORSINCOMMAND; } @@ -1908,12 +1926,12 @@ mysql_stmt_close(m_hstmt); m_hstmt = NULL; delete [] mysql_bindings; - LeaveCriticalSection(&(pDataSource->database_critsect)); + LEAVE_CRIT_SECT_SQL(); return S_FALSE; } - LeaveCriticalSection(&(pDataSource->database_critsect)); numRowsAffected = mysql_stmt_affected_rows(m_hstmt); + LEAVE_CRIT_SECT_SQL(); if (cBindings && cParamSets > 1) { @@ -1923,11 +1941,13 @@ { for (int nBinding = 0;nBinding < cBindings;nBinding++) mysql_bindings[nBinding].buffer = (void *) ((unsigned long)mysql_bindings[nBinding].buffer + BufferJump); + ENTER_CRIT_SECT_SQL(); if (mysql_stmt_bind_param(m_hstmt, mysql_bindings)) { mysql_stmt_close(m_hstmt); m_hstmt = NULL; delete [] mysql_bindings; + LEAVE_CRIT_SECT_SQL(); return DB_E_ERRORSINCOMMAND; } if (mysql_stmt_execute(m_hstmt)) @@ -1935,14 +1955,18 @@ mysql_stmt_close(m_hstmt); m_hstmt = NULL; delete [] mysql_bindings; + LEAVE_CRIT_SECT_SQL(); return DB_E_ERRORSINCOMMAND; } numRowsAffected += mysql_stmt_affected_rows(m_hstmt); + LEAVE_CRIT_SECT_SQL(); } } // 7) Check what is done :) : SELECT returns one or more columns + ENTER_CRIT_SECT_SQL(); m_dwCols = mysql_stmt_field_count(m_hstmt); + LEAVE_CRIT_SECT_SQL(); // 8) Get number of rows affected - already obtained m_dwTotalRows = numRowsAffected; @@ -1987,8 +2011,10 @@ return E_OUTOFMEMORY; } + ENTER_CRIT_SECT_SQL(); MYSQL_RES *result_metadata = mysql_stmt_result_metadata(m_hstmt); - + LEAVE_CRIT_SECT_SQL(); + SQLSMALLINT iLen; DWORD dwOffset = 0; SQLUINTEGER uiPrecision; |
From: David F. <dav...@us...> - 2005-11-08 14:46:48
|
Update of /cvsroot/myoledb/myoledb3 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27441 Modified Files: mysql.cpp Log Message: move critical section higher, as prepare needs to be inside it close if store_result failed Index: mysql.cpp =================================================================== RCS file: /cvsroot/myoledb/myoledb3/mysql.cpp,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- mysql.cpp 8 Nov 2005 11:53:30 -0000 1.24 +++ mysql.cpp 8 Nov 2005 14:46:36 -0000 1.25 @@ -1787,10 +1787,17 @@ // 6) Execute a query // FIXME: Preparation and binding should happen at the correct times, not at this time // 6a) Prepare the query + // if (!TryEnterCriticalSection(&(pDataSource->database_critsect))) + // { + TRACE2("*** waiting for critical section on SQL statement *** %s", lpszSQL); + // this way we can trap when something is blocking... + EnterCriticalSection(&(pDataSource->database_critsect)); + // } if ( mysql_stmt_prepare(m_hstmt, lpszSQL, strlen(lpszSQL))) { mysql_stmt_close(m_hstmt); m_hstmt = NULL; + LeaveCriticalSection(&(pDataSource->database_critsect)); return DB_E_ERRORSINCOMMAND; } @@ -1867,6 +1874,7 @@ mysql_stmt_close(m_hstmt); m_hstmt = NULL; delete [] mysql_bindings; + LeaveCriticalSection(&(pDataSource->database_critsect)); return DB_E_ERRORSINCOMMAND; } } @@ -1875,6 +1883,7 @@ mysql_stmt_close(m_hstmt); m_hstmt = NULL; delete [] mysql_bindings; + LeaveCriticalSection(&(pDataSource->database_critsect)); return DB_E_ERRORSINCOMMAND; } @@ -1882,7 +1891,6 @@ // 6d) Execute the statement int numRowsAffected; - EnterCriticalSection(&(pDataSource->database_critsect)); if (mysql_stmt_execute(m_hstmt)) { // TODO: work out what the right error to give here is @@ -1897,6 +1905,8 @@ if (mysql_stmt_store_result(m_hstmt)) { // We did not manage to buffer the results + mysql_stmt_close(m_hstmt); + m_hstmt = NULL; delete [] mysql_bindings; LeaveCriticalSection(&(pDataSource->database_critsect)); return S_FALSE; |
From: David M. <ig...@us...> - 2005-11-08 13:30:50
|
Update of /cvsroot/myoledb/myoledb3 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8904 Modified Files: dbinit.cpp Log Message: Add a call to mysql_init to initialise the database construct. Index: dbinit.cpp =================================================================== RCS file: /cvsroot/myoledb/myoledb3/dbinit.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- dbinit.cpp 4 Nov 2005 13:00:34 -0000 1.5 +++ dbinit.cpp 8 Nov 2005 13:30:42 -0000 1.6 @@ -234,6 +234,7 @@ free(definition_buffer); } } + mysql_init(&(m_pObj->database_connection)); if (mysql_real_connect(&(m_pObj->database_connection), szDataPath, szUserId, szPasswd, szDbName, port, NULL, 0)) { |
From: David M. <ig...@us...> - 2005-11-08 13:27:36
|
Update of /cvsroot/myoledb/myoledb3 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7965 Modified Files: myoledb.wxs Log Message: Add an upgradecode to the installer Index: myoledb.wxs =================================================================== RCS file: /cvsroot/myoledb/myoledb3/myoledb.wxs,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- myoledb.wxs 4 Nov 2005 16:49:20 -0000 1.7 +++ myoledb.wxs 8 Nov 2005 13:27:26 -0000 1.8 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <Wix xmlns="http://schemas.microsoft.com/wix/2003/01/wi"> - <Product Id="E170C29B-5F08-4759-8538-2B685F7CFC39" Name="MyOleDB" Language="1033" Version="3.9.1.0" Manufacturer="St. James Software"> + <Product Id="E170C29B-5F08-4759-8538-2B685F7CFC39" UpgradeCode="09A01F85-AC55-41E4-80DE-293C35AF7796" Name="MyOleDB" Language="1033" Version="3.9.1.0" Manufacturer="St. James Software"> <Package Id="????????-????-????-????-????????????" Description="MyOleDB Installer" Comments="An OleDB driver for MySQL" Manufacturer="St. James Software" InstallerVersion="200" Compressed="yes"/> |
From: David F. <dav...@us...> - 2005-11-08 11:53:49
|
Update of /cvsroot/myoledb/myoledb3 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5456 Modified Files: mysql.cpp Log Message: added FIXME about multiple parameter set bindings' lengths and statuses Index: mysql.cpp =================================================================== RCS file: /cvsroot/myoledb/myoledb3/mysql.cpp,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- mysql.cpp 7 Nov 2005 14:01:23 -0000 1.23 +++ mysql.cpp 8 Nov 2005 11:53:30 -0000 1.24 @@ -1907,6 +1907,7 @@ if (cBindings && cParamSets > 1) { + // FIXME: these bindings need to be updated properly, including lengths and statuses int BufferJump = pBinding[1].obValue - pBinding[0].obValue; for (int i = 1;i < cParamSets;i++) { |
From: David M. <ig...@us...> - 2005-11-07 14:01:34
|
Update of /cvsroot/myoledb/myoledb3 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17710 Modified Files: mysql.cpp Log Message: Add an argument (0) when using the macro TRACE2, as it seems to need a numerical second argument Add the entering and leaving of the database critical section around the execute/store_result calls, to make this thread-safe Index: mysql.cpp =================================================================== RCS file: /cvsroot/myoledb/myoledb3/mysql.cpp,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- mysql.cpp 4 Nov 2005 16:39:46 -0000 1.22 +++ mysql.cpp 7 Nov 2005 14:01:23 -0000 1.23 @@ -385,7 +385,7 @@ case DBTYPE_DBDATE: stmt_results[i].buffer_type = MYSQL_TYPE_DATE; break; case DBTYPE_DBTIME: stmt_results[i].buffer_type = MYSQL_TYPE_TIME; break; case DBTYPE_DBTIMESTAMP: stmt_results[i].buffer_type = MYSQL_TYPE_DATETIME; break; -#define HANDLE_UNKNOWN_RESULT_TYPE(UNKNOWN_DBTYPE) case UNKNOWN_DBTYPE: TRACE2( "CMySQL::Rebind failed with unknown DBTYPE " # UNKNOWN_DBTYPE ); unknown_type = true; break; +#define HANDLE_UNKNOWN_RESULT_TYPE(UNKNOWN_DBTYPE) case UNKNOWN_DBTYPE: TRACE2( "CMySQL::Rebind failed with unknown DBTYPE " # UNKNOWN_DBTYPE,0 ); unknown_type = true; break; // TODO: handle these types, some of them should be easy HANDLE_UNKNOWN_RESULT_TYPE(DBTYPE_EMPTY); HANDLE_UNKNOWN_RESULT_TYPE(DBTYPE_NULL); @@ -1831,7 +1831,7 @@ case DBTYPE_R8: mysql_bindings[nBinding].buffer_type = MYSQL_TYPE_DOUBLE; break; case DBTYPE_STR: mysql_bindings[nBinding].buffer_type = MYSQL_TYPE_STRING; break;// convert from BSTR break; // case DBTYPE_DATE: mysql_bindings[nBinding].buffer_type = MYSQL_TYPE_DATETIME; // convert to MYSQL_TIME -#define HANDLE_UNKNOWN_PARAM_TYPE(UNKNOWN_DBTYPE) case UNKNOWN_DBTYPE: TRACE2( "CMySQL::Init failed with parameter of unknown DBTYPE " # UNKNOWN_DBTYPE ); unknown_type = true; break; +#define HANDLE_UNKNOWN_PARAM_TYPE(UNKNOWN_DBTYPE) case UNKNOWN_DBTYPE: TRACE2( "CMySQL::Init failed with parameter of unknown DBTYPE " # UNKNOWN_DBTYPE,0 ); unknown_type = true; break; HANDLE_UNKNOWN_PARAM_TYPE(DBTYPE_EMPTY); HANDLE_UNKNOWN_PARAM_TYPE(DBTYPE_NULL); HANDLE_UNKNOWN_PARAM_TYPE(DBTYPE_CY); @@ -1882,15 +1882,27 @@ // 6d) Execute the statement int numRowsAffected; + EnterCriticalSection(&(pDataSource->database_critsect)); if (mysql_stmt_execute(m_hstmt)) { // TODO: work out what the right error to give here is mysql_stmt_close(m_hstmt); m_hstmt = NULL; delete [] mysql_bindings; + LeaveCriticalSection(&(pDataSource->database_critsect)); return DB_E_ERRORSINCOMMAND; } + // Load the result set into memory + if (mysql_stmt_store_result(m_hstmt)) + { + // We did not manage to buffer the results + delete [] mysql_bindings; + LeaveCriticalSection(&(pDataSource->database_critsect)); + return S_FALSE; + } + LeaveCriticalSection(&(pDataSource->database_critsect)); + numRowsAffected = mysql_stmt_affected_rows(m_hstmt); if (cBindings && cParamSets > 1) @@ -1964,14 +1976,6 @@ return E_OUTOFMEMORY; } - // Load the result set into memory - if (mysql_stmt_store_result(m_hstmt)) - { - // We did not manage to buffer the results - delete [] mysql_bindings; - return S_FALSE; - } - MYSQL_RES *result_metadata = mysql_stmt_result_metadata(m_hstmt); SQLSMALLINT iLen; |
From: David M. <ig...@us...> - 2005-11-07 13:59:10
|
Update of /cvsroot/myoledb/myoledb3 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17036 Modified Files: classfac.cpp Log Message: Initialise each thread on attach Clean up each thread on detach Even though this is apparently not necessary (according to the user notes in the MySQL docs), it is documented as necessary, and it doesn't seem to hurt, so I'm more ocmfortable with it being in Index: classfac.cpp =================================================================== RCS file: /cvsroot/myoledb/myoledb3/classfac.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- classfac.cpp 4 Nov 2005 07:53:14 -0000 1.4 +++ classfac.cpp 7 Nov 2005 13:59:00 -0000 1.5 @@ -233,10 +233,12 @@ case DLL_THREAD_ATTACH: TRACE("DllMain (DLL_THREAD_ATTACH)"); + mysql_thread_init(); break; case DLL_THREAD_DETACH: TRACE("DllMain (DLL_THREAD_DETACH)"); + mysql_thread_end(); break; |
From: David M. <ig...@us...> - 2005-11-07 13:56:21
|
Update of /cvsroot/myoledb/myoledb3 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16345 Modified Files: datasrc.cpp datasrc.h Log Message: Add a critical section for the database connection. Add initialization and deletion statemetns for it Index: datasrc.cpp =================================================================== RCS file: /cvsroot/myoledb/myoledb3/datasrc.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- datasrc.cpp 1 Nov 2005 09:17:54 -0000 1.4 +++ datasrc.cpp 7 Nov 2005 13:56:11 -0000 1.5 @@ -42,6 +42,9 @@ // Initialize simple member vars m_pUnkOuter = pUnkOuter ? pUnkOuter : this; + // Initialize database connection critical section + InitializeCriticalSection(&database_critsect); + // Increment global object count. OBJECT_CONSTRUCTED(); @@ -84,6 +87,9 @@ delete m_pIDBCreateSession; delete m_pIPersist; + // Release database critical section + DeleteCriticalSection(&database_critsect); + // Decrement global object count. OBJECT_DESTRUCTED(); Index: datasrc.h =================================================================== RCS file: /cvsroot/myoledb/myoledb3/datasrc.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- datasrc.h 28 Oct 2005 14:58:59 -0000 1.3 +++ datasrc.h 7 Nov 2005 13:56:11 -0000 1.4 @@ -122,6 +122,7 @@ // Container for the database connection, which I think should only be initialised by IDBInitialize MYSQL database_connection; + CRITICAL_SECTION database_critsect; public: //@access public //@cmember Constructor |
From: David M. <ig...@us...> - 2005-11-07 13:54:16
|
Update of /cvsroot/myoledb/myoledb3 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15905 Modified Files: MyOLEDB.dsp Log Message: Link to libraries in a different directory, so we can have debug libraries for the debug build and release libraries for the release build Index: MyOLEDB.dsp =================================================================== RCS file: /cvsroot/myoledb/myoledb3/MyOLEDB.dsp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- MyOLEDB.dsp 2 Nov 2005 11:34:27 -0000 1.4 +++ MyOLEDB.dsp 7 Nov 2005 13:54:07 -0000 1.5 @@ -80,7 +80,7 @@ # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib gdi32.lib shell32.lib uuid.lib comdlg32.lib user32.lib advapi32.lib ole32.lib oleaut32.lib wsock32.lib libmysql.lib /nologo /subsystem:windows /dll /debug /machine:I386 /nodefaultlib:"LIBCD" /nodefaultlib:"LIBC" /nodefaultlib:"LIBCMT" /out:"Debug/MyProv.dll" /pdbtype:sept /libpath:"libs/" +# ADD LINK32 kernel32.lib gdi32.lib shell32.lib uuid.lib comdlg32.lib user32.lib advapi32.lib ole32.lib oleaut32.lib wsock32.lib libmysql.lib /nologo /subsystem:windows /dll /debug /machine:I386 /nodefaultlib:"LIBCD" /nodefaultlib:"LIBC" /nodefaultlib:"LIBCMT" /out:"Debug/MyProv.dll" /pdbtype:sept /libpath:"libs_d/" # SUBTRACT LINK32 /pdb:none # Begin Special Build Tool SOURCE="$(InputPath)" |
From: David F. <dav...@us...> - 2005-11-04 16:49:31
|
Update of /cvsroot/myoledb/myoledb3 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11876 Modified Files: Makefile myoledb-debug.wxs myoledb.wxs myprov.rc myver.h Log Message: version 3.9.1 Index: myver.h =================================================================== RCS file: /cvsroot/myoledb/myoledb3/myver.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- myver.h 4 Nov 2005 07:53:14 -0000 1.2 +++ myver.h 4 Nov 2005 16:49:20 -0000 1.3 @@ -19,10 +19,10 @@ #ifndef _AXVER_H_ #define _AXVER_H_ -#define VER_FILEVERSION 03,90,0000 -#define VER_FILEVERSION_STR "03.90.0000\0" -#define VER_PRODUCTVERSION 03,90,0000 -#define VER_PRODUCTVERSION_STR "03.90.0000\0" +#define VER_FILEVERSION 03,90,0001 +#define VER_FILEVERSION_STR "03.90.0001\0" +#define VER_PRODUCTVERSION 03,90,0001 +#define VER_PRODUCTVERSION_STR "03.90.0001\0" #define VER_LFILEVERSION_STR L"03.90" #define VER_FILEFLAGSMASK (VS_FF_DEBUG | VS_FF_PRERELEASE) Index: myoledb-debug.wxs =================================================================== RCS file: /cvsroot/myoledb/myoledb3/myoledb-debug.wxs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- myoledb-debug.wxs 4 Nov 2005 08:55:33 -0000 1.1 +++ myoledb-debug.wxs 4 Nov 2005 16:49:20 -0000 1.2 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <Wix xmlns="http://schemas.microsoft.com/wix/2003/01/wi"> - <Product Id="E170C29B-5F08-4759-8538-2B685F7CFC39" Name="MyOleDB" Language="1033" Version="3.9.0.0" Manufacturer="St. James Software"> + <Product Id="E170C29B-5F08-4759-8538-2B685F7CFC39" Name="MyOleDB" Language="1033" Version="3.9.1.0" Manufacturer="St. James Software"> <Package Id="????????-????-????-????-????????????" Description="MyOleDB Installer" Comments="An OleDB driver for MySQL (debug version)" Manufacturer="St. James Software" InstallerVersion="200" Compressed="yes"/> Index: myprov.rc =================================================================== RCS file: /cvsroot/myoledb/myoledb3/myprov.rc,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- myprov.rc 4 Nov 2005 07:53:14 -0000 1.3 +++ myprov.rc 4 Nov 2005 16:49:20 -0000 1.4 @@ -32,8 +32,8 @@ // VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,9,0,0 - PRODUCTVERSION 3,9,0,0 + FILEVERSION 3,9,1,0 + PRODUCTVERSION 3,9,1,0 FILEFLAGSMASK 0x3L #ifdef _DEBUG FILEFLAGS 0x1L @@ -51,14 +51,14 @@ VALUE "Comments", "\0" VALUE "CompanyName", "Standard&Western Software\0" VALUE "FileDescription", "MyOLEDB Provider \0" - VALUE "FileVersion", "03.90.0000\0" + VALUE "FileVersion", "03.90.0001\0" VALUE "InternalName", "MYSQLPROV\0" VALUE "LegalCopyright", "Copyright © SWsoft 1998-2000\0" VALUE "LegalTrademarks", "Windows(TM) is a trademark of Microsoft Corporation. Microsoft® is a registered trademark of Microsoft Corporation.\0" VALUE "OriginalFilename", "MYPROV.DLL\0" VALUE "PrivateBuild", "\0" VALUE "ProductName", "OLE DB Provider for MySQL\0" - VALUE "ProductVersion", "03.90.0000\0" + VALUE "ProductVersion", "03.90.0001\0" VALUE "SpecialBuild", "\0" END END Index: Makefile =================================================================== RCS file: /cvsroot/myoledb/myoledb3/Makefile,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Makefile 4 Nov 2005 13:06:46 -0000 1.2 +++ Makefile 4 Nov 2005 16:49:20 -0000 1.3 @@ -2,7 +2,7 @@ wixdir="c:/DevTools/wix/" mysqllibdir="e:/sjsoft/code/mysql-libraries/mysql-5.0.15-win" -version=3.9.0 +version=3.9.1 MAKEFLAGS= # work out the sourcefiles from the Visual C++ Makefile Index: myoledb.wxs =================================================================== RCS file: /cvsroot/myoledb/myoledb3/myoledb.wxs,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- myoledb.wxs 4 Nov 2005 08:55:10 -0000 1.6 +++ myoledb.wxs 4 Nov 2005 16:49:20 -0000 1.7 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <Wix xmlns="http://schemas.microsoft.com/wix/2003/01/wi"> - <Product Id="E170C29B-5F08-4759-8538-2B685F7CFC39" Name="MyOleDB" Language="1033" Version="3.9.0.0" Manufacturer="St. James Software"> + <Product Id="E170C29B-5F08-4759-8538-2B685F7CFC39" Name="MyOleDB" Language="1033" Version="3.9.1.0" Manufacturer="St. James Software"> <Package Id="????????-????-????-????-????????????" Description="MyOleDB Installer" Comments="An OleDB driver for MySQL" Manufacturer="St. James Software" InstallerVersion="200" Compressed="yes"/> |
From: David F. <dav...@us...> - 2005-11-04 16:39:54
|
Update of /cvsroot/myoledb/myoledb3 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8638 Modified Files: mysql.cpp Log Message: logic for null status was the wrong way round, a problem indeed... Index: mysql.cpp =================================================================== RCS file: /cvsroot/myoledb/myoledb3/mysql.cpp,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- mysql.cpp 4 Nov 2005 15:06:28 -0000 1.21 +++ mysql.cpp 4 Nov 2005 16:39:46 -0000 1.22 @@ -1815,7 +1815,7 @@ if (pdwSrcStatus) { mysql_bindings[nBinding].is_null = &(mysql_bindings[nBinding].is_null_value); - mysql_bindings[nBinding].is_null_value = (*pdwSrcStatus == 3) ? NULL : 1; + mysql_bindings[nBinding].is_null_value = (*pdwSrcStatus == DBSTATUS_S_ISNULL) ? true : false; } BOOL unknown_type = false; |
From: David F. <dav...@us...> - 2005-11-04 16:12:41
|
Update of /cvsroot/myoledb/myoledb3 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32413 Modified Files: mysqlmeta.cpp Log Message: field_type_datetime now maps to DBTYPE_DBTIMESTAMP return information for FIELD_TYPE_VAR_STRING TODO: we need a full review of the types in the different places they are referenced preferably a refactor so we aren't doing this stuff all over the place... Index: mysqlmeta.cpp =================================================================== RCS file: /cvsroot/myoledb/myoledb3/mysqlmeta.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- mysqlmeta.cpp 4 Nov 2005 16:07:16 -0000 1.5 +++ mysqlmeta.cpp 4 Nov 2005 16:12:32 -0000 1.6 @@ -355,9 +355,10 @@ m_pFields[ m_siFields ].m_btDataType = DBTYPE_DBTIME; break; case FIELD_TYPE_TIMESTAMP: case FIELD_TYPE_DATETIME: - m_pFields[ m_siFields ].m_btDataType = DBTYPE_DATE; break; + m_pFields[ m_siFields ].m_btDataType = DBTYPE_DBTIMESTAMP; break; case FIELD_TYPE_BLOB: case FIELD_TYPE_STRING: + case FIELD_TYPE_VAR_STRING: m_pFields[ m_siFields ].m_btDataType = DBTYPE_STR; break; case FIELD_TYPE_INTERVAL: case FIELD_TYPE_NULL: |
From: David F. <dav...@us...> - 2005-11-04 16:07:36
|
Update of /cvsroot/myoledb/myoledb3 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31087 Modified Files: mysqlmeta.cpp Log Message: we were using the name of the last table to fetch the column names rather than the name of the current table also enabled some sorting code that compiles fine and is presumably useful... Index: mysqlmeta.cpp =================================================================== RCS file: /cvsroot/myoledb/myoledb3/mysqlmeta.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- mysqlmeta.cpp 3 Nov 2005 09:36:03 -0000 1.4 +++ mysqlmeta.cpp 4 Nov 2005 16:07:16 -0000 1.5 @@ -259,9 +259,9 @@ int len = strlen(szBuffer); // Columns of the table - CHECK_OR_CONTINUE( hresColumn = mysql_list_fields(database_connection, szBuffer, NULL)); + CHECK_OR_CONTINUE( hresColumn = mysql_list_fields(database_connection, tableRow[0], NULL)); - // Get number of coulmns in the table + // Get number of columns in the table // FIXME: iColumns += hresColumn->row_count doesn't work - but this is a bit painful... MYSQL_FIELD *column; while( column = mysql_fetch_field(hresColumn) ) @@ -319,7 +319,7 @@ m_pFiles[ m_siFiles ].m_wID = m_siFiles; // Columns of the table - CHECK_FOR_NULL( hresColumn = mysql_list_fields(database_connection, szBuffer, NULL)); + CHECK_OR_CONTINUE( hresColumn = mysql_list_fields(database_connection, tableRow[0], NULL)); MT_LONG siFieldsSaved = m_siFields; @@ -646,7 +646,7 @@ } // Sort fields by m_wID - /*for (int j = pFile->m_wFields - 1; j > 0; j--) + for (int j = pFile->m_wFields - 1; j > 0; j--) { for (int k = 0; k < j; k++) { @@ -657,11 +657,11 @@ pFile->m_pFields[k + 1] = pField; } } - }*/ + } } // Sort segments in ascending order - /*for( iRelate = 0, pRelate = m_pRelations; iRelate < m_siRelations; iRelate++, pRelate++ ) + for( iRelate = 0, pRelate = m_pRelations; iRelate < m_siRelations; iRelate++, pRelate++ ) { // Sort segments of parent index for( int j = pRelate->m_wParentIndexes - 1; j > 0; j-- ) @@ -682,7 +682,7 @@ pRelate->m_ppDependIndex[k] = pRelate->m_ppDependIndex[k + 1]; pRelate->m_ppDependIndex[k + 1] = pIndex; } - }*/ + } // Store Data Dictionary Path, catalogue name, owner name etc. strcpy0(m_szDdfPath, lpszDDPath, MAXSTR( m_szDdfPath ) ); |
From: David F. <dav...@us...> - 2005-11-04 15:06:35
|
Update of /cvsroot/myoledb/myoledb3 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15923 Modified Files: mysql.cpp Log Message: if we need the status, then we should be setting is_null to point to the is_null_value member Index: mysql.cpp =================================================================== RCS file: /cvsroot/myoledb/myoledb3/mysql.cpp,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- mysql.cpp 4 Nov 2005 14:44:28 -0000 1.20 +++ mysql.cpp 4 Nov 2005 15:06:28 -0000 1.21 @@ -1814,10 +1814,8 @@ mysql_bindings[nBinding].length = pulSrcLength; if (pdwSrcStatus) { - if (mysql_bindings[nBinding].is_null) - *mysql_bindings[nBinding].is_null = (*pdwSrcStatus == 3) ? NULL : 1; - else - mysql_bindings[nBinding].is_null_value = (*pdwSrcStatus == 3) ? NULL : 1; + mysql_bindings[nBinding].is_null = &(mysql_bindings[nBinding].is_null_value); + mysql_bindings[nBinding].is_null_value = (*pdwSrcStatus == 3) ? NULL : 1; } BOOL unknown_type = false; |
From: David F. <dav...@us...> - 2005-11-04 14:44:36
|
Update of /cvsroot/myoledb/myoledb3 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11230 Modified Files: mysql.cpp Log Message: manually override the length mysql tells us for MYSQL_TIME records, because its too short (0x13 instead of 0x20) Index: mysql.cpp =================================================================== RCS file: /cvsroot/myoledb/myoledb3/mysql.cpp,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- mysql.cpp 4 Nov 2005 14:33:09 -0000 1.19 +++ mysql.cpp 4 Nov 2005 14:44:28 -0000 1.20 @@ -904,6 +904,7 @@ iHint = sizeof(__int64); } break; + // TODO: handle other date types too case DBTYPE_DBTIMESTAMP: { DBTIMESTAMP oledbvalue; @@ -2025,6 +2026,7 @@ m_pColumnInfo[i].wOleDbType = DBTYPE_DBTIME; break; case FIELD_TYPE_TIMESTAMP: case FIELD_TYPE_DATETIME: + m_pColumnInfo[i].uiLength = sizeof(MYSQL_TIME); m_pColumnInfo[i].wOleDbType = DBTYPE_DBTIMESTAMP; break; case FIELD_TYPE_BLOB: case FIELD_TYPE_STRING: |
From: David F. <dav...@us...> - 2005-11-04 14:33:17
|
Update of /cvsroot/myoledb/myoledb3 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8642 Modified Files: mysql.cpp Log Message: added initial code to convert date times (need to fill out types) commented out nutty code for converting longs Index: mysql.cpp =================================================================== RCS file: /cvsroot/myoledb/myoledb3/mysql.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- mysql.cpp 3 Nov 2005 19:47:21 -0000 1.18 +++ mysql.cpp 4 Nov 2005 14:33:09 -0000 1.19 @@ -380,13 +380,17 @@ case DBTYPE_R4: stmt_results[i].buffer_type = MYSQL_TYPE_FLOAT; break; case DBTYPE_R8: stmt_results[i].buffer_type = MYSQL_TYPE_DOUBLE; break; case DBTYPE_STR: stmt_results[i].buffer_type = MYSQL_TYPE_STRING; break;// convert from BSTR break; - // case DBTYPE_DATE: mysql_bindings[nBinding].buffer_type = MYSQL_TYPE_DATETIME; // convert to MYSQL_TIME + // time objects - convert to MYSQL_TIME, back convert in CorrectData + case DBTYPE_DATE: stmt_results[i].buffer_type = MYSQL_TYPE_DATETIME; break; + case DBTYPE_DBDATE: stmt_results[i].buffer_type = MYSQL_TYPE_DATE; break; + case DBTYPE_DBTIME: stmt_results[i].buffer_type = MYSQL_TYPE_TIME; break; + case DBTYPE_DBTIMESTAMP: stmt_results[i].buffer_type = MYSQL_TYPE_DATETIME; break; #define HANDLE_UNKNOWN_RESULT_TYPE(UNKNOWN_DBTYPE) case UNKNOWN_DBTYPE: TRACE2( "CMySQL::Rebind failed with unknown DBTYPE " # UNKNOWN_DBTYPE ); unknown_type = true; break; // TODO: handle these types, some of them should be easy HANDLE_UNKNOWN_RESULT_TYPE(DBTYPE_EMPTY); HANDLE_UNKNOWN_RESULT_TYPE(DBTYPE_NULL); HANDLE_UNKNOWN_RESULT_TYPE(DBTYPE_CY); - HANDLE_UNKNOWN_RESULT_TYPE(DBTYPE_DATE); + // HANDLE_UNKNOWN_RESULT_TYPE(DBTYPE_DATE); HANDLE_UNKNOWN_RESULT_TYPE(DBTYPE_BSTR); HANDLE_UNKNOWN_RESULT_TYPE(DBTYPE_IDISPATCH); HANDLE_UNKNOWN_RESULT_TYPE(DBTYPE_ERROR); @@ -406,9 +410,9 @@ HANDLE_UNKNOWN_RESULT_TYPE(DBTYPE_WSTR); HANDLE_UNKNOWN_RESULT_TYPE(DBTYPE_NUMERIC); HANDLE_UNKNOWN_RESULT_TYPE(DBTYPE_UDT); - HANDLE_UNKNOWN_RESULT_TYPE(DBTYPE_DBDATE); - HANDLE_UNKNOWN_RESULT_TYPE(DBTYPE_DBTIME); - HANDLE_UNKNOWN_RESULT_TYPE(DBTYPE_DBTIMESTAMP); + // HANDLE_UNKNOWN_RESULT_TYPE(DBTYPE_DBDATE); + // HANDLE_UNKNOWN_RESULT_TYPE(DBTYPE_DBTIME); + // HANDLE_UNKNOWN_RESULT_TYPE(DBTYPE_DBTIMESTAMP); default: TRACE2( "CMySQL::Rebind failed with unknown DBTYPE 0x%x", m_pColumnInfo[i].wOleDbType ); unknown_type = true; @@ -894,11 +898,28 @@ case DBTYPE_I8: case DBTYPE_UI8: { - char* p = (char*)holder.RowColumn(dwUseRowInArray, dwColumn); - *(__int64*)p = _atoi64( p ); + // FIXME: we should be able to do this natively, so ignoring this... + // char* p = (char*)holder.RowColumn(dwUseRowInArray, dwColumn); + // *(__int64*)p = _atoi64( p ); iHint = sizeof(__int64); } break; + case DBTYPE_DBTIMESTAMP: + { + DBTIMESTAMP oledbvalue; + void *buffer = holder.RowColumn(dwUseRowInArray, dwColumn); + MYSQL_TIME &mysqlvalue = *(MYSQL_TIME *)buffer; + oledbvalue.year = mysqlvalue.year; + oledbvalue.month = mysqlvalue.month; + oledbvalue.day = mysqlvalue.day; + oledbvalue.hour = mysqlvalue.hour; + oledbvalue.minute = mysqlvalue.minute; + oledbvalue.second = mysqlvalue.second; + oledbvalue.fraction = mysqlvalue.second_part; + *(DBTIMESTAMP *)buffer = oledbvalue; + iHint = sizeof(DBTIMESTAMP); + break; + } case DBTYPE_STR: { char* pStart = (char*)holder.RowColumn(dwUseRowInArray, dwColumn); @@ -2004,7 +2025,7 @@ m_pColumnInfo[i].wOleDbType = DBTYPE_DBTIME; break; case FIELD_TYPE_TIMESTAMP: case FIELD_TYPE_DATETIME: - m_pColumnInfo[i].wOleDbType = DBTYPE_DATE; break; + m_pColumnInfo[i].wOleDbType = DBTYPE_DBTIMESTAMP; break; case FIELD_TYPE_BLOB: case FIELD_TYPE_STRING: case FIELD_TYPE_VAR_STRING: |
From: David F. <dav...@us...> - 2005-11-04 13:09:20
|
Update of /cvsroot/myoledb/myoledb3 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19305 Modified Files: Install.txt Log Message: added note on makefile Index: Install.txt =================================================================== RCS file: /cvsroot/myoledb/myoledb3/Install.txt,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- Install.txt 4 Nov 2005 08:55:10 -0000 1.3 +++ Install.txt 4 Nov 2005 13:09:12 -0000 1.4 @@ -18,6 +18,8 @@ 4. Unpack somewhere and compile MyOLEDB v3 package (target "MyOLEDB"). You produce MyProv.dll (OLE DB Provider for MySQL). Copy it to your installation directory. +Note: you can use the Makefile to compile MyOLEDB through MinGW, it will +currently call nmake to build the dlls 5. Run "regsvr32.exe path\MyProv.dll", where "path" means installation directory. |
From: David F. <dav...@us...> - 2005-11-04 13:07:08
|
Update of /cvsroot/myoledb/myoledb3 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18597 Modified Files: Makefile Log Message: added support for building the actual dlls with nmake once we've migrated to mingw this shouldn't be neccessary :-) new targets: debug and release are shortcuts to build the dlls debugmsi and releasemsi build the actual msi files all will build the dll files, use msi to build the msi files Index: Makefile =================================================================== RCS file: /cvsroot/myoledb/myoledb3/Makefile,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Makefile 4 Nov 2005 08:55:33 -0000 1.1 +++ Makefile 4 Nov 2005 13:06:46 -0000 1.2 @@ -3,10 +3,27 @@ wixdir="c:/DevTools/wix/" mysqllibdir="e:/sjsoft/code/mysql-libraries/mysql-5.0.15-win" version=3.9.0 +MAKEFLAGS= -all: msi debugmsi +# work out the sourcefiles from the Visual C++ Makefile +SOURCES:=$(shell grep '^SOURCE=[.].*cpp$$' MyOLEDB.mak | sed 's/SOURCE=//' | sed 's/.\\//') +DEBUG_OBJS=$(foreach source,${SOURCES},Debug/${source:.cpp=.obj}) +RELEASE_OBJS=$(foreach source,${SOURCES},Release/${source:.cpp=.obj}) -msi: Debug/libmysql.dll Debug/MyProv.dll myoledb.wixobj +.PHONY: clean debug release + +all: debug release + +msi: debugmsi releasemsi + +debug: Debug/MyProv.dll + +release: Release/MyProv.dll + +clean: + rm myoledb-${version}.msi myoledb-${version}-debug.msi Debug/MyProv.dll Release/MyProv.dll myoledb.wixobj $(DEBUG_OBJS) $(RELEASE_OBJS) + +releasemsi: Release/libmysql.dll Release/MyProv.dll myoledb.wixobj ${wixdir}/light.exe -out myoledb-${version}.msi myoledb.wixobj ${wixdir}/ui/wixui_featuretree.wixlib debugmsi: Debug/libmysql.dll Debug/MyProv.dll myoledb-debug.wixobj @@ -15,7 +32,18 @@ %.wixobj: %.wxs ${wixdir}/candle.exe $^ -Debug/libmysql.dll: +# MAKEFLAGS must be empty or funny dashes get passed to nmake and it doesn't like them +# the -F is converted to /F by mingw - woe betide trying to pass /F + +Debug/MyProv.dll: MAKEFLAGS= +Debug/MyProv.dll: MyOLEDB.mak $(SOURCES) + nmake -F MyOLEDB.mak CFG="MyOLEDB - Win32 Debug" + +Release/MyProv.dll: MAKEFLAGS= +Release/MyProv.dll: MyOLEDB.mak $(SOURCES) + nmake -F MyOLEDB.mak CFG="MyOLEDB - Win32 Release" + +Release/libmysql.dll: cp -p ${mysqllibdir}/lib_release/libmysql.dll $@ Debug/libmysql.dll: |