From: SVN by r. <sv...@ca...> - 2008-08-22 07:51:26
|
Author: roy Date: 2008-08-22 09:51:14 +0200 (Fri, 22 Aug 2008) New Revision: 293 Modified: src/main/java/nl/improved/sqlclient/AbstractSQLShellWindow.java Log: made login dialog cause less problems (direct commands where still being executed in an other thread) Modified: src/main/java/nl/improved/sqlclient/AbstractSQLShellWindow.java =================================================================== --- src/main/java/nl/improved/sqlclient/AbstractSQLShellWindow.java 2008-08-19 20:32:51 UTC (rev 292) +++ src/main/java/nl/improved/sqlclient/AbstractSQLShellWindow.java 2008-08-22 07:51:14 UTC (rev 293) @@ -959,6 +959,19 @@ if (command == null) { return false; } + if (direct || !command.backgroundProcessSupported()) { + while (commandQueue.size() != 0) { + debug("Waiting for command queue to be cleared"); + try { + Thread.sleep(1000); + } catch (InterruptedException ex) { + Logger.getLogger(AbstractSQLShellWindow.class.getName()).log(Level.SEVERE, null, ex); + } + } + output(command.execute(sqlCommand)); + repaint(); + return true; + } commandQueue.add(new CommandInfo(sqlCommand, command)); return true; } @@ -1636,10 +1649,10 @@ if (columnType == Types.BINARY || columnType == Types.BLOB || columnType == Types.CLOB || - columnType == Types.LONGNVARCHAR || + //columnType == Types.LONGNVARCHAR || // jdk 1.6 columnType == Types.LONGVARBINARY || columnType == Types.LONGVARCHAR || - columnType == Types.NCLOB || + //columnType == Types.NCLOB || // jdk 1.6 columnType == Types.OTHER) { return true; } |