Description:
Actually, getString() is returning the toString() version of the byte[], so stuff like "[B@77a748". It is definitely trying to return a byte array -- I have tested it by verifying the true-ness of this expression:
ResultSet.getObject(...) instanceof byte[]
The query in question is rather complex (and proprietary), so here is just the field definition with the GROUP_CONCAT expression:
GROUP_CONCAT( DISTINCT k.source ORDER BY k.created DESC SEPARATOR ', ' ) AS the_source
The "k" table is made up of varchars, chars, ints, and one TEXT column. The k.source column is defined thus:
`source` varchar(128) default NULL,
And k.created thus:
`created` int(10) unsigned NOT NULL default '0',
The group by/order by expressions look like this:
GROUP BY a.contact_id, f.staff_id, dcv.contact_vehicle_id
ORDER BY a.original_created DESC, b.last_name DESC, b.first_name DESC, a.contact_id DESC, k_created DESC, f.staff_id DESC
How to repeat:
I have no idea how to repeat this in a simple test case, but when I remove the GROUP_CONCAT expression and just pick a random k.source, everything works fine (i.e. getString("source") returns a proper String instead of gobbly-gook).
Description: Actually, getString() is returning the toString() version of the byte[], so stuff like "[B@77a748". It is definitely trying to return a byte array -- I have tested it by verifying the true-ness of this expression: ResultSet.getObject(...) instanceof byte[] The query in question is rather complex (and proprietary), so here is just the field definition with the GROUP_CONCAT expression: GROUP_CONCAT( DISTINCT k.source ORDER BY k.created DESC SEPARATOR ', ' ) AS the_source The "k" table is made up of varchars, chars, ints, and one TEXT column. The k.source column is defined thus: `source` varchar(128) default NULL, And k.created thus: `created` int(10) unsigned NOT NULL default '0', The group by/order by expressions look like this: GROUP BY a.contact_id, f.staff_id, dcv.contact_vehicle_id ORDER BY a.original_created DESC, b.last_name DESC, b.first_name DESC, a.contact_id DESC, k_created DESC, f.staff_id DESC How to repeat: I have no idea how to repeat this in a simple test case, but when I remove the GROUP_CONCAT expression and just pick a random k.source, everything works fine (i.e. getString("source") returns a proper String instead of gobbly-gook).