Bug #90876 | Shell 8.0.11 gives error 5115 on adding documents to collection in Server 5.7 | ||
---|---|---|---|
Submitted: | 15 May 2018 20:07 | Modified: | 21 Jun 2018 13:25 |
Reporter: | Georgi Sotirov | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Document Store: MySQL Shell | Severity: | S3 (Non-critical) |
Version: | 8.0.11 | OS: | Windows (Windows 7) |
Assigned to: | CPU Architecture: | x86 | |
Tags: | regression |
[15 May 2018 20:07]
Georgi Sotirov
[16 May 2018 6:14]
MySQL Verification Team
Hello Georg, Thank you for the report! Thanks, Umesh
[21 Jun 2018 13:25]
Margaret Fisher
Posted by developer: Documentation change made in https://dev.mysql.com/doc/refman/8.0/en/mysql-shell-tutorial-javascript-collections-add.ht... and https://dev.mysql.com/doc/refman/8.0/en/mysql-shell-tutorial-python-documents-add.html Each document requires an identifier field called _id. The value of the _id field must be unique among all documents in the same collection. In MySQL Shell 1.0.11 (which was part of MySQL 5.7), if the document passed to the add() method did not contain the _id field, MySQL Shell as the client automatically inserted a field into the document and set the value to a generated universal unique identifier (UUID). In MySQL Shell 8.0.11 and higher, document IDs are generated by the server, not the client, so MySQL Shell does not now automatically set an _id value. A MySQL server at 8.0.11 or higher sets an _id value if the document does not contain the _id field. A MySQL server at an earlier 8.0 release or at 5.7 does not set an _id value in this situation, so you must specify it explicitly. If you do not, MySQL Shell returns error 5115 "Document is missing a required field".
[5 Jul 2022 23:18]
Jason Mallory
Still seeing this issue with 8.0.29 using the json import tool: ERROR: Document contains a field value that is not unique but required to be