Bug #81597 mysqlsh does not detect object changes from other sessions

Submitted: 25 May 2016 17:02 Modified: 27 May 2016 5:31
Reporter: Giuseppe Maxia (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Document Store: MySQL Shell Severity:S2 (Serious)
Version:5.7.12 OS:Any
Assigned to: CPU Architecture:Any

[25 May 2016 17:02] Giuseppe Maxia
Description:
Create a collection:

mysql-js> db.createCollection('somethingNew')
 <Collection:somethingNew>

mysql-js> db.collections
{
    "CountryInfo": <Collection:CountryInfo>,
    "somethingNew": <Collection:somethingNew>
}

Without closing the mysqlsh session, run this command in a SQL client:

mysql [localhost] {msandbox} (world_x) > drop table somethingNew;
Query OK, 0 rows affected (0.01 sec)

Then return to the open session in mysqlsh:

mysql-js> db.collections
{
    "CountryInfo": <Collection:CountryInfo>,
    "somethingNew": <Collection:somethingNew>
}
mysql-js> db.getCollections()
{
    "CountryInfo": <Collection:CountryInfo>,
    "somethingNew": <Collection:somethingNew>
}

The table removal in a parallel session is ignored in the current session, as mysqlsh only collects information at login time.

How to repeat:
see above.
See also http://datacharmer.blogspot.com/2016/05/taking-mysql-document-store-for-spin.html for more detail on this issue.
[27 May 2016 5:31] MySQL Verification Team
Hello Giuseppe,

Thank you for the report and test case.

Thanks,
Umesh

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.049 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.