Modified:
branches/branch_5_0/connector-j/src/com/mysql/jdbc/MysqlIO.java
Log:
Throw DataTruncation if the error is such.
Modified: branches/branch_5_0/connector-j/src/com/mysql/jdbc/MysqlIO.java
===================================================================
--- branches/branch_5_0/connector-j/src/com/mysql/jdbc/MysqlIO.java 2005-08-18 18:51:07 UTC (rev 4095)
+++ branches/branch_5_0/connector-j/src/com/mysql/jdbc/MysqlIO.java 2005-08-18 18:56:51 UTC (rev 4096)
@@ -2960,8 +2960,12 @@
errorBuf.append("\""); //$NON-NLS-1$
}
}
-
- throw new SQLException(errorBuf.toString(), xOpen, errno);
+
+ if (xOpen != null && xOpen.startsWith("22")) {
+ throw new MysqlDataTruncation(errorBuf.toString(), 0, true, false, 0, 0);
+ } else {
+ throw new SQLException(errorBuf.toString(), xOpen, errno);
+ }
}
serverErrorMessage = resultPacket.readString();
| Thread |
|---|
| • Connector/J commit: r4096 - branches/branch_5_0/connector-j/src/com/mysql/jdbc | mmatthews | 18 Aug |