Bug 137801 - LO base with Firebird: WARNING, when adding a field to a table with an old field type BLOB
Summary: LO base with Firebird: WARNING, when adding a field to a table with an old fi...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
7.0.2.2 release
Hardware: All Linux (All)
: medium minor
Assignee: Julien Nabet
URL:
Whiteboard: target:7.1.0 target:7.0.4
Keywords:
: 125941 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-10-27 13:26 UTC by Richard Demattio
Modified: 2020-10-30 05:51 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 Richard Demattio 2020-10-27 13:26:54 UTC
Description:
in design mode: adding a field (no matter of what type) to a table with a BLOB field produces a WARNING about the existing BLOB field.

It is possible to initially create the table with the BLOB field in design mode.

Steps to Reproduce:
1. create a simple table with some fields (I took two) 
   and save the table and the database
2. add a BLOB field and save the table and the database again
   (in my testcase it was the third field "f3")
3. add another field, no matter of what type (in my case it was field "f4") 
~~~~~~~~~~~~~~~~~~~~~~~~~~~+
--> the warning comes about the THIRD field, not the newly added one!

keep in mind: I did not try to change the datatype although the error message below is saying this.

Actual Results:
Error code: 1

firebird_sdbc error:
*unsuccessful metadata update
*ALTER TABLE Table1 failed
*Cannot change datatype for column f3.  Changing datatype is not supported for BLOB or ARRAY columns.
caused by
'ALTER TABLE "Table1" ALTER COLUMN "f3" TYPE BLOB'
 /tinderbox/buildslave/source/libo-master/connectivity/source/drivers/firebird/Util.cxx:68

Expected Results:
no warning


Reproducible: Always


User Profile Reset: No



Additional Info:
reproduced also on LO 7.0.3.1

https://gerrit.libreoffice.org/gitweb?p=core.git;a=log;h=d7547858d014d4cf69878db179d326fc3483e082
Comment 1 Robert Großkopf 2020-10-27 15:25:50 UTC
I could confirm the warning appears for every BLOB or CLOB field, which already exists in a table. The new table will be saved when I click "No" to change the field type.

It is a wrong behavior of the wizard. It should only add the new field, not trying to change the old fields, which hasn't been changed.

Tested with LO 7.0.3.1 on OpenSUSE 15.1 64bit rpm Linux.
Comment 2 Julien Nabet 2020-10-28 21:40:03 UTC
Let's give a try with https://gerrit.libreoffice.org/c/core/+/104979
Comment 3 Commit Notification 2020-10-29 21:51:05 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/5b33b1a6b0f251202e89cef436efd4719c3fc0c4

tdf#137801: Firebird fix warn when changing a table having a field type BLOB

It will be available in 7.1.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 2020-10-29 21:53:23 UTC
Backport for 7.0 waiting for review here:
https://gerrit.libreoffice.org/c/core/+/104963
Comment 5 Julien Nabet 2020-10-29 22:15:16 UTC
*** Bug 125941 has been marked as a duplicate of this bug. ***
Comment 6 Commit Notification 2020-10-30 05:51:45 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "libreoffice-7-0":

https://git.libreoffice.org/core/commit/698d5809ea237c78bbbd4e85aa4f73685a4db025

tdf#137801: Firebird fix warn when changing a table having a field type BLOB

It will be available in 7.0.4.

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.