Aqua Data Studio 17.0.0-ga-11
Build #: 47946
Built on: 2015-Dec-22 06:24:03 PM
Database: MongoDB 3.0.7
Storage Engine: MMAPv1
Issue: Different behavior observed while creating new database.
Steps:
|
356 KB
|
279 KB
|
58 KB
|
64 KB
You have not reported the behaviors in MongoCLI & MongoShell
@anil: can you review as well
@Sachin,
In MongoCLI and MongoShell, there are no drop downs for Database. But when we switched to new database, their status bar reflects the same.
I have compared Scenario 1 and Scenario 2 in MongoCLI and MongoShell, both Scenarios are working correctly.
Please refer screenshot for MongoCLI and MongoShell (mongoCLI.png).
@Sachin,
In MongoCLI and MongoShell, there are no drop downs for Database. But when we switched to new database, their status bar reflects the same.
I have compared Scenario 1 and Scenario 2 in MongoCLI and MongoShell, both Scenarios are working correctly.
Please refer screenshot for MongoCLI and MongoShell (mongoCLI.png).
@jenny: I tried the following scenario in MySQL:
-- launch QA & db1, db2 displayed in Database dropdown
-- I then created a new DB called "db3" using our create DB UI
-- I then executed the use db3 command in the existing QA window which did not have db3 in its dropdown
-- Result: after executing the use db3 command, the database dropdown is populated w/ db3.
@jenny: I tried the following scenario in MySQL:
-- launch QA & db1, db2 displayed in Database dropdown
-- I then created a new DB called "db3" using our create DB UI
-- I then executed the use db3 command in the existing QA window which did not have db3 in its dropdown
-- Result: after executing the use db3 command, the database dropdown is populated w/ db3.
The scenario for MySQL is implemented by this logic.
However, for MongoDB, the USE command doesn't create a database. If the database doesn't exist, the database is only created when a collection is created. (That's a reason why the MongoSQL's CREATE DATABASE command requires a collection name so that the database is created when the collection is created.)
The logic mentioned for MySQL doesn't work for MongoJS. After the USE command, we try to re-populate the database dropdown but SHOW DATABASES doesn't return the database.
I try the following scenario using MongoDB's CLI:
> use dimentrix
swtiched to db dimentrix
> db
dimentrix
> show dbs
admin 0.203125GB
bi 0.203125GB
jenny 0.203125GB
--> Note that dimentrix is not in the list.
> db.a.insert({"a":1})
--> A collection is created and the database is now created.
> show dbs
admin 0.203125GB
bi 0.203125GB
dimentrix 0.203125GB
jenny 0.203125GB
--> Now dimentrix is in the list.
The scenario for MySQL is implemented by this logic.
However, for MongoDB, the USE command doesn't create a database. If the database doesn't exist, the database is only created when a collection is created. (That's a reason why the MongoSQL's CREATE DATABASE command requires a collection name so that the database is created when the collection is created.)
The logic mentioned for MySQL doesn't work for MongoJS. After the USE command, we try to re-populate the database dropdown but SHOW DATABASES doesn't return the database.
I try the following scenario using MongoDB's CLI:
> use dimentrix
swtiched to db dimentrix
> db
dimentrix
> show dbs
admin 0.203125GB
bi 0.203125GB
jenny 0.203125GB
--> Note that dimentrix is not in the list.
> db.a.insert({"a":1})
--> A collection is created and the database is now created.
> show dbs
admin 0.203125GB
bi 0.203125GB
dimentrix 0.203125GB
jenny 0.203125GB
--> Now dimentrix is in the list.
The behavior of MongoSQL Query Analyzer is that if you execute a USE command with a database that doesn't exist, MongoSQL will return an error message "There is no database named 'dimentrix' on the server namespace."
The behavior of MongoSQL Query Analyzer is that if you execute a USE command with a database that doesn't exist, MongoSQL will return an error message "There is no database named 'dimentrix' on the server namespace."
When using the MongoJS "use" command to switch database context and if the database doesn't exist, the database doesn't get created in the server yet. In this scenario, we'll temporarily add the database to the end of the database dropdown list.
If the user doesn't create any data in the database and switches to another database, then the "temporary" database will be removed from the database dropdown list.
If the user creates some data in the database and switches to another database, then the database dropdown list will include the database.
When using the MongoJS "use" command to switch database context and if the database doesn't exist, the database doesn't get created in the server yet. In this scenario, we'll temporarily add the database to the end of the database dropdown list.
If the user doesn't create any data in the database and switches to another database, then the "temporary" database will be removed from the database dropdown list.
If the user creates some data in the database and switches to another database, then the database dropdown list will include the database.
Verified in ADS-17.0.0-GA-20
Please see screenshot: (VERIFY14085.PNG)
Verified in ADS-17.0.0-GA-20
Please see screenshot: (VERIFY14085.PNG)
Verified in ADS 18.0.0-dev-98. Please refer attached screenshot
Verified in ADS 18.0.0-dev-98. Please refer attached screenshot
Issue #14085 |
Closed |
Fixed |
Resolved |
Completion |
No due date |
Fixed Build ADS 17.0.0-ga-20 |
No time estimate |
You have not reported the behaviors in MongoCLI & MongoShell
@anil: can you review as well