diff --git a/src/main/gui/net/sf/jailer/ui/databrowser/sqlconsole/SQLConsole.form b/src/main/gui/net/sf/jailer/ui/databrowser/sqlconsole/SQLConsole.form index 793254cc1..11bbdea7a 100644 --- a/src/main/gui/net/sf/jailer/ui/databrowser/sqlconsole/SQLConsole.form +++ b/src/main/gui/net/sf/jailer/ui/databrowser/sqlconsole/SQLConsole.form @@ -232,13 +232,6 @@ - - - - - - - diff --git a/src/main/gui/net/sf/jailer/ui/databrowser/sqlconsole/SQLConsole.java b/src/main/gui/net/sf/jailer/ui/databrowser/sqlconsole/SQLConsole.java index 7d91c59a7..d78b45e85 100644 --- a/src/main/gui/net/sf/jailer/ui/databrowser/sqlconsole/SQLConsole.java +++ b/src/main/gui/net/sf/jailer/ui/databrowser/sqlconsole/SQLConsole.java @@ -411,11 +411,13 @@ private void executeSQL(final String sql, Status status, int statementStartOffse final CachedResultSet metaDataDetails = new CachedResultSet(resultSet, limit, session, SQLConsole.this); resultSet.close(); long now = System.currentTimeMillis(); + status.hasSelected = true; status.timeInMS += (now - startTime); localStatus.timeInMS += (now - startTime); status.numRowsRead += metaDataDetails.getSize(); localStatus.numRowsRead += metaDataDetails.getSize(); - if (metaDataDetails.getSize() >= limit) { + localStatus.hasSelected = true; + if (metaDataDetails.getSize() >= limit) { status.limitExceeded = true; localStatus.limitExceeded = true; } @@ -467,6 +469,7 @@ public void actionPerformed(ActionEvent e) { int updateCount = statement.getUpdateCount(); status.numRowsUpdated += updateCount; status.updateView(false); + status.hasUpdated = true; if (updateCount != 0) { setDataHasChanged(true); } @@ -553,6 +556,8 @@ private class Status { int numRowsRead; int numRowsUpdated; int numStatements; + boolean hasSelected = false; + boolean hasUpdated = false; long timeInMS; Throwable error; Pair location; @@ -656,14 +661,14 @@ private String getText() { if (numStatements > 1) { text += numStatements + " Statements. "; } - if (numRowsRead > 0 || numRowsUpdated == 0) { + if (hasSelected) { text += numRowsRead + " rows read"; if (limitExceeded) { text += " (limit exceeded)"; } text += ". "; } - if (numRowsUpdated > 0 || numRowsRead == 0) { + if (hasUpdated) { text += numRowsUpdated + " rows updated. "; } return text + "Elapsed time: " + (timeInMS / 1000.0) + " sec"; @@ -834,7 +839,6 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { jSplitPane1.setLeftComponent(jSplitPane2); - jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder("Result")); jPanel3.setLayout(new java.awt.BorderLayout()); jPanel3.add(jTabbedPane1, java.awt.BorderLayout.CENTER); diff --git a/src/main/gui/net/sf/jailer/ui/databrowser/sqlconsole/TabContentPanel.form b/src/main/gui/net/sf/jailer/ui/databrowser/sqlconsole/TabContentPanel.form index 012d5a148..c3de43795 100644 --- a/src/main/gui/net/sf/jailer/ui/databrowser/sqlconsole/TabContentPanel.form +++ b/src/main/gui/net/sf/jailer/ui/databrowser/sqlconsole/TabContentPanel.form @@ -47,7 +47,7 @@ - + diff --git a/src/main/gui/net/sf/jailer/ui/databrowser/sqlconsole/TabContentPanel.java b/src/main/gui/net/sf/jailer/ui/databrowser/sqlconsole/TabContentPanel.java index b06d5d4ae..a0f34efc6 100644 --- a/src/main/gui/net/sf/jailer/ui/databrowser/sqlconsole/TabContentPanel.java +++ b/src/main/gui/net/sf/jailer/ui/databrowser/sqlconsole/TabContentPanel.java @@ -78,7 +78,8 @@ private void initComponents() { gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 2; - gridBagConstraints.gridy = 3; + gridBagConstraints.gridy = 2; + gridBagConstraints.gridheight = 2; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; add(panel, gridBagConstraints); }// //GEN-END:initComponents