Markus Hoenicka wrote: > Vikram Noel Ambrose writes: > > When I invoke dbi_result_get_string_idx on a column declared > > "VARCHAR(256) COLLATE 'binary'", libdbi complains that: "The requested > > variable type does not match what libdbi thinks it should be". > > > > I then tried using _get_binary_idx, but that seems to cause the next dbi > > call to segfault (_get_short_idx). I wasn't sure if dbi was giving me > > the '\0' character, so I called _get_field_length_idx and that just > > returns 0. I don't have any idea whats going on now. > > > > Has anyone else run into this? > > I've never tried things like this. Which driver do you use? > > regards, > Markus > >
This was on the mysql driver with mysql-5.1.37 on x86_64. I managed to work around the problem with get_binary_idx but its rather inconvenient to treat null terminated character strings as binary. Either mysql is telling libdbi that the field is binary or libdbi is getting confused somewhere. VARCHAR should be "string" regardless of the collation used. I wonder what would happen with another database. Vikram. ------------------------------------------------------------------------------ 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