true, stmt, true);
}
}
DataTruncation truncated = stmt.getTruncationWarnings();
if (truncated != null) {
// Some of the data was truncated, so we need to add a
// truncation warning. Save a copy of the row data, then move
// back to the SQLCAGRP section and overwrite it with the new
// warnings, and finally re-insert the row data after the new
// SQLCAGRP section.
byte[] data = writer.getBufferContents(sqlcagrpEnd);
writer.setBufferPosition(sqlcagrpStart);
if (sqlw != null) {
truncated.setNextWarning(sqlw);
}
writeSQLCAGRP(truncated, CodePoint.SVRCOD_WARNING, 1, -1);
writer.writeBytes(data);
stmt.clearTruncationWarnings();
}