星期一, 三月 30, 2009

MYSQL JDBC CachedRowSetImpl 临时表错误

问题:
In a stored procedure, if a result set is selected from a temporary table and then
deleted, a MySQLSyntaxErrorException occurs from the driver trying to perform SHOW FULL
COLUMNS on the non-existent temporary table.

解决方法:在mysql URL 里加入:
"useDynamicCharsetInfo=false"

Jboss deploy/mysql-ds.xml里加入如下语句:

<connection-url>jdbc:mysql://localhost:3306/mrp?useUnicode=TRUE</connection-url>
<connection-property name="characterEncoding">utf8</connection-property>
<connection-property name="useDynamicCharsetInfo">false</connection-property>