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/jdbc | mmatthews | 16 Jun |