Re: [libdbi-users] dbi_result_get_ulonglong overflow

2010-01-08 Thread Vikram Noel Ambrose
Vikram Noel Ambrose wrote: I can't seem to read back BIGINT UNSIGNED (8bytes) from a mysql database. For example: A value of 10988581603938712255 = 0x987F48BFB028BABF is returned as 9223372036854775807 = 0x7FFF Something somewhere is capping off my BIGINT UNSIGNED

[libdbi-users] dbi_result_get_string_idx fails on VARCHAR COLLATE 'binary'

2010-01-15 Thread Vikram Noel Ambrose
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

Re: [libdbi-users] dbi_result_get_string_idx fails on VARCHAR COLLATE 'binary'

2010-01-16 Thread Vikram Noel Ambrose
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

Re: [libdbi-users] dbi_result_get_string_idx fails on VARCHAR COLLATE 'binary'

2010-01-17 Thread Vikram Noel Ambrose
Markus Hoenicka wrote: Vikram Noel Ambrose writes: Either mysql is telling libdbi that the field is binary or libdbi is getting confused somewhere. Could you please insert a call to dbi_result_get_field_type_idx() to see what mysql thinks this is? It returns type 4. Which

Re: [libdbi-users] dbi_result_get_string_idx fails on VARCHAR COLLATE 'binary'

2010-01-18 Thread Vikram Noel Ambrose
Toby Thain wrote: On 18-Jan-10, at 7:38 PM, Markus Hoenicka wrote: Markus Hoenicka writes: information. This check simply looks spurious to me: if(field-charsetnr == 63) It probably isn't as wrong as I thought initially. MySQL gurus, please correct me if I'm wrong, but I

Re: [libdbi-users] dbi_result_get_string_idx fails on VARCHAR COLLATE 'binary'

2010-01-20 Thread Vikram Noel Ambrose
Markus Hoenicka wrote: 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