bk commit - MyODBC 3.51 (1.519)

bk commit - MyODBC 3.51 (1.519)

am 04.10.2005 23:29:36 von pharvey

Below is the list of changes that have just been commited into a local
MyODBC 3.51 repository of 'pharvey'. When 'pharvey' does a push, they will
be propogaged to the main repository and within 2 hours after the push
into the public repository.

For more information on how to access the public repository see:
http://www.mysql.com/products/myodbc/faq_2.html#Development_ source

You can also browse the changes from public repository:
Complete repository: http://mysql.bkbits.net:8080/myodbc3/
This changeset : http://mysql.bkbits.net:8080/myodbc3/cset@1.519

ChangeSet
1.519 05/10/04 14:29:34 pharvey@sun.codebydesign.com +4 -0
Merge bk-internal.mysql.com:/home/bk/myodbc-3.51
into sun.codebydesign.com:/home/pharvey/SandBox/32/myodbc-3.51

util/MYODBCUtil.h
1.16 05/10/04 14:29:33 pharvey@sun.codebydesign.com +0 -0
Auto merged

driver/driver.pro
1.7 05/10/04 14:29:33 pharvey@sun.codebydesign.com +0 -0
Auto merged

driver/connect.c
1.78 05/10/04 14:29:33 pharvey@sun.codebydesign.com +0 -0
Auto merged

driver/Makefile.am
1.24 05/10/04 14:29:33 pharvey@sun.codebydesign.com +0 -0
Auto merged

# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: pharvey
# Host: sun.codebydesign.com
# Root: /home/pharvey/SandBox/32/myodbc-3.51/RESYNC

--- 1.77/driver/connect.c 2005-09-25 22:07:42 -07:00
+++ 1.78/driver/connect.c 2005-10-04 14:29:33 -07:00
@@ -182,13 +182,13 @@
@purpose : to connect to mysql server
*/

-SQLRETURN SQL_API SQLConnect(SQLHDBC hdbc,
- SQLCHAR FAR *szDSN,
- SQLSMALLINT cbDSN,
- SQLCHAR FAR *szUID,
- SQLSMALLINT cbUID,
- SQLCHAR FAR *szAuthStr,
- SQLSMALLINT cbAuthStr)
+SQLRETURN SQL_API SQLConnect( SQLHDBC hdbc,
+ SQLCHAR FAR * szDSN,
+ SQLSMALLINT cbDSN,
+ SQLCHAR FAR * szUID,
+ SQLSMALLINT cbUID,
+ SQLCHAR FAR * szAuthStr,
+ SQLSMALLINT cbAuthStr )
{
char host[64],user[64],passwd[64],dsn[NAME_LEN+1],database[NAME_L EN+1];
char port[10],flag[10],init_stmt[256],*dsn_ptr;
@@ -210,33 +210,28 @@
DBUG_RETURN(set_conn_error(hdbc, MYERR_S1000,
"Invalid Connection Parameters",0));

- SQLGetPrivateProfileString(dsn_ptr,"user","", user, sizeof(user),"ODBC.INI");
- SQLGetPrivateProfileString(dsn_ptr,"password","", passwd, sizeof(passwd),"ODBC.INI");
- SQLGetPrivateProfileString(dsn_ptr,"server","localhost", host, sizeof(host),"ODBC.INI");
- SQLGetPrivateProfileString(dsn_ptr,"database",dsn_ptr, database, sizeof(database),"ODBC.INI");
- SQLGetPrivateProfileString(dsn_ptr,"port","0", port, sizeof(port),"ODBC.INI");
+ SQLGetPrivateProfileString(dsn_ptr,"user","", user, sizeof(user), MYODBCUtilGetIniFileName( TRUE ) );
+ SQLGetPrivateProfileString(dsn_ptr,"password","", passwd, sizeof(passwd), MYODBCUtilGetIniFileName( TRUE ) );
+ SQLGetPrivateProfileString(dsn_ptr,"server","localhost", host, sizeof(host), MYODBCUtilGetIniFileName( TRUE ) );
+ SQLGetPrivateProfileString(dsn_ptr,"database",dsn_ptr, database, sizeof(database), MYODBCUtilGetIniFileName( TRUE ) );
+ SQLGetPrivateProfileString(dsn_ptr,"port","0", port, sizeof(port), MYODBCUtilGetIniFileName( TRUE ) );
port_nr= (uint) atoi(port);
- SQLGetPrivateProfileString(dsn_ptr,"option","0", flag, sizeof(flag),"ODBC.INI");
+ SQLGetPrivateProfileString(dsn_ptr,"option","0", flag, sizeof(flag), MYODBCUtilGetIniFileName( TRUE ) );
flag_nr= (ulong) atol(flag);

#ifdef _UNIX_
- SQLGetPrivateProfileString(dsn_ptr,"socket",
- "", socket, sizeof(socket),"ODBC.INI");
+ SQLGetPrivateProfileString(dsn_ptr,"socket", "", socket, sizeof(socket), MYODBCUtilGetIniFileName( TRUE ) );
#endif

- SQLGetPrivateProfileString(dsn_ptr,"stmt",
- "", init_stmt, sizeof(init_stmt),"ODBC.INI");
-
- SQLGetPrivateProfileString(dsn_ptr, "TRACE", "", szTRACE, sizeof(szTRACE),
- "ODBC.INI");
+ SQLGetPrivateProfileString(dsn_ptr,"stmt", "", init_stmt, sizeof(init_stmt), MYODBCUtilGetIniFileName( TRUE ) );
+ SQLGetPrivateProfileString(dsn_ptr, "TRACE", "", szTRACE, sizeof(szTRACE), MYODBCUtilGetIniFileName( TRUE ) );
if (szTRACE[0] == '0' || szTRACE[0] == 'N' || szTRACE[0] == 'n' ||
((szTRACE[0] == 'O' || szTRACE[0] == 'o') &&
(szTRACE[1] == 'N' || szTRACE[1] == 'n')))
{
char szTRACEFILE[FILENAME_MAX+1]= "";
char szMYODBC_LOG[FILENAME_MAX+20]= "";
- SQLGetPrivateProfileString(dsn_ptr, "TRACEFILE", "", szTRACEFILE,
- sizeof(szTRACEFILE), "ODBC.INI");
+ SQLGetPrivateProfileString(dsn_ptr, "TRACEFILE", "", szTRACEFILE, sizeof(szTRACEFILE), MYODBCUtilGetIniFileName( TRUE ) );
if (*szTRACEFILE)
{
sprintf(szMYODBC_LOG, "d:t:F:L:S:A,%s", szTRACEFILE);

--- 1.23/driver/Makefile.am 2005-09-25 20:12:00 -07:00
+++ 1.24/driver/Makefile.am 2005-10-04 14:29:33 -07:00
@@ -46,7 +46,6 @@
execute.c \
handle.c\
info.c \
-misc.c \
myodbc3.c \
options.c \
prepare.c \

--- 1.15/util/MYODBCUtil.h 2005-09-25 20:12:00 -07:00
+++ 1.16/util/MYODBCUtil.h 2005-10-04 14:29:33 -07:00
@@ -46,7 +46,7 @@
Handle case on OSX where we want to use GetPrivateProfileString (because it
actually works properly) instead of SQLGetPrivateProfileString but
GetPrivateProfileString does not exist because we are dealing with 10.4 or
- newer.
+ newer - I admit - this is a bit of a hack.
*/
#ifndef GetPrivateProfileString
#define GetPrivateProfileString SQLGetPrivateProfileString
@@ -194,6 +194,7 @@

BOOL MYODBCUtilGetDriverNames( char *pszBuffer, int nBuffer );
BOOL MYODBCUtilGetDataSourceNames( char *pszBuffer, int nBuffer, UWORD nScope );
+char * MYODBCUtilGetIniFileName( BOOL bUseEnvVar );

/* MYODBCUTIL_DRIVER */
MYODBCUTIL_DRIVER * MYODBCUtilAllocDriver();

--- 1.6/driver/driver.pro 2005-09-25 20:12:00 -07:00
+++ 1.7/driver/driver.pro 2005-10-04 14:29:33 -07:00
@@ -110,7 +110,6 @@
execute.c \
handle.c \
info.c \
- misc.c \
myodbc3.c \
options.c \
prepare.c \
@@ -127,6 +126,7 @@
../util/MYODBCUtilFreeDriver.c \
../util/MYODBCUtilGetDataSourceNames.c \
../util/MYODBCUtilGetDriverNames.c \
+ ../util/MYODBCUtilGetIniFileName.c \
../util/MYODBCUtilInsertStr.c \
../util/MYODBCUtilReadConnectStr.c \
../util/MYODBCUtilReadDataSource.c \

--
MySQL ODBC Mailing List
For list archives: http://lists.mysql.com/myodbc
To unsubscribe: http://lists.mysql.com/myodbc?unsub=gcdmo-myodbc@m.gmane.org