Modified:
branches/branch_3_1/connector-j/src/com/mysql/jdbc/MysqlIO.java
Log:
Throw DataTruncation if the error is such.
Modified: branches/branch_3_1/connector-j/src/com/mysql/jdbc/MysqlIO.java
===================================================================
--- branches/branch_3_1/connector-j/src/com/mysql/jdbc/MysqlIO.java 2005-08-18 14:17:45 UTC (rev 4094)
+++ branches/branch_3_1/connector-j/src/com/mysql/jdbc/MysqlIO.java 2005-08-18 18:51:07 UTC (rev 4095)
@@ -52,6 +52,7 @@
import java.security.NoSuchAlgorithmException;
+import java.sql.DataTruncation;
import java.sql.SQLException;
import java.util.ArrayList;
@@ -2917,7 +2918,11 @@
}
}
- 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: r4095 - branches/branch_3_1/connector-j/src/com/mysql/jdbc | mmatthews | 18 Aug |