-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Oliver Chua wrote:
> To be able to use subqueries, I'm now using mysql-4.1.2b-alpha-win.zip > I'm using mysql-connector-java-3.1.2-alpha.zip as my jdbc driver to connect > to the db... > > I'm selecting some columns from a table where the column is created using > mediumint. > Somehow, after creation, it becomes mediumint(9) > PreparedStatement.executeQuery throws SQLException. > > I'm thinking maybe the datatype is somehow not recognized. > > java.sql.SQLException: Unknown type '9 in column 0 of 3 in binary-encoded > result set. > at com.mysql.jdbc.MysqlIO.unpackBinaryResultSetRow(MysqlIO.java:3888) > at com.mysql.jdbc.MysqlIO.nextRow(MysqlIO.java:1211) > at com.mysql.jdbc.MysqlIO.readSingleRowSet(MysqlIO.java:2036) > at com.mysql.jdbc.MysqlIO.getResultSet(MysqlIO.java:395) > at com.mysql.jdbc.MysqlIO.readResultsForQueryOrUpdate(MysqlIO.java:1824) > at com.mysql.jdbc.MysqlIO.readAllResults(MysqlIO.java:1278) > at > com.mysql.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedStatement > .java:1283) > at > com.mysql.jdbc.ServerPreparedStatement.executeInternal(ServerPreparedStateme > nt.java:903) > at > com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1622) > ... > > Any ideas why this is happening? And any workaround available? > > Thanks in advance. Oliver, I went ahead and turned this into a bug report (http://bugs.mysql.com/bug.php?id=4311) It's now fixed, and will be in the 3.1.3 release of Connector/J. You can checkout a nightly snapshot build with the fix after 00:00 GMT on the 29th of June at http://downloads.mysql.com/snapshots.php (in the meantime, you could turn off server-side prepared statements with 'useServerPrepStmts=false' in your URL). Sorry for any hassle this has caused. -Mark - -- Mr. Mark Matthews MySQL AB, Software Development Manager, J2EE and Windows Platforms Office: +1 708 332 0507 www.mysql.com MySQL Guide to Lower TCO http://www.mysql.com/it-resources/white-papers/tco.php -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFA4EyatvXNTca6JD8RAtegAJ9QBLyAf4PqoFkNVHZjC3j9htiqDgCgxCL0 tThRw8qq0m1NO3ykKKyF4Xw= =g3If -----END PGP SIGNATURE----- -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]