[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-10-21 3:00:36
[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.227 02/10/20 10:59:28 venu@myvenu.com +5 -0
  Fix SQLGetTypeInfo to return auto_increment type defs
  Fix to misc compilation errors from HP-UX 11
  Fix to handle SQL_TIME_STRUCT misc behaviour

  utility.c
    1.30 02/10/20 10:57:39 venu@myvenu.com +4 -0

  options.c
    1.33 02/10/20 10:57:38 venu@myvenu.com +5 -5

  info.c
    1.41 02/10/20 10:57:37 venu@myvenu.com +69 -19

  handle.c
    1.19 02/10/20 10:57:36 venu@myvenu.com +3 -4

  catalog.c
    1.22 02/10/20 10:57:34 venu@myvenu.com +9 -0

# 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/work/odbc/dev-3.51

--- 1.21/catalog.c	Sat Oct 12 20:40:52 2002
+++ 1.22/catalog.c	Sun Oct 20 10:57:34 2002
@@ -182,7 +182,11 @@
     pthread_mutex_unlock(&stmt->dbc->lock);
 
     if (!stmt->result)
+    {
+      DBUG_PRINT("error",("%d:%s", mysql_errno(&stmt->dbc->mysql),
+                         mysql_error(&stmt->dbc->mysql)));
       goto empty_set;
+    }
               
     stmt->order         =	SQLTABLES_qualifier_order;
     stmt->order_count   = array_elements(SQLTABLES_qualifier_order);
@@ -226,6 +230,7 @@
     stmt->result_array=(MYSQL_ROW) my_memdup((gptr)
SQLTABLES_type_values,
 
sizeof(SQLTABLES_type_values),
 					     MYF(0));
+    /* TODO : Fix this to return temporary table types  */
     stmt->result->row_count=1;
     mysql_link_fields(stmt,SQLTABLES_fields, SQLTABLES_FIELDS);
     my_free(type_buff,MYF(0));
@@ -258,7 +263,11 @@
     pthread_mutex_unlock(&stmt->dbc->lock);
   }
   if (!stmt->result)
+  {
+    DBUG_PRINT("error",("%d:%s", mysql_errno(&stmt->dbc->mysql),
+                         mysql_error(&stmt->dbc->mysql)));
     goto empty_set;
+  }
   
   SQLTABLES_values[0] = TableQualifier;
   stmt->order         =	SQLTABLES_order;

--- 1.40/info.c	Fri Oct 11 01:26:26 2002
+++ 1.41/info.c	Sun Oct 20 10:57:37 2002
@@ -887,23 +887,38 @@
 {
   /* SQL_BIT= -7 */
   {"bit",sql_bit,"1",NULL,NULL,NULL,sql_nullable,
-   "0",sql_searchable,"0","0","1","char(1)",NULL,NULL,sql_bit,NULL,
+   "0",sql_searchable,"0","0","0","char(1)",NULL,NULL,sql_bit,NULL,
+    NULL,NULL},
+  {"bit auto_increment",sql_bit,"1",NULL,NULL,NULL,sql_no_nulls,
+   "0",sql_searchable,"0","0","1","char(1) 
+ auto_increment",NULL,NULL,sql_bit,NULL,
     NULL,NULL},
 
   /* SQL_TINY= -6 */
   {"tinyint",sql_tinyint,"3",NULL,NULL,NULL,sql_nullable,
-   "0",sql_searchable,"0","0","1","tinyint",NULL,NULL,sql_tinyint,
+   "0",sql_searchable,"0","0","0","tinyint",NULL,NULL,sql_tinyint,
     NULL,"10",NULL},
   {"tinyint unsigned",sql_tinyint,"3",NULL,NULL,NULL,sql_nullable,
-   "0",sql_searchable,"1","0","1","tinyint unsigned",NULL,NULL,
+   "0",sql_searchable,"1","0","0","tinyint unsigned",NULL,NULL,
+    sql_tinyint,NULL,"10",NULL},
+  {"tinyint
auto_increment",sql_tinyint,"3",NULL,NULL,NULL,sql_no_nulls,
+   "0",sql_searchable,"0","0","1","tinyint
auto_increment",NULL,NULL,sql_tinyint,
+    NULL,"10",NULL},
+  {"tinyint unsigned
auto_increment",sql_tinyint,"3",NULL,NULL,NULL,sql_no_nulls,
+   "0",sql_searchable,"1","0","1","tinyint unsigned 
+ auto_increment",NULL,NULL,
     sql_tinyint,NULL,"10",NULL},
 
   /* SQL_BIGINT= -5 */
   {"bigint",sql_bigint,"19",NULL,NULL,NULL,sql_nullable,
-   "0",sql_searchable,"0","0","1","bigint",NULL,NULL,sql_bigint,
+   "0",sql_searchable,"0","0","0","bigint",NULL,NULL,sql_bigint,
     NULL,"10",NULL},
   {"bigint unsigned",sql_bigint,"20",NULL,NULL,NULL,sql_nullable,
-   "0",sql_searchable,"1","0","1","bigint
unsigned",NULL,NULL,sql_bigint,
+   "0",sql_searchable,"1","0","0","bigint
unsigned",NULL,NULL,sql_bigint,
+    NULL,"10",NULL},
+  {"bigint auto_increment",sql_bigint,"19",NULL,NULL,NULL,sql_no_nulls,
+   "0",sql_searchable,"0","0","1","bigint
auto_increment",NULL,NULL,sql_bigint,
+    NULL,"10",NULL},
+  {"bigint unsigned
auto_increment",sql_bigint,"20",NULL,NULL,NULL,sql_no_nulls,
+   "0",sql_searchable,"1","0","1","bigint unsigned 
+ auto_increment",NULL,NULL,sql_bigint,
     NULL,"10",NULL},
 
   /* SQL_LONGVARBINARY = -3 */
@@ -949,48 +964,78 @@
 
   /* SQL_INTEGER = 4 */
   {"integer",sql_integer,"10",NULL,NULL,NULL,sql_nullable,
-   "0",sql_searchable,"0","0","1","integer",NULL,NULL,sql_integer,
+   "0",sql_searchable,"0","0","0","integer",NULL,NULL,sql_integer,
    NULL,"10",NULL},
   {"integer unsigned",sql_integer,"10",NULL,NULL,NULL,sql_nullable,
-   "0",sql_searchable,"1","0","1","integer unsigned",NULL,NULL,
+   "0",sql_searchable,"1","0","0","integer unsigned",NULL,NULL,
     sql_integer,NULL,"10",NULL},
   {"int",sql_integer,"10",NULL,NULL,NULL,sql_nullable,
-   "0",sql_searchable,"0","0","1","integer",NULL,NULL,sql_integer,
+   "0",sql_searchable,"0","0","0","integer",NULL,NULL,sql_integer,
     NULL,"10",NULL},
   {"int unsigned",sql_integer,"10",NULL,NULL,NULL,sql_nullable,
-   "0",sql_searchable,"1","0","1","integer unsigned",NULL,NULL,
+   "0",sql_searchable,"1","0","0","integer unsigned",NULL,NULL,
     sql_integer,NULL,"10",NULL},
   {"mediumint",sql_integer,"7",NULL,NULL,NULL,sql_nullable,
-   "0",sql_searchable,"0","0","1","Medium integer",NULL,NULL,
+   "0",sql_searchable,"0","0","0","Medium integer",NULL,NULL,
     sql_integer,NULL,"10",NULL},
   {"mediumint unsigned",sql_integer,"8",NULL,NULL,NULL,sql_nullable,
-   "0",sql_searchable,"1","0","1","Medium integer unsigned",NULL,NULL,
+   "0",sql_searchable,"1","0","0","Medium integer unsigned",NULL,NULL,
+    sql_integer,NULL,"10",NULL},
+  {"integer
auto_increment",sql_integer,"10",NULL,NULL,NULL,sql_no_nulls,
+   "0",sql_searchable,"0","0","1","integer
auto_increment",NULL,NULL,sql_integer,
+   NULL,"10",NULL},
+  {"integer unsigned
auto_increment",sql_integer,"10",NULL,NULL,NULL,sql_no_nulls,
+   "0",sql_searchable,"1","0","1","integer unsigned
auto_increment",NULL,NULL,
+    sql_integer,NULL,"10",NULL},
+  {"int auto_increment",sql_integer,"10",NULL,NULL,NULL,sql_no_nulls,
+   "0",sql_searchable,"0","0","1","integer
auto_increment",NULL,NULL,sql_integer,
+    NULL,"10",NULL},
+  {"int unsigned
auto_increment",sql_integer,"10",NULL,NULL,NULL,sql_no_nulls,
+   "0",sql_searchable,"1","0","1","integer unsigned
auto_increment",NULL,NULL,
+    sql_integer,NULL,"10",NULL},  
+ {"mediumint",sql_integer,"7",NULL,NULL,NULL,sql_no_nulls,
+   "0",sql_searchable,"0","0","1","Medium integer
auto_increment",NULL,NULL,
+    sql_integer,NULL,"10",NULL},
+  {"mediumint unsigned",sql_integer,"8",NULL,NULL,NULL,sql_no_nulls,
+   "0",sql_searchable,"1","0","1","Medium integer unsigned 
+ auto_increment",NULL,NULL,
     sql_integer,NULL,"10",NULL},
 
   /* SQL_SMALLINT = 5 */
   {"smallint",sql_smallint,"5",NULL,NULL,NULL,sql_nullable,
-   "0",sql_searchable,"0","0","1","smallint",NULL,NULL,
+   "0",sql_searchable,"0","0","0","smallint",NULL,NULL,
     sql_smallint,NULL,"10",NULL},
   {"smallint unsigned",sql_smallint,"5",NULL,NULL,NULL,sql_nullable,
-   "0",sql_searchable,"1","0","1","smallint unsigned",NULL,NULL,
+   "0",sql_searchable,"1","0","0","smallint unsigned",NULL,NULL,
+    sql_smallint,NULL,"10",NULL},
+  {"smallint
auto_increment",sql_smallint,"5",NULL,NULL,NULL,sql_no_nulls,
+   "0",sql_searchable,"0","0","1","smallint auto_increment",NULL,NULL,
+    sql_smallint,NULL,"10",NULL},
+  {"smallint unsigned
auto_increment",sql_smallint,"5",NULL,NULL,NULL,sql_no_nulls,
+   "0",sql_searchable,"1","0","1","smallint unsigned 
+ auto_increment",NULL,NULL,
     sql_smallint,NULL,"10",NULL},
-  {"year",sql_smallint,"4",NULL,NULL,NULL,sql_nullable,
-   "0",sql_searchable,"0","0","0","year",NULL,NULL,sql_smallint,
-    NULL,"10",NULL},
 
   /* SQL_FLOAT = 6 */
   {"double",sql_float,"15",NULL,NULL,NULL,sql_nullable,
-   "0",sql_searchable,"0","0","1","double","0","4",sql_float,
+   "0",sql_searchable,"0","0","0","double","0","4",sql_float,
+   NULL,"2",NULL},
+  {"double auto_increment",sql_float,"15",NULL,NULL,NULL,sql_no_nulls,
+   "0",sql_searchable,"0","0","1","double 
+ auto_increment","0","4",sql_float,
    NULL,"2",NULL},
 
   /* SQL_REAL = 7 */
   {"float",sql_real,"7",NULL,NULL,NULL,sql_nullable,
-   "0",sql_unsearchable,"0","0","1","float","0","2",sql_float,
+   "0",sql_unsearchable,"0","0","0","float","0","2",sql_float,
+   NULL,"10",NULL},
+  {"float auto_increment",sql_real,"7",NULL,NULL,NULL,sql_no_nulls,
+   "0",sql_unsearchable,"0","0","1","float 
+ auto_increment","0","2",sql_float,
    NULL,"10",NULL},
 
   /* SQL_DOUBLE = 8 */
   {"double",sql_double,"15",NULL,NULL,NULL,sql_nullable,
-   "0",sql_searchable,"0","0","1","double","0","4",sql_double,
+   "0",sql_searchable,"0","0","0","double","0","4",sql_double,
+   NULL,"10",NULL},
+  {"double auto_increment",sql_double,"15",NULL,NULL,NULL,sql_no_nulls,
+   "0",sql_searchable,"0","0","1","double 
+ auto_increment","0","4",sql_double,
    NULL,"10",NULL},
 
   /* SQL_TYPE_DATE = 91 */
@@ -1002,6 +1047,11 @@
   {"time",sql_time,"6","'","'",NULL,sql_nullable,
    "0",sql_searchable,"0","0","0","time",NULL,NULL,sql_time,
     NULL,NULL,NULL},
+
+  /* YEAR - SQL_SMALLINT */
+  {"year",sql_smallint,"4",NULL,NULL,NULL,sql_nullable,
+   "0",sql_searchable,"0","0","0","year",NULL,NULL,sql_smallint,
+    NULL,"10",NULL},
 
   /* SQL_TYPE_TIMESTAMP = 93 */
   {"datetime",sql_timestamp,"21","'","'",NULL,sql_nullable,

--- 1.32/options.c	Sun Sep 29 09:03:55 2002
+++ 1.33/options.c	Sun Oct 20 10:57:38 2002
@@ -629,11 +629,11 @@
     break;
 
   case SQL_ATTR_PARAM_STATUS_PTR: /* need to support this ....*/
-    (SQLUSMALLINT *)ValuePtr = options->paramStatusPtr;
+    ValuePtr = (SQLUSMALLINT *)options->paramStatusPtr;
     break;
 
   case SQL_ATTR_PARAMS_PROCESSED_PTR: /* need to support this ....*/
-    (SQLUINTEGER *)ValuePtr = options->paramProcessedPtr;
+    ValuePtr = (SQLUSMALLINT *)options->paramProcessedPtr;
     break;
 
   case SQL_ATTR_PARAMSET_SIZE:
@@ -649,11 +649,11 @@
     break;
 
   case SQL_ATTR_ROW_OPERATION_PTR: /* need to support this ....*/
-    (SQLUSMALLINT *)ValuePtr = options->rowOperationPtr;
+    ValuePtr = (SQLUSMALLINT *)options->rowOperationPtr;
     break;
 
   case SQL_ATTR_ROW_STATUS_PTR:
-    (SQLUSMALLINT *)ValuePtr = options->rowStatusPtr;
+    ValuePtr = (SQLUSMALLINT *)options->rowStatusPtr;
     break;
 
   case SQL_ATTR_ROWS_FETCHED_PTR:
@@ -661,7 +661,7 @@
     break;
 
   case SQL_ATTR_SIMULATE_CURSOR:
-    *(SQLUINTEGER *)ValuePtr = options->simulateCursor;
+    ValuePtr = (SQLUSMALLINT *)options->simulateCursor;
     break;
 
     /*

--- 1.29/utility.c	Sun Sep 29 09:03:57 2002
+++ 1.30/utility.c	Sun Oct 20 10:57:39 2002
@@ -693,6 +693,10 @@
   }
   while (i < 3)
     date[i++]=0;
+  if (date[0] > 10000L)			   /* Properly handle
HHMMSS format */
+    return (ulong) date[0];
+  else if (date[0] > 100)      /* Properly handle HHMM format */
+    return (ulong) date[0]*100;
   return (ulong) date[0]*10000L + (ulong) (date[1]*100+date[2]);  }
 

--- 1.18/handle.c	Mon Sep 30 13:39:00 2002
+++ 1.19/handle.c	Sun Oct 20 10:57:36 2002
@@ -153,7 +153,8 @@
   penv->connections=list_add(penv->connections,&dbc->list);
   dbc->list.data=dbc;   
   /* If ODBC2, then initialize ODBC2 behaviour */
-  penv->odbc_ver == SQL_OV_ODBC2 ? myodbc_ov2_init() : 0;
+  if (penv->odbc_ver == SQL_OV_ODBC2)  
+    myodbc_ov2_init();
   pthread_mutex_init(&dbc->lock,NULL);
   return (SQL_SUCCESS);
 }
@@ -367,9 +368,7 @@
 #ifndef _UNIX_
   GlobalUnlock (GlobalHandle ((HGLOBAL) hstmt));
   GlobalFree (GlobalHandle((HGLOBAL) hstmt));
-#endif /* !_UNIX_ */
-
-#ifdef _UNIX_
+#else
   my_free((char*) hstmt,MYF(0));
 #endif /* _UNIX_*/
   DBUG_RETURN_STATUS(SQL_SUCCESS);



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/products/myodbc/manual_toc.html (the manual)
   http://lists.mysql.com/                        (the list archive)

To request this thread, e-mail <myodbc-thread6257@lists.mysql.com>
To unsubscribe, e-mail <myodbc-unsubscribe-##L=##H@lists.mysql.com>

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

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