List:Commits« Previous MessageNext Message »
From:mmatthews Date:September 4 2007 7:48pm
Subject:Connector/J commit: r6549 - in branches/branch_5_0/connector-j: . src/com/mysql/jdbc
View as plain text  
Modified:
   branches/branch_5_0/connector-j/CHANGES
   branches/branch_5_0/connector-j/src/com/mysql/jdbc/Connection.java
Log:
Fixed BUG#27182 - Connection.getServerCharacterEncoding() doesn't work
      for servers with version >= 4.1.

Modified: branches/branch_5_0/connector-j/CHANGES
===================================================================
--- branches/branch_5_0/connector-j/CHANGES	2007-09-04 17:41:10 UTC (rev 6548)
+++ branches/branch_5_0/connector-j/CHANGES	2007-09-04 17:48:14 UTC (rev 6549)
@@ -45,6 +45,9 @@
       that the driver will now report all paramters as "IN" paramters
       but allow callers to call registerOutParameter() on them without throwing
       an exception.
+      
+    - Fixed BUG#27182 - Connection.getServerCharacterEncoding() doesn't work
+      for servers with version >= 4.1.
 
 07-19-07 - Version 5.0.7
 

Modified: branches/branch_5_0/connector-j/src/com/mysql/jdbc/Connection.java
===================================================================
--- branches/branch_5_0/connector-j/src/com/mysql/jdbc/Connection.java	2007-09-04 17:41:10
UTC (rev 6548)
+++ branches/branch_5_0/connector-j/src/com/mysql/jdbc/Connection.java	2007-09-04 17:48:14
UTC (rev 6549)
@@ -3777,7 +3777,11 @@
 	 * @return the server's character set.
 	 */
 	protected String getServerCharacterEncoding() {
-		return (String) this.serverVariables.get("character_set");
+		if (this.io.versionMeetsMinimum(4, 1, 0)) {
+			return (String) this.serverVariables.get("character_set_server");
+		} else {
+			return (String) this.serverVariables.get("character_set");
+		}
 	}
 
 	int getServerMajorVersion() {

Thread
Connector/J commit: r6549 - in branches/branch_5_0/connector-j: . src/com/mysql/jdbcmmatthews4 Sep