List:Commits« Previous MessageNext Message »
From:mmatthews Date:June 16 2006 5:38pm
Subject:Connector/J commit: r5398 - branches/branch_5_0/connector-j/src/com/mysql/jdbc
View as plain text  
Modified:
   branches/branch_5_0/connector-j/src/com/mysql/jdbc/Buffer.java
Log:
Missed commit for last bugfix.

Modified: branches/branch_5_0/connector-j/src/com/mysql/jdbc/Buffer.java
===================================================================
--- branches/branch_5_0/connector-j/src/com/mysql/jdbc/Buffer.java	2006-06-16 17:12:26 UTC (rev 5397)
+++ branches/branch_5_0/connector-j/src/com/mysql/jdbc/Buffer.java	2006-06-16 17:38:04 UTC (rev 5398)
@@ -620,6 +620,18 @@
 		writeStringNoNull(s);
 		this.byteBuffer[this.position++] = 0;
 	}
+	
+	//	 Write null-terminated string in the given encoding
+	final void writeString(String s, String encoding) throws SQLException {
+		ensureCapacity((s.length() * 2) + 1);
+		try {
+			writeStringNoNull(s, encoding, encoding, false);
+		} catch (UnsupportedEncodingException ue) {
+			throw new SQLException(ue.toString(), SQLError.SQL_STATE_GENERAL_ERROR);
+		}
+		
+		this.byteBuffer[this.position++] = 0;
+	}
 
 	// Write string, with no termination
 	final void writeStringNoNull(String s) throws SQLException {

Thread
Connector/J commit: r5398 - branches/branch_5_0/connector-j/src/com/mysql/jdbcmmatthews16 Jun