-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ignore warnings still creating warnings object for result set warnings. #118
Comments
The following recreate illustrates the problem. java -Dcom.ibm.as400.access.Trace.category=ALL -jar jt400.jar "jdbc:as400:$AS400"";ignore warnings=01534,01004" $USER $PASSWORD No warning is returned to the application, but the trace still shows the warning object being created. |
Thanks for creating this issue! It'd also be nice to be able to suppress |
Code has been pushed and is out for review. You can specify all to suppress all warnings. You can download a version of the build from https://github.com/IBM/JTOpen/suites/15082534213/artifacts/861520773 Running the following recreate did not show any warnings being created. java -Dcom.ibm.as400.access.Trace.category=all -jar /QIBM/proddata/OS400/jt400/lib/jt400.jar 'jdbc:as400:localhost;ignore warnings=all' select date(table_cat) from sysibm.sqlcolumns fetch first 10 rows only |
The ignore warnings code is still creating the warnings object, even though it is ignored. The code in question is the following.
In JDServerRowCode is the following code.
Note that the warning object is always created.
The postWarning code doesn't post the warning, but the damage of the created warning object still occurred.
void postWarning(SQLWarning sqlWarning) {
/* Check to see if the warning should be ignored @q1a */
try {
if ((statement_ != null)
&& (statement_.getConnection() != null)
&& (((AS400JDBCConnection) statement_.getConnection())
.ignoreWarning(sqlWarning))) {
return;
}
}
The post warning method needs to be changes so that the warning object is created only as needed.
The text was updated successfully, but these errors were encountered: