Created attachment 134067 [details] Sample starting document (DOCX) Attaching an overly simplistic sample mail merge starting document (DOCX) and address list (ODS, but format doesn't matter), but the behavior is independent of the content. - Open the starting document (DOCX). - Start mail merge wizard. - Jump to step 3. Insert address block, open Select Address List... and after clicking Add..., select the address list spreadsheet. Click OK in the dialog. - Cancel mail merge wizard, and close Writer without saving anything. - Restart LibreOffice, and check databases in Tools -> Options...; LibreOffice Base -> Databases. => There is a database with the address list spreadsheet file name ("data source" in the sample), and something like this for database file: "vnd.sun.star.pkg://file:%2F%2F%2FD:%2Fbug%2Fmm%20document.docx/EmbeddedDatabase" Note that no such entry remains if the starting document is an ODT. While nothing was saved in this case, the same thing happens if the document is saved as DOCX/DOC, as embedded database doesn't get saved in MS Office formats, yet the database remains in the list afterwards. It would be great if defunct embedded database entries were removed on start in general (a crash with the file open could leave one even in case of ODTs). Observed using LO 5.4beta2 / Windows 7.
Created attachment 134068 [details] Sample address list
Other way to trigger this issue: - Open the starting document (DOC or DOCX). - Start mail merge wizard. - Jump to step 3. Insert address block, open Select Address List... and after clicking Add..., select the address list spreadsheet. Click OK in the dialog. - Click Finish. - Close document without saving, or save the merged documents, or even the original, and close it. => Verify that in 'Tools -> Options...; LibreOffice Base -> Databases' that there is a database that points to the supposedly embedded database in the initial DOCX (the database connection can also be checked in Writer in View -> Data Sources). The leftover database entry can be manually deleted in the Options dialog (could be useful for testing). To reiterate, not embedding the database connection in the merged and saved DOCX is fine (that'd be a separate enhancement), this issue is only about the lingering entry in Registered Databases list.
Moving to ASSIGNED
Szymon Kłos committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=26957fc325c27cf61e8ef5555b380d627def4931 tdf#108572 let remove storage element It will be available in 6.0.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Szymon Kłos committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=ba368643e6a0c5ac7a7b7ea8d72899d60b2a8331 tdf#108572 revoke connection if mail-merge is cancelled It will be available in 6.0.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
I also met problem with adding the same data source after manual delete using "Tools -> Options". One of my patches solved that.
Szymon Kłos committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=97477ee5e11951a5a25a91b89f1b71a1b78ac8f5 tdf#108572 remove connections only for current shell It will be available in 6.0.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Szymon Kłos committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=29bd193146b40cf90bda5db04b136987f3c7c94d tdf#108572 remove connection also if not saved It will be available in 6.0.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Caolán McNamara committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=91bb474cc5342b32dab6c701a1bea6c49b87f498 forcepoint#37 revert tdf#108572 let remove storage element It will be available in 6.1.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Caolán McNamara committed a patch related to this issue. It has been pushed to "libreoffice-6-0": http://cgit.freedesktop.org/libreoffice/core/commit/?id=8182037871daf1d94f4beff63afeb56b20055480&h=libreoffice-6-0 forcepoint#37 revert tdf#108572 let remove storage element It will be available in 6.0.4. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.