Skip to content

Commit

Permalink
TEIIDDES-1525 added resultSet.next() boolean check before continuing
Browse files Browse the repository at this point in the history
  • Loading branch information
blafond committed Oct 31, 2012
1 parent 2697ef9 commit 6bcadfa
Showing 1 changed file with 4 additions and 2 deletions.
Expand Up @@ -330,8 +330,10 @@ private String getExecutionPlan( Statement stmt ) {
if (stmt != null) {
try {
ResultSet planRs = stmt.executeQuery("SHOW PLAN"); //$NON-NLS-1$
planRs.next();
executionPlan = planRs.getString("PLAN_XML"); //$NON-NLS-1$

if( planRs.next() ) {
executionPlan = planRs.getString("PLAN_XML"); //$NON-NLS-1$
}
} catch (SQLException e) {
String message = org.teiid.datatools.connectivity.ui.Messages.getString("TeiidAdHocScriptRunnable.getPlanError"); //$NON-NLS-1$
IStatus status = new Status(IStatus.ERROR, Activator.PLUGIN_ID, message, e);
Expand Down

0 comments on commit 6bcadfa

Please sign in to comment.