[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-05-27 23:14:16
[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.207 02/05/27 16:14:15 venu@myvenu.com +10 -0
  Few more changes for better driver logging

  myutil.h
    1.19 02/05/27 16:12:56 venu@myvenu.com +6 -1

  handle.c
    1.15 02/05/27 16:12:56 venu@myvenu.com +3 -3

  utility.c
    1.24 02/05/27 16:12:55 venu@myvenu.com +69 -4

  transact.c
    1.17 02/05/27 16:12:55 venu@myvenu.com +2 -2

  results.c
    1.38 02/05/27 16:12:54 venu@myvenu.com +1 -1

  prepare.c
    1.33 02/05/27 16:12:54 venu@myvenu.com +1 -1

  info.c
    1.36 02/05/27 16:12:53 venu@myvenu.com +12 -4

  connect.c
    1.30 02/05/27 16:12:53 venu@myvenu.com +5 -11

  cursor.c
    1.60 02/05/27 16:12:52 venu@myvenu.com +8 -3

  dll.c
    1.15 02/05/27 16:12:50 venu@myvenu.com +2 -2

# 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.59/cursor.c	Sun May 26 18:33:44 2002
+++ 1.60/cursor.c	Mon May 27 16:12:52 2002
@@ -1081,7 +1081,7 @@
 */
 
 static SQLRETURN SQL_API my_SQLSetPos(SQLHSTMT hstmt, SQLUSMALLINT irow,
-				      SQLUSMALLINT fOption,
+				      SQLUSMALLINT fOption, 
                                       SQLUSMALLINT fLock)
 {
   STMT FAR  *stmt=(STMT FAR*) hstmt;
@@ -1089,7 +1089,8 @@
   MYSQL_RES *result = stmt->result;
 
   DBUG_ENTER("SQLSetPos");
-  DBUG_PRINT("enter",("irow, fOption: %d   Lock: %d",irow,fOption,fLock));
+  DBUG_PRINT("enter",("irow: %d fOption: %s   Lock: %d",
+		      irow,dbug_pos_type(fOption),fLock));
 
   CLEAR_STMT_ERROR(stmt);
 
@@ -1126,7 +1127,11 @@
     stmt->cursor_row = stmt->current_row+irow;
     mysql_data_seek(result,stmt->cursor_row);
     stmt->current_values = result->data_cursor->data;
-    stmt->last_getdata_col=(uint)  ~0;; /* reset */ 
+    stmt->last_getdata_col=(uint)  ~0;; /* reset */     
+    if (stmt->fix_fields)
+      stmt->current_values=(*stmt->fix_fields)(stmt,stmt->current_values);
+    else
+      stmt->result_lengths=mysql_fetch_lengths(stmt->result);
     break;
   }
 

--- 1.29/connect.c	Sun May 26 18:33:45 2002
+++ 1.30/connect.c	Mon May 27 16:12:53 2002
@@ -50,7 +50,7 @@
 static void set_connect_defaults(DBC *dbc)
 {
 #ifndef DBUG_OFF
-  if (dbc->flag & FLAG_LOG_QUERY)
+  if (dbc->flag & FLAG_LOG_QUERY && !dbc->query_log)
     dbc->query_log=init_query_log();
 #endif
   /* Set STMT error prefix, one time */
@@ -72,11 +72,7 @@
   mysql_init(mysql);
 #ifndef DBUG_OFF
   if (option_flag & FLAG_DEBUG && ! _db_on_)
-#ifdef _UNIX_
-    mysql_debug("d:t:F:L:S:O,/tmp/myodbc.log");
-#else
-    mysql_debug("d:t:F:L:S:O,c::\\myodbc.log");
-#endif
+    init_dbug_log();
 #endif
 
   if (option_flag & (FLAG_FOUND_ROWS | FLAG_SAFE))
@@ -98,11 +94,9 @@
   if (init_stmt && init_stmt[0])
     mysql_options(mysql,MYSQL_INIT_COMMAND,init_stmt);
   if (connect_timeout)
-    mysql_options(mysql, MYSQL_OPT_CONNECT_TIMEOUT,(char*) &connect_timeout);
-  
-#ifndef DBUG_OFF
-  set_debug_version(option_flag,client_flag);
-#endif
+    mysql_options(mysql, MYSQL_OPT_CONNECT_TIMEOUT,(char*) &connect_timeout);  
+
+  DBUG_PRINT("info",("option_flag: %ld  client_flag: %ld\n\n", option_flag, client_flag));
   DBUG_RETURN(client_flag);
 }
 

--- 1.14/dll.c	Sun May 26 18:33:41 2002
+++ 1.15/dll.c	Mon May 27 16:12:50 2002
@@ -50,9 +50,9 @@
     DBUG_ENTER("myodbc_init");
 #ifdef LOG_ALL
 #ifdef _UNIX_
-    DBUG_PUSH("d:t:F:L:S:O,/tmp/myodbc.log");
+    DBUG_PUSH("d:t:S:O,/tmp/myodbc.log");
 #else
-    DBUG_PUSH("d:t:F:L:S:O,c::\\myodbc.log");
+    DBUG_PUSH("d:t:S:O,c::\\myodbc.log");
 #endif
 #else
     if (getenv("MYODBC_LOG") != NULL)

--- 1.35/info.c	Sun May 26 18:33:46 2002
+++ 1.36/info.c	Mon May 27 16:12:53 2002
@@ -171,11 +171,21 @@
     break;
 
   case SQL_CATALOG_NAME_SEPARATOR:
-    MYINFO_SET_STR_L(rgbInfoValue,cbInfoValueMax,pcbInfoValue,".",1);
+    if (dbc->flag & FLAG_NO_CATALOG) {
+      MYINFO_SET_STR_L(rgbInfoValue,cbInfoValueMax,pcbInfoValue,"",0);
+    }
+    else {      
+      MYINFO_SET_STR_L(rgbInfoValue,cbInfoValueMax,pcbInfoValue,".",1);
+    }
     break;
 
   case SQL_CATALOG_TERM:
-    MYINFO_SET_STR_L(rgbInfoValue,cbInfoValueMax,pcbInfoValue,"database",8);
+    if (dbc->flag & FLAG_NO_CATALOG) {
+      MYINFO_SET_STR_L(rgbInfoValue,cbInfoValueMax,pcbInfoValue,"",0); 
+    }
+    else  {
+      MYINFO_SET_STR_L(rgbInfoValue,cbInfoValueMax,pcbInfoValue,"database",8); 
+    }
     break;
 
   case SQL_CATALOG_USAGE:
@@ -293,8 +303,6 @@
     *((SQLUSMALLINT*) rgbInfoValue)=0L;
     *pcbInfoValue=sizeof(SQLUSMALLINT);
     break;
-
-  
 
   case SQL_CORRELATION_NAME:
     *((SQLSMALLINT*) rgbInfoValue)= SQL_CN_DIFFERENT;

--- 1.32/prepare.c	Sun May 26 18:33:48 2002
+++ 1.33/prepare.c	Mon May 27 16:12:54 2002
@@ -83,7 +83,7 @@
   {
     DBUG_RETURN(set_error(stmt,MYERR_S1001,NULL,4001));
   }
-  DBUG_PRINT("enter",("Query: %s",stmt->query));
+  DBUG_PRINT("enter",("%s",stmt->query));
 
   /* Count number of parameters and save position for each parameter */
   in_string=0;

--- 1.37/results.c	Sun May 26 18:33:49 2002
+++ 1.38/results.c	Mon May 27 16:12:54 2002
@@ -505,7 +505,7 @@
   SQLRETURN error;
   DBUG_ENTER("SQLBindCol");
   DBUG_PRINT("enter",
-       ("icol: %d  Type: %d  ValueMax: %ld  Valueptr: %lx  Value: %ld",
+       ("icol: %d  Type: %d  ValueMax: %ld  Valueptr: %lx  pcbValue: %ld",
         icol,fCType,(long) cbValueMax, pcbValue,
         (long) (pcbValue ? *pcbValue : 0L)));
 

--- 1.16/transact.c	Sun May 26 18:33:50 2002
+++ 1.17/transact.c	Mon May 27 16:12:55 2002
@@ -94,8 +94,8 @@
 {
   SQLRETURN result=SQL_SUCCESS;
   DBUG_ENTER("SQLEndTran");
-  DBUG_PRINT("enter",("type:%d,handle:%x,option:%d",HandleType,Handle,
-		      CompletionType));
+  DBUG_PRINT("enter",("type:%s,handle:%x,option:%d",
+            dbug_handle_type(HandleType),Handle,dbug_tran_type(CompletionType)));
 
   switch (HandleType) {
   case SQL_HANDLE_ENV:

--- 1.23/utility.c	Sun May 26 18:33:51 2002
+++ 1.24/utility.c	Mon May 27 16:12:55 2002
@@ -195,7 +195,7 @@
 
   else
   {
-    cbValueMax = cbValueMax - 1;
+    cbValueMax = cbValueMax ? cbValueMax - 1 : 0;
     *pcbValue = strlen(src);
   }
 
@@ -765,15 +765,80 @@
 {
   query_log ? fclose(query_log) : 0;
 }
-void set_debug_version(ulong option_flag,uint client_flag)
-{
+void init_dbug_log(void)
+{  
+#ifdef _UNIX_
+  DBUG_PUSH("d:t:S:O,/tmp/myodbc.log");
+#else
+  DBUG_PUSH("d:t:S:O,c::\\myodbc.log");
+#endif
   DBUG_PRINT("",("----------------------------------------------------------"));
   DBUG_PRINT("",("--      %s, VERSION: %s       --",DRIVER_NAME, DRIVER_VERSION));
   DBUG_PRINT("",("--                                                      --"));
   DBUG_PRINT("",("--                    DEBUG LOGGING                     --"));
   DBUG_PRINT("",("----------------------------------------------------------\n\n"));
-  DBUG_PRINT("info",("option_flag: %ld  client_flag: %ld\n\n", option_flag, client_flag));
 }
+const char *dbug_stmt_type(SQLUSMALLINT fOption)
+{
+  switch(fOption) {
+
+  case SQL_CLOSE:
+    return ("SQL_CLOSE");
+  case SQL_UNBIND:
+    return ("SQL_UNBIND");
+  case SQL_DROP:
+    return ("SQL_DROP");
+  case SQL_RESET_PARAMS:
+    return ("SQL_RESET_PARAMS");
+  case MYSQL_RESET_BUFFERS:
+    return ("MYSQL_RESET_BUFFERS");
+  case MYSQL_RESET:
+    return ("MYSQL_RESET");
+  default:
+    return ("INVALID_STMT_OPTION");
+  }
+}
+const char *dbug_pos_type(SQLUSMALLINT fOption)
+{
+  switch (fOption) {
+  case SQL_POSITION:
+    return ("SQL_POSITION");    
+  case SQL_DELETE:
+    return ("SQL_DELETE");
+  case SQL_UPDATE:
+    return ("SQL_UPDATE");
+  case SQL_ADD:
+    return ("SQL_ADD");
+  case SQL_REFRESH:
+    return ("SQL_REFRESH");
+  default:
+    return ("INVALID_POS_TYPE");
+  }
+} 
+const char *dbug_handle_type(SQLSMALLINT fOption)
+{
+  switch (fOption) {
+  case SQL_HANDLE_STMT:
+    return ("SQL_HANDLE_STMT");
+  case SQL_HANDLE_DBC:
+    return ("SQL_HANDLE_DBC");
+  case SQL_HANDLE_ENV:
+    return ("SQL_HANDLE_ENV");
+  default:
+    return ("INVALID_HANDLE_TYPE");
+  }
+} 
+const char *dbug_tran_type(SQLSMALLINT fOption)
+{
+  switch (fOption) {
+  case SQL_COMMIT:
+    return ("SQL_COMMIT");
+  case SQL_ROLLBACK:
+    return ("SQL_ROLLBACK");
+  default:
+    return ("INVALID_TRAN_TYPE");
+  }
+} 
 #else
 void query_print(char *query)
 {

--- 1.18/myutil.h	Sun May 26 18:33:52 2002
+++ 1.19/myutil.h	Mon May 27 16:12:56 2002
@@ -164,7 +164,12 @@
 void query_print(FILE *log_file,char *query);
 FILE *init_query_log(void);
 void end_query_log(FILE *query_log);
-void set_debug_version(ulong option_flag,uint client_flag);
+void init_dbug_log(void);
+const char *dbug_stmt_type(SQLUSMALLINT fOption);
+const char *dbug_pos_type(SQLUSMALLINT fOption);
+const char *dbug_handle_type(SQLSMALLINT fOption);
+const char *dbug_tran_type(SQLSMALLINT fOption);
+
 #endif
 
 #endif /* __MYUTIL_H__ */

--- 1.14/handle.c	Sun May 26 18:33:54 2002
+++ 1.15/handle.c	Mon May 27 16:12:56 2002
@@ -281,7 +281,7 @@
   STMT FAR *stmt=(STMT FAR*) hstmt;
   uint i;
   DBUG_ENTER("SQLFreeStmt");
-  DBUG_PRINT("enter",("stmt: %lx  option: %d",hstmt,fOption));
+  DBUG_PRINT("enter",("stmt: %lx  option: %s",hstmt,dbug_stmt_type(fOption)));
 
   if (fOption == SQL_UNBIND)
   {
@@ -381,7 +381,7 @@
 {
   SQLRETURN error = SQL_ERROR;
   DBUG_ENTER("SQLAllocHandle");
-  DBUG_PRINT("enter",("handle type: %d",HandleType));
+  DBUG_PRINT("enter",("handle type: %s",dbug_handle_type(HandleType)));
 
   switch (HandleType) {
   case SQL_HANDLE_ENV:
@@ -413,7 +413,7 @@
 {
   SQLRETURN error = SQL_ERROR;
   DBUG_ENTER("SQLFreeHandle");
-  DBUG_PRINT("enter",("handle type: %d",HandleType));
+  DBUG_PRINT("enter",("handle type: %s",dbug_handle_type(HandleType)));
 
   switch (HandleType) {
   case SQL_HANDLE_ENV:

---------------------------------------------------------------------
Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before
posting. To request this thread, e-mail myodbc-thread5545@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