~mark-matthews-a/connectorj/trunk

« back to all changes in this revision

Viewing changes to src/com/mysql/jdbc/MysqlIO.java

  • Committer: markm at sun
  • Date: 2009-08-20 20:21:49 UTC
  • Revision ID: markm@sun.com-20090820202149-m0gs16108sswurzl
Fixed Bug#44324 - Data truncation exceptions did not return the vendor error code from the server. Note that the vendor error code is not hard-coded to 1265 as in the bug report, because the server returns different error codes for different types of truncations, and we did not want to mask those.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3553
3553
                appendInnodbStatusInformation(xOpen, errorBuf);
3554
3554
 
3555
3555
                if (xOpen != null && xOpen.startsWith("22")) {
3556
 
                        throw new MysqlDataTruncation(errorBuf.toString(), 0, true, false, 0, 0);
 
3556
                        throw new MysqlDataTruncation(errorBuf.toString(), 0, true, false, 0, 0, errno);
3557
3557
                } else {
3558
3558
                        throw SQLError.createSQLException(errorBuf.toString(), xOpen, errno, getExceptionInterceptor());
3559
3559
                }