bk commit - MyODBC 3.51 (1.509)
am 17.09.2005 00:51:24 von bdegtyariovBelow is the list of changes that have just been commited into a local
MyODBC 3.51 repository of 'bdegtyariov'. When 'bdegtyariov' 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.509
ChangeSet
1.509 05/09/17 01:51:22 bdegtyariov@suse3000. +1 -0
utility.c:
Fix for SQLDescribeCol. It should return length in characters for multibyte strings
driver/utility.c
1.55 05/09/17 01:39:18 bdegtyariov@suse3000. +26 -13
Fix for SQLDescribeCol. It should return length in characters for multibyte strings
# 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: bdegtyariov
# Host: suse3000.
# Root: /home/bdegtyariov/Repository5/myodbc-3.51
--- 1.54/driver/utility.c 2005-08-19 12:28:44 +03:00
+++ 1.55/driver/utility.c 2005-09-17 01:39:18 +03:00
@@ -19,14 +19,14 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/*********************************************************** ****************
- * UTILITY.C *
- * *
- * @description: Utility functions *
- * *
+ * UTILITY.C *
+ * *
+ * @description: Utility functions *
+ * *
* @author : MySQL AB(monty@mysql.com, venu@mysql.com) *
- * @date : 2001-Aug-15 *
- * @product : myodbc3 *
- * *
+ * @date : 2001-Aug-15 *
+ * @product : myodbc3 *
+ * *
************************************************************ ****************/
#include "myodbc3.h"
@@ -535,7 +535,9 @@
return SQL_BINARY;
}
*/
- *transfer_length= *precision= *display_size= field->length ? field->length: 255;
+ *transfer_length= *precision= *display_size= field->length ?
+ (stmt->dbc->mysql.charset ?
+ field->length/stmt->dbc->mysql.charset->mbmaxlen: field->length): 255;
if ( buff ) strmov(buff,"char");
return SQL_CHAR;
@@ -547,7 +549,10 @@
return SQL_VARBINARY;
}
*/
- *transfer_length= *precision= *display_size= field->length ? field->length: 255;
+ *transfer_length= *precision= *display_size= field->length ?
+ (stmt->dbc->mysql.charset ?
+ field->length/stmt->dbc->mysql.charset->mbmaxlen: field->length): 255;
+
if ( buff ) strmov(buff,"varchar");
return SQL_VARCHAR;
@@ -555,14 +560,18 @@
if ( buff )
strmov(buff,(field_is_binary) ? "tinyblob" : "tinytext");
if ( stmt->dbc->flag & (FLAG_FIELD_LENGTH | FLAG_SAFE) )
- *transfer_length= *precision= *display_size= field->length ? field->length: 255;
+ *transfer_length= *precision= *display_size= field->length ?
+ (stmt->dbc->mysql.charset ?
+ field->length/stmt->dbc->mysql.charset->mbmaxlen: field->length): 255;
return(field_is_binary) ? SQL_LONGVARBINARY : SQL_LONGVARCHAR;
case FIELD_TYPE_BLOB:
if ( buff )
strmov(buff,(field_is_binary) ? "blob" : "text");
if ( stmt->dbc->flag & (FLAG_FIELD_LENGTH | FLAG_SAFE) )
- *transfer_length= *precision= *display_size= field->length ? field->length: 65535;
+ *transfer_length= *precision= *display_size= field->length ?
+ (stmt->dbc->mysql.charset ?
+ field->length/stmt->dbc->mysql.charset->mbmaxlen: field->length): 65535;
return(field_is_binary) ? SQL_LONGVARBINARY : SQL_LONGVARCHAR;
case FIELD_TYPE_MEDIUM_BLOB:
@@ -570,14 +579,18 @@
strmov(buff,((field_is_binary) ? "mediumblob" :
"mediumtext"));
if ( stmt->dbc->flag & (FLAG_FIELD_LENGTH | FLAG_SAFE) )
- *transfer_length= *precision= *display_size= field->length ? field->length: (1L << 24)-1L;
+ *transfer_length= *precision= *display_size= field->length ?
+ (stmt->dbc->mysql.charset ?
+ field->length/stmt->dbc->mysql.charset->mbmaxlen: field->length): (1L << 24)-1L;
return(field_is_binary) ? SQL_LONGVARBINARY : SQL_LONGVARCHAR;
case FIELD_TYPE_LONG_BLOB:
if ( buff )
strmov(buff,((field_is_binary) ? "longblob": "longtext"));
if ( stmt->dbc->flag & (FLAG_FIELD_LENGTH | FLAG_SAFE) )
- *transfer_length= *precision= *display_size= field->length ? field->length: INT_MAX32;
+ *transfer_length= *precision= *display_size= field->length ?
+ (stmt->dbc->mysql.charset ?
+ field->length/stmt->dbc->mysql.charset->mbmaxlen: field->length): INT_MAX32;
return(field_is_binary) ? SQL_LONGVARBINARY : SQL_LONGVARCHAR;
case FIELD_TYPE_ENUM:
--
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