logo       

Re: Binary output on SHOW FULL PROCESSLIST: msg#00043

db.mysql.java

Subject: Re: Binary output on SHOW FULL PROCESSLIST

Thanks Mark for that.

So can I conclude, that the metadata for that field has changed in MySQLv5. The same code works if i point it to a MySQL4 datasource, but fails to display text, when pointed towards MySQL5.

Is that a correct assumption?

Mark Matthews wrote:
-----BEGIN PGP SIGNED MESSAGE-----
If I look at the metadata returned for this field, I see that the server
says that it is:

FIELD_TYPE_VAR_STRING, with a character set of "binary", with the
isBinary column flag set. Unfortunately, this is the _exact_ same
"fingerprint" the server uses for the BINARY/VARBINARY type, which by
the JDBC spec maps to byte[]. Thus if you use ResultSet.getObject(), you
will get the byte[] that represents the data. If you pass this to
something that .toStringifies it, you'll get the array "address", like
[B@nnnnnn on most JVMs.


--
MySQL Java Mailing List
For list archives: http://lists.mysql.com/java
To unsubscribe: http://lists.mysql.com/java?unsub=gcdmj-java@xxxxxxxxxxx




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise