Bug 147309 - Firebird: Deleting an old view and creating a new view with same name works only after restarting Base
Summary: Firebird: Deleting an old view and creating a new view with same name works o...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
7.4.0.0 alpha0+
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Julien Nabet
URL:
Whiteboard: target:7.4.0 target:7.3.3
Keywords:
Depends on:
Blocks:
 
Reported: 2022-02-09 10:17 UTC by Robert Großkopf
Modified: 2022-03-14 12:57 UTC (History)
1 user (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 Robert Großkopf 2022-02-09 10:17:39 UTC
Open a Firebird database.
Create a query like 
SELECT * FROM "table".
Right click on the query and "Create as View".
Set "Table Name" → "viwTest"
You could see the view in tables pane.
Now delete "viwTest".
View will be deleted.
Again:
Right click on the query and "Create as View".
Set "Table Name" → "viwTest"
You couldn't see the view in tables pane.
You have to close the Base window and reopen it. Then the new view will be created with the same name as the old view.

All tested with
Version: 7.4.0.0.alpha0+ / LibreOffice Community
Build ID: 703fb7739a5e604d90e147db6f67917b8d141150
CPU threads: 6; OS: Linux 5.3; UI render: default; VCL: kf5 (cairo+xcb)
Locale: de-DE (de_DE.UTF-8); UI: en-US
Calc: threaded

Couldn't be tested with LO 4.3.0.3, because creating a view from a query will give and error and won't appear in tables pane without refreshing tables. See 
bug 126580
Comment 1 Julien Nabet 2022-03-12 12:58:32 UTC
On pc Debian x86-64 with master sources updated today, I could reproduce this.

Remark: I don't reproduce this with HSQLDB file.
Comment 2 Julien Nabet 2022-03-12 13:01:10 UTC
I gave a try with https://gerrit.libreoffice.org/c/core/+/131442
Comment 3 Commit Notification 2022-03-12 16:52:49 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/eff9dc65b88ca48171e9e6ab51f1e2ec8d0f436d

tdf#147309: Recreating a view with same name and in the same session fails (FB)

It will be available in 7.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 4 Julien Nabet 2022-03-12 17:06:38 UTC
Cherry-pick for 7.3 waiting for review here:
https://gerrit.libreoffice.org/c/core/+/131447
Comment 5 Commit Notification 2022-03-14 12:57:34 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "libreoffice-7-3":

https://git.libreoffice.org/core/commit/7dade11c99b412081eff0d5db49ede619e866737

tdf#147309: Recreating a view with same name and in the same session fails (FB)

It will be available in 7.3.3.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.