Modified:
branches/branch_3_1/connector-j/CHANGES
branches/branch_3_1/connector-j/src/com/mysql/jdbc/DatabaseMetaData.java
Log:
Fixed NullPointerException when converting "catalog" parameter
in many DatabaseMetaDataMethods to byte[]s (for the result set)
when the parameter is null. ("null" isn't technically allowed
by the JDBC specification, but we've historically allowed it).
Modified: branches/branch_3_1/connector-j/CHANGES
===================================================================
--- branches/branch_3_1/connector-j/CHANGES 2005-09-21 00:06:51 UTC (rev 4286)
+++ branches/branch_3_1/connector-j/CHANGES 2005-09-21 18:20:03 UTC (rev 4287)
@@ -1,7 +1,7 @@
# Changelog
# $Id$
-07-xx-05 - Version 3.1.11-stable
+09-xx-05 - Version 3.1.11-stable
- Fixed BUG#11629 - Spurious "!" on console when character
encoding is "utf8".
@@ -142,6 +142,16 @@
thrown whenever a method that required a connection reference
was called.
+ - Backport of Field class, ResultSetMetaData.getColumnClassName(),
+ and ResultSet.getObject(int) changes from 5.0 branch to fix
+ behavior surrounding VARCHAR BINARY/VARBINARY and related
+ types.
+
+ - Fixed NullPointerException when converting "catalog" parameter
+ in many DatabaseMetaDataMethods to byte[]s (for the result set)
+ when the parameter is null. ("null" isn't technically allowed
+ by the JDBC specification, but we've historically allowed it).
+
06-23-05 - Version 3.1.10-stable
- Fixed connecting without a database specified raised an exception
Modified: branches/branch_3_1/connector-j/src/com/mysql/jdbc/DatabaseMetaData.java
===================================================================
--- branches/branch_3_1/connector-j/src/com/mysql/jdbc/DatabaseMetaData.java 2005-09-21 00:06:51 UTC (rev 4286)
+++ branches/branch_3_1/connector-j/src/com/mysql/jdbc/DatabaseMetaData.java 2005-09-21 18:20:03 UTC (rev 4287)
@@ -1158,7 +1158,8 @@
try {
paramRetrievalStmt = this.conn.getMetadataSafeStatement();
- if (this.conn.lowerCaseTableNames()) {
+ if (this.conn.lowerCaseTableNames() && catalog != null
+ && catalog.length() != 0) {
// Workaround for bug in server wrt. to
// SHOW CREATE PROCEDURE not respecting
// lower-case table names
@@ -6247,6 +6248,10 @@
* @return DOCUMENT ME!
*/
private byte[] s2b(String s) throws SQLException {
+ if (s == null) {
+ return null;
+ }
+
if ((this.conn != null) && this.conn.getUseUnicode()) {
try {
String encoding = this.conn.getEncoding();
| Thread |
|---|
| • Connector/J commit: r4287 - in branches/branch_3_1/connector-j: . src/com/mysql/jdbc | mmatthews | 21 Sep |