Bug 125941 - FIREBIRD: Tableeditor tries to change BLOB-Fields every time you will edit a table.
Summary: FIREBIRD: Tableeditor tries to change BLOB-Fields every time you will edit a ...
Status: RESOLVED DUPLICATE of bug 137801
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
6.3.0.0.beta1+
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Database-Firebird-Default
  Show dependency treegraph
 
Reported: 2019-06-15 18:39 UTC by Robert Großkopf
Modified: 2020-10-29 22:15 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Open the table for editing and try to save it. The editor wants to delete the BLOB-column. (859.73 KB, application/vnd.oasis.opendocument.database)
2019-06-15 18:39 UTC, Robert Großkopf
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Großkopf 2019-06-15 18:39:25 UTC
Created attachment 152213 [details]
Open the table for editing and try to save it. The editor wants to delete the BLOB-column.

Open the attached database.
Open the table for editing.
There is one field "Bild", which will show images in the form.
Try to save the table.
A message appears the column "Bild" could not be changed. The editor tries to delete the column and append a new column for the same content.

All tried with LO 6.3.0.0.beta1 on OpenSUSE 15.0 64bit rpm Linux.

This buggy behaviour could lead to dataloss, but I'm not allowed to set the severity to higher than "normal" ...
Comment 1 Julien Nabet 2019-06-16 20:07:48 UTC
On pc Debian x86-64 with master sources updated today, I could reproduce this.
Using gdb, the pb is in:
/home/julien/lo/libreoffice/dbaccess/source/ui/tabledesign/TableController.cxx
   1023             // check if something changed
   1024             if((nType != pField->GetType()                  ||
   1025                 sTypeName != pField->GetTypeName()         ||

(gdb) p sTypeName
$2 = "SQL_BLOB"
(gdb) p pField->GetTypeName()
$3 = "BLOB"
(no idea how to fix this)
Comment 2 Julien Nabet 2019-06-17 13:46:09 UTC
Robert: I submitted a patch related to this bugtracker (see https://gerrit.libreoffice.org/#/c/74124/2) but Michael Stahl wonders how this file has been generated.
Indeed, it's anormal we get several properties with the same name.
(see description of the patch).
Comment 3 Robert Großkopf 2019-06-17 15:30:42 UTC
(In reply to Julien Nabet from comment #2)
> Robert: I submitted a patch related to this bugtracker (see
> https://gerrit.libreoffice.org/#/c/74124/2) but Michael Stahl wonders how
> this file has been generated.
> Indeed, it's anormal we get several properties with the same name.
> (see description of the patch).

Hi Julien,

this file has been created in LO 6.3.0.0.beta1 - directly, not by the migrating-wizard. I detected, while testing the buggy behaviour for migrating content of image-fields from HSQLDB to Firebird, Firebird saves this content but wouldn't show it with Image[BLOB]. So I copied the content to Blob[BLOB] and could see the content in forms and add new content. But every time I opened the table for editing, not input data, Firebird tries to change the fields for Image[BLOB] and Blob[BLOB]. So I created a new database to show this.

The position of Blob[BLOB] in the table isn't the position I created the table. While editing the table, changing nothing and press "Save" I have only decided not to change the table Blob[BLOB]. Seems Firebird changes the whole columns of the table when saving the content - and so the position of the one field, with isn't changed, is the first in the table.
Comment 4 QA Administrators 2019-06-18 02:48:19 UTC Comment hidden (obsolete)
Comment 5 Robert Großkopf 2019-06-18 05:37:58 UTC
Set to NEW, see comment 1
Comment 6 Alex Thurgood 2019-06-18 07:43:51 UTC
I can confirm this too with

Version: 6.4.0.0.alpha0+
Build ID: eda0568ec550a10b962c2427edfe05ea3197f107
CPU threads: 4; OS: Mac OS X 10.14.5; UI render: default; VCL: osx; 
Locale: fr-FR (fr_FR.UTF-8); UI-Language: en-US
Calc: threaded
Comment 7 Julien Nabet 2020-10-29 22:15:16 UTC
On pc Debian x86-64 with master sources updated today, I don't reproduce this anymore.
I think it's a dup of tdf#137801

Don't hesitate to reopen this tracker if you still reproduce this with a build which includes:
https://cgit.freedesktop.org/libreoffice/core/commit/?id=5b33b1a6b0f251202e89cef436efd4719c3fc0c4
tdf#137801: Firebird fix warn when changing a table having a field type BLOB
...

*** This bug has been marked as a duplicate of bug 137801 ***