failure scenario:
Informix 10
user/pw: informix / [password]
Host: 10.168.11.37:1526
instance/database: ol_w2ksrv37
After registering this server drag and drop it from the Server tree to the shortcut menu bar. click the connection in the shortcut toolbar.
the database chosen is sysmaster. sysmaster has tables and if you try to run a query from the window you get the following error: Database not selected yet.
example:
select * from informix.flags_text
>•[Error] •Script lines: 1-3 ------------------------ Database not selected yet.
•[Executed: 4/14/2011 2:18:09 PM] [Execution: 0•ms]
|
85 KB
java.sql.SQLException: Database not selected yet.
at com.informix.util.IfxErrMsg.getSQLException(IfxErrMsg.java:408)
at com.informix.jdbc.IfxSqli.a(IfxSqli.java:3461)
at com.informix.jdbc.IfxSqli.E(IfxSqli.java:3774)
at com.informix.jdbc.IfxSqli.dispatchMsg(IfxSqli.java:2580)
at com.informix.jdbc.IfxSqli.receiveMessage(IfxSqli.java:2496)
at com.informix.jdbc.IfxSqli.executeStatementQuery(IfxSqli.java:1662)
at com.informix.jdbc.IfxSqli.executeStatementQuery(IfxSqli.java:1635)
at com.informix.jdbc.IfxResultSet.a(IfxResultSet.java:206)
at com.informix.jdbc.IfxStatement.executeQueryImpl(IfxStatement.java:1229)
at com.informix.jdbc.IfxStatement.executeQuery(IfxStatement.java:219)
at \\...\\ .\\हिñçêČάй語简�?한\\.Zꇶꄯꇔᜧ finally.a(Unknown Source)
at \\...\\ .\\हिñçêČάй語简�?한\\.Zꇶꄯꇔᜧ finally.a(Unknown Source)
at \\...\\ .\\हिñçêČάй語简�?한\\.Zꇶꄯꇔᜧ finally.a(Unknown Source)
at com.aquafold.aquaeditor.sql.SQLStdCompletionQuery.queryCompletionOnType(Unknown Source)
at \\...\\ .\\हिñçêČάй語简�?한\\.Z̪ꑞ⡭ꐉ interface.query(Unknown Source)
at org.netbeans.spi.editor.completion.support.AsyncCompletionTask.run(AsyncCompletionTask.java:218)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572)
at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997)
Caused by: java.sql.SQLException
at com.informix.util.IfxErrMsg.getSQLException(IfxErrMsg.java:408)
at com.informix.jdbc.IfxSqli.E(IfxSqli.java:3779)
... 15 more
also autocompletion not working for sysmaster
also autocompletion not working for sysmaster
DirConnectionNode.getDatabase() for that server reports "ol_w2ksrv37" or "ol_w2ksrv37/sysmaster", instead of "sysmaster".
see QueryAnalyzer : 182
The code won't work until ConnectionProperties.getDatabase() returns the database name instead of an instance (?) name or instance/database combo.
Reassinging to Niels.
DirConnectionNode.getDatabase() for that server reports "ol_w2ksrv37" or "ol_w2ksrv37/sysmaster", instead of "sysmaster".
see QueryAnalyzer : 182
The code won't work until ConnectionProperties.getDatabase() returns the database name instead of an instance (?) name or instance/database combo.
Reassinging to Niels.
Please code review SVN# 20369 :
public String getDatabase()
{
// Comment by Niels : We have reached the top node of a server registration, so there is no database context
// and thus we return "null" to indicate no database context. But, in the case of Informix we need to force
// a database context because Informix is the only vendor which have an unset database context on the server.
// By returning "sysmaster" for Informix, we force the Query Window to initialize the database context to
// sysmaster.
if(cp != null)
{
if ( cp.isInformix() )
{
return "sysmaster";
}
else
{
// Comment by Niels : Yes, this is "null" to tell the Query Window not to initialize the database context.
return null;
}
}
return null;
}
Please code review SVN# 20369 :
public String getDatabase()
{
// Comment by Niels : We have reached the top node of a server registration, so there is no database context
// and thus we return "null" to indicate no database context. But, in the case of Informix we need to force
// a database context because Informix is the only vendor which have an unset database context on the server.
// By returning "sysmaster" for Informix, we force the Query Window to initialize the database context to
// sysmaster.
if(cp != null)
{
if ( cp.isInformix() )
{
return "sysmaster";
}
else
{
// Comment by Niels : Yes, this is "null" to tell the Query Window not to initialize the database context.
return null;
}
}
return null;
}
This is a scary change - but it seems to work. I am afraid it will backfire somewhere else later.
But fixes the current issue.
This is a scary change - but it seems to work. I am afraid it will backfire somewhere else later.
But fixes the current issue.
1. to reproduce: set up an informix server with Instance/database XX/demo.
2. double click on the server node to open a query window - the database is demo (correct)
3. drag the server node to the shortcut toolbar.
4. click on the shortcut - the database is sysmaster (incorrect).
1. to reproduce: set up an informix server with Instance/database XX/demo.
2. double click on the server node to open a query window - the database is demo (correct)
3. drag the server node to the shortcut toolbar.
4. click on the shortcut - the database is sysmaster (incorrect).
Reworked this code again. Please re-test all the possible scenarios (#5544).
Reworked this code again. Please re-test all the possible scenarios (#5544).
This occurs when you kill ADS from Task Manager
Scenario 7 in 5544 for informix doesnt work
Tests for 4 query window with Shortcut + Change Database + Save window
1. Create Shortcut for 4 database in informix server
2. Open the 4 different shortcuts and then change all 4 dropdowns to the same database
3. Kill ADS from task manager and restart
4. When ADS restarts it doesnt save the changed Database
This occurs when you kill ADS from Task Manager
Scenario 7 in 5544 for informix doesnt work
Tests for 4 query window with Shortcut + Change Database + Save window
1. Create Shortcut for 4 database in informix server
2. Open the 4 different shortcuts and then change all 4 dropdowns to the same database
3. Kill ADS from task manager and restart
4. When ADS restarts it doesnt save the changed Database
The last comment is an unrelated issue.
Added saving tabs on user changing current database from the query panel pulldown.
The last comment is an unrelated issue.
Added saving tabs on user changing current database from the query panel pulldown.
Issue #5610 |
Closed |
Fixed |
Resolved |
Completion |
No due date |
No fixed build |
No time estimate |
java.sql.SQLException: Database not selected yet.
at com.informix.util.IfxErrMsg.getSQLException(IfxErrMsg.java:408)
at com.informix.jdbc.IfxSqli.a(IfxSqli.java:3461)
at com.informix.jdbc.IfxSqli.E(IfxSqli.java:3774)
at com.informix.jdbc.IfxSqli.dispatchMsg(IfxSqli.java:2580)
at com.informix.jdbc.IfxSqli.receiveMessage(IfxSqli.java:2496)
at com.informix.jdbc.IfxSqli.executeStatementQuery(IfxSqli.java:1662)
at com.informix.jdbc.IfxSqli.executeStatementQuery(IfxSqli.java:1635)
at com.informix.jdbc.IfxResultSet.a(IfxResultSet.java:206)
at com.informix.jdbc.IfxStatement.executeQueryImpl(IfxStatement.java:1229)
at com.informix.jdbc.IfxStatement.executeQuery(IfxStatement.java:219)
at \\...\\ .\\हिñçêČάй語简�?한\\.Zꇶꄯꇔᜧ finally.a(Unknown Source)
at \\...\\ .\\हिñçêČάй語简�?한\\.Zꇶꄯꇔᜧ finally.a(Unknown Source)
at \\...\\ .\\हिñçêČάй語简�?한\\.Zꇶꄯꇔᜧ finally.a(Unknown Source)
at com.aquafold.aquaeditor.sql.SQLStdCompletionQuery.queryCompletionOnType(Unknown Source)
at \\...\\ .\\हिñçêČάй語简�?한\\.Z̪ꑞ⡭ꐉ interface.query(Unknown Source)
at org.netbeans.spi.editor.completion.support.AsyncCompletionTask.run(AsyncCompletionTask.java:218)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572)
at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997)
Caused by: java.sql.SQLException
at com.informix.util.IfxErrMsg.getSQLException(IfxErrMsg.java:408)
at com.informix.jdbc.IfxSqli.E(IfxSqli.java:3779)
... 15 more