Vikram Noel Ambrose writes:
 > Yes of course. VARCHAR should be treated as NULL terminated character 
 > strings and not binary. As long as libdbi is consistent as to what it 
 > thinks a "VARCHAR(256) COLLATE 'binary'" refers to, then I'll be happy.
 > 

I've checked in a fixed version of dbd_mysql.c. I've also pasted in
the patch below. It should apply cleanly to previous versions as well,
as that part of the code hasn't been touched for a while. Vikram,
could you please check whether this fixes your problem?

regards,
Markus

--- dbd_mysql.c 2009/10/13 21:56:18     1.101
+++ dbd_mysql.c 2010/01/19 23:35:08     1.102
@@ -21,7 +21,7 @@
  * Copyright (C) 2001-2002, Mark Tobenkin <m...@brentwoodradio.com>
  * http://libdbi.sourceforge.net
  * 
- * $Id: dbd_mysql.c,v 1.101 2009/10/13 21:56:18 mhoenicka Exp $
+ * $Id: dbd_mysql.c,v 1.102 2010/01/19 23:35:08 mhoenicka Exp $
  */
 
 #ifdef HAVE_CONFIG_H
@@ -675,8 +675,6 @@
                        _attribs |= DBI_DATETIME_DATE | DBI_DATETIME_TIME;
                        break;
                        
-               case FIELD_TYPE_VAR_STRING:
-               case FIELD_TYPE_STRING:
                case FIELD_TYPE_TINY_BLOB:
                case FIELD_TYPE_MEDIUM_BLOB:
                case FIELD_TYPE_LONG_BLOB:
@@ -688,6 +686,8 @@
                                _type = DBI_TYPE_BINARY;
                                break;
                        }
+               case FIELD_TYPE_VAR_STRING:
+               case FIELD_TYPE_STRING:
 #ifdef FIELD_TYPE_NEWDECIMAL
                case FIELD_TYPE_NEWDECIMAL: // Precision math DECIMAL or 
NUMERIC field (MySQL 5.0.3 and up)
 #endif


-- 
Markus Hoenicka
http://www.mhoenicka.de
AQ score 38

------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
libdbi-users mailing list
libdbi-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libdbi-users

Reply via email to