|
773 KB
|
134 KB
|
245 KB
When doing Reconnect, we can't switch to a database that doesn't exist. The error message "failed to change into database" is correct.
The only problem that needs to be fixed is that the selected database in the database drop-down list should match the database context after Reconnect. This is actually a problem that exists for all database types. I can reproduce this problem using MySQL as well.
1. Let's say we have the following databases for a MySQL server:
- "aaa" with table "aaa"
- "bbb" with table "bbb"
- "mysql" with table "event"
2. In the Server Registration, make sure that "mysql" is the default database.
3. In the schema browser, select database "bbb" and launch Query Analyzer. The selected database in the database drop-down is "bbb".
4. In the schema browser, drop database "bbb".
5. Go to the Query Analyzer window and do Reconnect.
6. An error message "New connection established. Failed to change into database: bbb" is displayed.
7. The selected database in the database drop-down is "aaa" (the first database in the list). However, the database context is actually "mysql" (the default database). You can run the query "select * from event" which is a table in the "mysql" database. After running the query, you'll notice that the database context is actually "mysql".
When doing Reconnect, we can't switch to a database that doesn't exist. The error message "failed to change into database" is correct.
The only problem that needs to be fixed is that the selected database in the database drop-down list should match the database context after Reconnect. This is actually a problem that exists for all database types. I can reproduce this problem using MySQL as well.
1. Let's say we have the following databases for a MySQL server:
- "aaa" with table "aaa"
- "bbb" with table "bbb"
- "mysql" with table "event"
2. In the Server Registration, make sure that "mysql" is the default database.
3. In the schema browser, select database "bbb" and launch Query Analyzer. The selected database in the database drop-down is "bbb".
4. In the schema browser, drop database "bbb".
5. Go to the Query Analyzer window and do Reconnect.
6. An error message "New connection established. Failed to change into database: bbb" is displayed.
7. The selected database in the database drop-down is "aaa" (the first database in the list). However, the database context is actually "mysql" (the default database). You can run the query "select * from event" which is a table in the "mysql" database. After running the query, you'll notice that the database context is actually "mysql".
After Reconnect, a new connection is established. Using this new connection, the SHOW DATABASES command returns only the databases that currently exist. So, if the database that was previously selected in the Query Analyzer window no longer exists, the database context of the new connection will be switched to the default database. Fixed Query Analyzer to select the correct database in the database drop-down list after Reconnect.
In the MongoJS scenarios described in the issue description, if the default database is "local", then "local" will be selected in the database drop-down list after Reconnect. If the default database is "admin", then "admin" will be selected. The new connection doesn't know about the "dimentrix" database.
In the MySQL scenario described in this issue comment, the selected database will be "mysql" after Reconnect.
After Reconnect, a new connection is established. Using this new connection, the SHOW DATABASES command returns only the databases that currently exist. So, if the database that was previously selected in the Query Analyzer window no longer exists, the database context of the new connection will be switched to the default database. Fixed Query Analyzer to select the correct database in the database drop-down list after Reconnect.
In the MongoJS scenarios described in the issue description, if the default database is "local", then "local" will be selected in the database drop-down list after Reconnect. If the default database is "admin", then "admin" will be selected. The new connection doesn't know about the "dimentrix" database.
In the MySQL scenario described in this issue comment, the selected database will be "mysql" after Reconnect.
Verified in ADS-17.0.0-GA-22
Please see screenshot: (verify14144.png)
Verified in ADS-17.0.0-GA-22
Please see screenshot: (verify14144.png)
The behavior of MongoShell is correct. FluidShell has the same behavior also. You can also reproduce the same behavior using the MySQL scenario with other database types.
During Reconnect, the MongoShell and FluidShell session will be disconnected if the current database doesn't exist anymore. You can do Reconnect again. It will then establish a connection using the default database.
The behavior of MongoShell is correct. FluidShell has the same behavior also. You can also reproduce the same behavior using the MySQL scenario with other database types.
During Reconnect, the MongoShell and FluidShell session will be disconnected if the current database doesn't exist anymore. You can do Reconnect again. It will then establish a connection using the default database.
Issue #14144 |
Closed |
Fixed |
Resolved |
Completion |
No due date |
Fixed Build ADS 17.0.0-ga-21 |
No time estimate |
1 issue link |
relates to #14220
Issue #14220Default schema selected will be the first schema from the schema list after reconnecting server. |