Bug 152044 - Deleted Firebird file is recreated when reopen Base file
Summary: Deleted Firebird file is recreated when reopen Base file
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
6.1.5.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Database-Firebird-Default
  Show dependency treegraph
 
Reported: 2022-11-14 21:15 UTC by jcsanz
Modified: 2023-04-30 08:08 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jcsanz 2022-11-14 21:15:40 UTC
Description:
After deleting a Firebird file that was connected to a Base database, the file is recreated when the Base document is opened again.

Steps to Reproduce:
To test this issue, it is needed an external Firebird database, so we will create a Firebird external database file (it is not needed to have Firebird server installed)

    1. Open Base
    2. Select Connect to an existing database
    3. In the dropdown list, select Firebird external. Click Next
    4. Click on Create new button
    5. In the Save as dialog, choose a suitable place and give a name to the Firebird database file, for example Test1.fdb. Click on Save, then Click Next
    6. In the Setup the user authentication step, do not change anything. Click Next
    7. In the Save and proceed step, click on No, do not register the database (it is not needed register).
    8. Click on Finish.
    9. Give a name to the Base .odb file, for example Test2.odb

Once the database file has been created, to see the issue:
    1. Close Base
    2. Delete the Firebird file Test1.fdb
    3. Open the Base file Test2.odb
    4. Go to the Tables area
    5. Observe that has been created a new Firebird file called Test1.fdb in the original place where the old .fdb file was deleted

Moreover:
    6. Open Test2.odb
    7. Go to menu Edit > Database > Properties
    8. In General section, it is shown the path of the firebird file. Change the name of the file to other different, for example Test3.fdb
    9. Close Database Properties dialog
    10. Go to any other different area but Tables, return to the Tables area
    11. A new Firebird file named Test3.fdb has been created, although Test1.fdb hadn't been deleted

Actual Results:
A new file is created when reopen Base

Expected Results:
No file would be created


Reproducible: Always


User Profile Reset: No

Additional Info:
The issue was NOT present in LibreOffice 7.1.6.2 version
The issue begins in LibreOffice 7.1.7.1
Comment 1 jcsanz 2022-11-14 21:24:22 UTC
Error tested and is present in:

Version: 7.1.7.1 (x64) / LibreOffice Community
Build ID: b7e169ea97ed281a064d4e488fa1bb29cb906303
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: es-ES
Calc: CL

Also present in:

Version: 7.4.2.3 / LibreOffice Community
Build ID: 40(Build:3)
CPU threads: 1; OS: Linux 5.15; UI render: default; VCL: kf5 (cairo+xcb)
Locale: es-ES (es_ES.UTF-8); UI: es-ES
7.4.2-2
Calc: threaded
----------


NO ERROR in:

Version: 7.1.6.2 (x64) / LibreOffice Community
Build ID: 0e133318fcee89abacd6a7d077e292f1145735c3
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: es-ES
Calc: CL
Comment 2 Robert Großkopf 2022-11-15 09:17:25 UTC
Get the same behavior with 
Version: 7.0.5.2
Build ID: 64390860c6cd0aca4beafafcfd84613dd9dfb63a
CPU threads: 6; OS: Linux 5.3; UI render: default; VCL: kf5
Locale: de-DE (de_DE.UTF-8); UI: de-DE
Calc: threaded

also
Version: 6.1.5.2

Older versions I installed won't open any external Firebird file.

All versions up to LO 7.4.3.1 will create an empty Firebird file if the file doesn't exist.

In Linux it seems to be a (buggy) behavior since external Firebird file with direct connection works.

I would prefer to give a message: 
File couldn't be found. Should a new file be created?
Comment 3 jcsanz 2022-11-15 11:01:59 UTC
(In reply to Robert Großkopf from comment #2)

> All versions up to LO 7.4.3.1 will create an empty Firebird file if the file
> doesn't exist.

Maybe you are right, I misunderstood the message when I tested with version 7.1.6.2 and earlier
Comment 4 Alex Thurgood 2022-11-15 12:23:10 UTC
I seem to remember that the code was deliberately modified to create a Firebird fdb file if one didn't exist when the ODB file was initially setup. Seems like the case where someone deletes the FDB file at a later date wasn't taken into account.