[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mysql-odbc
Subject:    bk commit - MyODBC 3.51
From:       venu () mysql ! com
Date:       2002-04-30 7:09:51
[Download RAW message or body]

Below is the list of changes that have just been commited into a local
MyODBC 3.51 repository of 'venu'. When 'venu' does a push, they will
be propogaged to the main repository and within 24 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.html#Development_source

ChangeSet
  1.200 02/04/30 00:09:51 venu@myvenu.com +5 -0
  Updated new debug format
  Fix to ADO multi-step generated errors from rs.resync
  Fix to warning SQLSTATE correct update
  Updated the DriverConnect DSN and DESC fields as read-only
  Fix to return SQL_C_BINARY in BLOB cases

  myodbc3.h
    1.21 02/04/30 00:07:21 venu@myvenu.com +2 -1

  myutil.h
    1.17 02/04/30 00:07:20 venu@myvenu.com +8 -6

  utility.c
    1.22 02/04/30 00:07:19 venu@myvenu.com +24 -9

  execute.c
    1.29 02/04/30 00:07:13 venu@myvenu.com +3 -3

  connect.c
    1.28 02/04/30 00:04:38 venu@myvenu.com +6 -5

# 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:	venu
# Host:	myvenu.com
# Root:	/home/venu/src/myodbc-3.51

--- 1.27/connect.c	Mon Feb  4 14:58:48 2002
+++ 1.28/connect.c	Tue Apr 30 00:04:38 2002
@@ -61,7 +61,7 @@
   mysql_init(mysql);
 #ifndef DBUG_OFF
   if (option_flag & FLAG_DEBUG && ! _db_on_)
-    mysql_debug("d:t:S:O,c::\\myodbc.log");
+    mysql_debug("d:t:F:L:S:O,c::\\myodbc.log");
 #endif
 
   if (option_flag & (FLAG_FOUND_ROWS | FLAG_SAFE))
@@ -84,6 +84,7 @@
     mysql_options(mysql,MYSQL_INIT_COMMAND,init_stmt);
   if (connect_timeout)
     mysql_options(mysql, MYSQL_OPT_CONNECT_TIMEOUT,(char*) &connect_timeout);
+  
   DBUG_PRINT("info",("MyODBC: %s,option_flag: %ld,client_flag: %ld",
 		     DRIVER_VERSION, option_flag, client_flag));
   DBUG_RETURN(client_flag);
@@ -175,7 +176,7 @@
 				sizeof(szTRACEFILE), "ODBC.INI" );
     if (*szTRACEFILE)
     {
-      sprintf(szMYODBC_LOG, "d:t:S:A,%s", szTRACEFILE);
+      sprintf(szMYODBC_LOG, "d:t:F:L:S:A,%s", szTRACEFILE);
       DBUG_POP();
       DBUG_PUSH(szMYODBC_LOG);
     }
@@ -278,7 +279,7 @@
 
   hglbAttr = GlobalAlloc(GMEM_MOVEABLE | GMEM_ZEROINIT, sizeof(SETUPDLG));
   if (!hglbAttr)
-    DBUG_RETURN(FALSE);
+    DBUG_RETURN(FALSE);  
   lpsetupdlg = (LPSETUPDLG)GlobalLock(hglbAttr);
 
   maybe_prompt=(fDriverCompletion == SQL_DRIVER_COMPLETE ||
@@ -345,7 +346,7 @@
                 ";OPTION=",lpsetupdlg->aAttr[KEY_FLAG].szAttr,     
                 ";STMT=",lpsetupdlg->aAttr[KEY_STMT].szAttr,
                 ";",NullS);
-    (void) copy_lresult((DBC FAR*) 0,szConnStrOut,cbConnStrOutMax,
+    (void) copy_lresult(SQL_HANDLE_DBC,(DBC FAR*) 0,szConnStrOut,cbConnStrOutMax,
                        &length,buff, (pos-buff),0L,0L,&tmp,0);
     if (pcbConnStrOut)
       *pcbConnStrOut=(SQLSMALLINT) length;
@@ -375,7 +376,7 @@
       fPrompt=TRUE;
       strxmov(message,"[MySQL][",ODBC_DRIVER,"] ",
 	       mysql_error(&dbc->mysql), NullS);
-      MessageBox(hwnd,message,"MyODBC Connection",MB_ICONERROR | MB_OK);
+      MessageBox(hwnd,message,"MySQL-ODBC Connection",MB_ICONERROR | MB_OK);
       goto retry;
     }
     set_handle_error(SQL_HANDLE_DBC,hdbc,MYERR_S1000,mysql_error(&dbc->mysql),

--- 1.28/execute.c	Wed Jan  9 23:07:42 2002
+++ 1.29/execute.c	Tue Apr 30 00:07:13 2002
@@ -91,8 +91,7 @@
     stmt->result=mysql_use_result(&stmt->dbc->mysql);
   else
 #endif
-
-    stmt->result=mysql_store_result(&stmt->dbc->mysql);
+  stmt->result=mysql_store_result(&stmt->dbc->mysql);
   if (!stmt->result)
   {
     if (!mysql_field_count(&stmt->dbc->mysql))
@@ -605,7 +604,8 @@
 {
   ulong offset=0;
   DBUG_ENTER("SQLNativeSql");
-  DBUG_RETURN(copy_lresult((DBC FAR*) hdbc,szSqlStr,cbSqlStrMax,pcbSqlStr,
+  DBUG_RETURN(copy_lresult(SQL_HANDLE_DBC, hdbc,
+         szSqlStr,cbSqlStrMax,pcbSqlStr,
          szSqlStrIn, cbSqlStrIn,0L,0L,&offset,0));
 }
 

--- 1.21/utility.c	Wed Jan  9 23:07:51 2002
+++ 1.22/utility.c	Tue Apr 30 00:07:19 2002
@@ -217,8 +217,8 @@
 */
 
 SQLRETURN
-copy_lresult(DBC FAR *dbc,SQLCHAR FAR *rgbValue,
-       SQLINTEGER cbValueMax,
+copy_lresult(SQLSMALLINT HandleType, SQLHANDLE Handle,
+       SQLCHAR FAR *rgbValue, SQLINTEGER cbValueMax,
        SQLINTEGER FAR *pcbValue,char *src,long src_length,
        long max_length,long fill_length,long *offset,
        my_bool binary_data)
@@ -239,8 +239,18 @@
     set_if_smaller(src_length,max_length);
     set_if_smaller(fill_length,max_length);
   }
-  if (fill_length < src_length || !dbc || !(dbc->flag & FLAG_PAD_SPACE))
-    fill_length=src_length;
+  if (HandleType == SQL_HANDLE_DBC)
+  { 
+    if (fill_length < src_length || !Handle ||
+        !(((DBC FAR*)Handle)->flag & FLAG_PAD_SPACE))
+      fill_length=src_length;
+  }
+  else 
+  { 
+    if (fill_length < src_length || !Handle || 
+        !(((STMT FAR*)Handle)->dbc->flag & FLAG_PAD_SPACE))
+      fill_length=src_length;
+  }
   if (*offset == (ulong) ~0L)
     *offset=0;          /* First call */
   else if (*offset >= fill_length)
@@ -263,8 +273,7 @@
     return SQL_SUCCESS;
   DBUG_PRINT("info",("Returned %ld characters from offset: %ld",
          length,*offset - length));
-  if (dbc)
-    set_dbc_error(dbc,"01004","Data truncated",4002);
+  set_handle_error(HandleType,Handle,MYERR_01004,NULL,0);
   return SQL_SUCCESS_WITH_INFO;
 }
 
@@ -276,7 +285,8 @@
 extern char NEAR _dig_vec[];
 
 SQLRETURN
-copy_binary_result(DBC FAR *dbc,SQLCHAR FAR *rgbValue,SQLINTEGER cbValueMax,
+copy_binary_result(SQLSMALLINT HandleType, SQLHANDLE Handle,
+       SQLCHAR FAR *rgbValue,SQLINTEGER cbValueMax,
        SQLINTEGER FAR *pcbValue,char *src,ulong src_length,
        ulong max_length,ulong *offset)
 {
@@ -313,8 +323,8 @@
     return SQL_SUCCESS;
   DBUG_PRINT("info",("Returned %ld characters from offset: %ld",
          length,*offset - length));
-  if (dbc)
-    set_dbc_error(dbc,"01004","Data truncated",4002);
+
+  set_handle_error(HandleType,Handle,MYERR_01004,NULL,0);
   return SQL_SUCCESS_WITH_INFO;
 }
 
@@ -514,6 +524,11 @@
     return SQL_C_DATE;
   case FIELD_TYPE_TIME:
     return SQL_C_TIME;
+  case FIELD_TYPE_BLOB:
+  case FIELD_TYPE_TINY_BLOB:    
+  case FIELD_TYPE_MEDIUM_BLOB:
+  case FIELD_TYPE_LONG_BLOB:
+    return SQL_C_BINARY;
   }
 }
 

--- 1.16/myutil.h	Wed Jan  9 23:07:46 2002
+++ 1.17/myutil.h	Tue Apr 30 00:07:20 2002
@@ -54,13 +54,15 @@
 					  STMT FAR **stmtNew);
 char *insert_param(MYSQL *mysql, char *to,PARAM_BIND *param);
 char *add_to_buffer(NET *net,char *to,char *from,ulong length);
-SQLRETURN copy_lresult(DBC FAR *dbc,SQLCHAR FAR *rgbValue,
-		       SQLINTEGER cbValueMax, SQLINTEGER FAR *pcbValue,
-		       char *src,long src_length, long max_length,
+SQLRETURN copy_lresult(SQLSMALLINT HandleType, SQLHANDLE handle,
+           SQLCHAR FAR *rgbValue, SQLINTEGER cbValueMax, 
+           SQLINTEGER FAR *pcbValue, char *src,
+           long src_length, long max_length,
 		       long fill_length,long *offset,my_bool binary_data);
-SQLRETURN copy_binary_result(DBC FAR *dbc,SQLCHAR FAR *rgbValue,
-			     SQLINTEGER cbValueMax, SQLINTEGER FAR *pcbValue,
-			     char *src, ulong src_length, ulong max_length,
+SQLRETURN copy_binary_result(SQLSMALLINT HandleType, SQLHANDLE handle,
+           SQLCHAR FAR *rgbValue, SQLINTEGER cbValueMax, 
+           SQLINTEGER FAR *pcbValue, char *src, 
+           ulong src_length, ulong max_length,
 			     ulong *offset);
 SQLRETURN set_dbc_error(DBC FAR *dbc,char *state,char *message,uint errcode);
 SQLRETURN set_stmt_error(STMT *stmt,char *state,char *message,uint errcode);

--- 1.20/myodbc3.h	Sun Mar  3 00:08:45 2002
+++ 1.21/myodbc3.h	Tue Apr 30 00:07:21 2002
@@ -55,6 +55,7 @@
 #include <mysql.h>
 #include <my_list.h>
 #include <m_string.h>
+
 #ifdef THREAD
 #include <my_pthread.h>
 #else
@@ -135,7 +136,7 @@
 #endif
 
 #define SQL_SPEC_STRING   "03.51"
-#define DRIVER_VERSION    "03.51.02"
+#define DRIVER_VERSION    "03.51.03"
 #define ODBC_DRIVER       "ODBC 3.51 Driver"
 #define DRIVER_NAME       "MySQL ODBC 3.51 Driver"
 

---------------------------------------------------------------------
Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before
posting. To request this thread, e-mail myodbc-thread5394@lists.mysql.com

To unsubscribe, send a message to the address shown in the
List-Unsubscribe header of this message. If you cannot see it,
e-mail myodbc-unsubscribe@lists.mysql.com instead.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic