Howdy - 

I am using the C API and am returning a result set from a table with a BLOB
type item in it.

When I populate the BLOB fields initially (with all the same data) the
length is returned properly when I issue SELECT * FROM <table> and decode
the result set column metadata.
Meaning, that if I put , "This Blob's for you!" in the column, the value of
MYSQL_FIELDS.length = 65535 (max of BLOB type) and MYSQL_FIELDS.max_length =
21.  
When I update a few rows and put, "That's OK man, but you still can't have
my BLOB!" in a few columns, the values for the length of the fields are
returned funny, or at least, I don't understand why they are returning they
way they are.
Meaning the value of the new column length are all set to
MYSQL_FIELDS.length = 65535 (again, max of BLOB type) and
MYSQL_FIELDS.max_length = 49.  Problem is, this is even on the unchaged
rows!  Yuk!
A little experimentation showed that if I select on only unchanged rows, the
length is returned as 21.  But, if the result set has one of the changed
rows in it, the length of all blob fields is returned as 49, when (at least
to me) it should be 21 or 49.
In other words, it returns as the BLOB max_length value the value of the
longest blob in the result set, NOT the max_length of each row.  
I inserted (and updated) some records in the table with BLOB contents "It's
all about the BLOB" and I see the same result.  It returns not the length of
the BLOB for the row, but the length of the longest BLOB field in the result
set.  
We are running MySQL 3.23.46-Max on RedHat 7.2 Question:
1)      How do I get the actual length of the BLOB column in the row,
without storing a separate column to maintain BLOB length manually?


        > "Have A Great Scouting Day"
        > Ken Hylton
        > 7826 Falcon Ridge Drive
        > San Antonio, Texas 78239-4032
        > 210-646-9508 (home)
        > 210-949-7261 (work)
        > 210-949-7254 (fax)
        > 210-287-6756 (cell)
        > [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 
        > [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> 


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

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to