Bug 134526 - Update Firebird to latest upstream version
Summary: Update Firebird to latest upstream version
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
7.0.0.0.beta1+
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-07-05 13:35 UTC by leoneo3000
Modified: 2024-02-15 05:40 UTC (History)
4 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 leoneo3000 2020-07-05 13:35:54 UTC
Description:
Base in LibreOffice 7.0 beta 2 appears to still use Firebird 3.0.0. Some bugs (including security/vulnerability and compatibility issues) have been fixed since. http://firebirdsql.org/file/documentation/release_notes/html/en/3_0/rlsnotes30.html

Would it not make sense to update this from upstream before 7.0 goes to release?

Steps to Reproduce:
1. Enter the following SQL command: SELECT rdb$get_context('SYSTEM', 'ENGINE_VERSION') from rdb$database;
2. Make sure that 'Show output of "select" statements' is ticked

Actual Results:
Output shows that the version is 3.0.0

Expected Results:
Output shows that the version is most recent minor update


Reproducible: Always


User Profile Reset: No



Additional Info:
Build 1c213561a365b5666167321de68c9977500c9612
Comment 1 leoneo3000 2020-07-05 18:45:45 UTC
Apologies, when I filed this bug I hadn't yet seen that Julien Nabet had attempted to update earlier this year to version 3.0.2 and version 3.0.4 but that it failed tests. http://document-foundation-mail-archive.969070.n3.nabble.com/About-putting-Firebird-creation-option-experimental-tt4274028.html

I have since learned that from an IRC conversation on #libreoffice-qa.

Perhaps we can use this bug to keep track of future updates (and attempts to implement them)?
Comment 2 Alex Thurgood 2020-07-07 16:25:25 UTC
Confirming

Attempting to connect to the latest available version of Firebird for macOS, and the corresponding example database, leads to the following error message :

firebird_sdbc error:
*unsupported on-disk structure for file /Library/Frameworks/firebird.framework/Versions/A/Resources/examples/empbuild/employee.fdb; found 12.2, support 12.0
caused by
'isc_attach_database'
Comment 3 Alex Thurgood 2020-07-07 16:26:03 UTC
Tested with

Version: 7.0.0.1
Build ID: 04ba7e3f1e51af6c5d653e543a620e36719083fd
CPU threads: 8; OS: Mac OS X 10.15.5; UI render: default; VCL: osx
Locale: fr-FR (fr_FR.UTF-8); UI: en-US
Calc: threaded
Comment 4 Alex Thurgood 2020-07-07 16:28:12 UTC
This is a sad, sorry mess.
Comment 5 leoneo3000 2020-07-07 16:43:24 UTC
The On Disk System underwent a minor change in Firebird 3.0.4 and the ODS number was increased to 12.2.

https://www.firebirdsql.org/file/documentation/release_notes/html/en/3_0/rnfb30-apiods.html#rnfb30-apiods-ods

I don't see any other changes to the ODS between 3.0.4 and 3.0.6. I also don't see what happened to ODS 12.1 or if it ever existed. Do you see any issues when you try Firebird 3.0.3?
Comment 6 Julien Nabet 2020-11-15 11:21:08 UTC
Just for information a new try is in progress with the help of Jan-Marek Glogowski here:
https://gerrit.libreoffice.org/c/core/+/105440

For the moment 3.0.7 builds on Linux and Windows Jenkins, Jan-Marek is trying to tackle the MacOs Jenkins failing build.
I hope he'll make it, I had pinged Stephan Bergmann since Jan-Marek and me haven't got a Mac to try.
Comment 7 Julien Nabet 2020-11-28 19:28:40 UTC
(In reply to Julien Nabet from comment #6)
> Just for information a new try is in progress with the help of Jan-Marek
> Glogowski here:
> https://gerrit.libreoffice.org/c/core/+/105440
> 
> For the moment 3.0.7 builds on Linux and Windows Jenkins, Jan-Marek is
> trying to tackle the MacOs Jenkins failing build.
> I hope he'll make it, I had pinged Stephan Bergmann since Jan-Marek and me
> haven't got a Mac to try.

Just for information, patch for upgrade to Firebird 3.0.7 has been pushed in master sources (future 7.2.0) thanks to the great help of Jan-Marek and Stephan.
Comment 8 leoneo3000 2020-11-29 11:02:07 UTC
Yes, I followed the process on Gerrit. Great work by all involved!

Is there any chance of pushing this into the beta 2 of 7.1? Firebird is largely put in the ‘experimental’ box anyway so won’t be used for serious work and the upgrade from 3.0 to 3.0.7 is most likely only an improvement. It would allow more people to play around with it, test it, and work on improvements.
Comment 9 Julien Nabet 2020-11-29 11:15:32 UTC
(In reply to leoneo3000 from comment #8)
> Yes, I followed the process on Gerrit. Great work by all involved!
> 
> Is there any chance of pushing this into the beta 2 of 7.1? Firebird is
> largely put in the ‘experimental’ box anyway so won’t be used for serious
> work and the upgrade from 3.0 to 3.0.7 is most likely only an improvement.
> It would allow more people to play around with it, test it, and work on
> improvements.

I had proposed this but Stephan considered this not a good idea (see 3 last comments of https://gerrit.libreoffice.org/c/core/+/105440).
<digression>
There are still a lot of bugs in Firebird or unimplemented parts and still nobody on it. I give a try sometimes to some of these but I'm not smart enough in general to tackle them.
I think TDF fundation should hire/pay some contracts with some devs to work on it. I mean, Base bugs are largely ignored in general so either Base part should be removed from LO or there should be some real commitment from TDF here.
</digression>
Comment 10 leoneo3000 2020-11-29 17:19:59 UTC
OK, I understand the challenges. It doesn’t help that it requires people who understand the LO code AND databases in general AND Firebird in particular AND perhaps Java for migrating the legacy implementation from HSQLDB to Firebird.

Do you know if there have been any attempts to get people from the Firebird community to help out with certain things? Having Firebird integrated in LO could be a nice calling card for the Firebird database.

Also, by the time LibreOffice 7.2 comes out we’re probably a year from now. Considering Firebird 4.0 is currently in its second (and last) beta. It makes sense to see if some of the current issues with Firebird in Base are not actually solved in 4.0. I suspect 4.0 to have been released before 7.2 is branched.
Comment 11 Julien Nabet 2020-11-29 18:59:14 UTC
(In reply to leoneo3000 from comment #10)
> ...
> Do you know if there have been any attempts to get people from the Firebird
> community to help out with certain things? Having Firebird integrated in LO
> could be a nice calling card for the Firebird database.
I'm not aware about this, it could be a good idea but not sure they have enough people to deal with LO. But one can try of course! :-)
I know that sometimes some patches are proposed from LO people to devs of libs.
The interest is to fix pbs upstream and simplify integration of new versions of libs since you'll have less patches to deal with.

> 
> Also, by the time LibreOffice 7.2 comes out we’re probably a year from now.
> Considering Firebird 4.0 is currently in its second (and last) beta. It
> makes sense to see if some of the current issues with Firebird in Base are
> not actually solved in 4.0. I suspect 4.0 to have been released before 7.2
> is branched.

First version of 7.2 should be released in May or June 2021 I think. Indeed, in general there are 2 branches per year (see https://wiki.documentfoundation.org/ReleasePlan).
About 4.0, I had discussed about it with Lionel Mamane (the Base dev expert who badfully is far less available now) it needed more work (eg: deal with the structure of a type which changed from decimal numbers to binary numbers to stick more with SQL) and as always we had to deal with the compatibility between odb files created with Firebird 3.0 and odb files created with Firebird 4.0

<digression>
I think the pb is Firebird is not very famous (at least I don't see a big community for it and not sure searching docs about Interbase the origin of Firebird will help) but was the only enough "mature" database to propose embedded possibility with C/C++ connector compatible with license. Ideally, I would have prefered to use Postgresql or MariaDB but they don't propose embedded functionnality.
Also  I think it's not very intuitive. For example I'd like to test Firebird with Firebird tools only but am a bit lost between the different versions of servers + there's no intuitive web client (equivalent to phpmyadmin, adminer,...) at least on Linux or perhaps missed it. Sometimes I'd like just to make some tests like how Firebird deals with the length of types when changing from a type to another.
</digression>
Comment 12 Popa Adrian Marius 2020-12-22 09:24:38 UTC
patch can be created for 7.1 with firebird 3.0.7 , seems that builds and works ok on master 

tested on my linux box 

ods 12.0 should be oppened ok by firebird 3.0.7 (minor ods changes), maybe you have old version of firebird 

https://firebirdsql.org/file/documentation/release_notes/html/en/3_0/rlsnotes30.html#rnfb30-apiods-ods-12-2
Comment 13 Popa Adrian Marius 2020-12-22 09:28:29 UTC
there is adminer for firebird https://www.adminer.org/

also firebirdwebadmin and flamerobin , another alternative is redexpert https://reddatabase.ru/downloads/redexpert/
Comment 14 Julien Nabet 2020-12-22 22:26:59 UTC
(In reply to Popa Adrian Marius from comment #12)
> patch can be created for 7.1 with firebird 3.0.7 , seems that builds and
> works ok on master 
> 
> tested on my linux box 
Yes but no need to push this on 7.1 since Firebird has been put experimental and there are enough Firebird bugs which need to be fixed to ask people to test this part.

> 
> ods 12.0 should be oppened ok by firebird 3.0.7 (minor ods changes), maybe
> you have old version of firebird 
> 
> https://firebirdsql.org/file/documentation/release_notes/html/en/3_0/
> rlsnotes30.html#rnfb30-apiods-ods-12-2

I don't know at all this part so can't tell.
Comment 15 Julien Nabet 2023-04-30 06:28:03 UTC
taichi: thought you might be interested in this one.
For FB4, you can try to implement the missing part for compatibility if you're feel confident.
As an alternative, you may prepare a patch to upgrade to FB 3.0.10
Comment 16 taichi 2023-07-07 15:02:01 UTC
(In reply to Julien Nabet from comment #15)
> taichi: thought you might be interested in this one.
> For FB4, you can try to implement the missing part for compatibility if
> you're feel confident.
> As an alternative, you may prepare a patch to upgrade to FB 3.0.10

I'm in the process of preparing a patch to upgrade to 3.0.10,
but I haven't fix the error in building on Windows yet.
https://gerrit.libreoffice.org/c/core/+/152016
Comment 17 taichi 2023-10-28 08:28:30 UTC
(In reply to Julien Nabet from comment #15)
> 太一: これに興味があるかもしれないと思いました。
>  FB4 の場合、自信がある場合は、互換性のために不足している部分を実装してみることができます。
>  代わりに、FB 3.0.10 にアップグレードするパッチを準備することもできます。

(In reply to taichi from comment #16)
> の Julien Nabet への返信 (コメント #15 ) 
>   > 太一: これに興味があるかもしれないと思いました。 
>   > FB4 の場合、互換性のために不足している部分を実装してみることができます。 
>   > 自信が持てるようになりましたね。 
>   > 代わりに、FB 3.0.10 にアップグレードするパッチを準備することもできます。 
> 
>   3.0.10 にアップグレードするためのパッチを準備中です。 
>   ただし、Windows でのビルド時のエラーはまだ修正されていません。 
>   https://gerrit.libreoffice.org/c/core/+/152016

Jenkins's log:
https://ci.libreoffice.org/job/gerrit_windows/161172/consoleFull#1408899889d893063f-7f3d-4b7e-b56f-4e0f225817cd
Comment 18 taichi 2023-10-28 08:40:32 UTC
(In reply to taichi from comment #16)
> (In reply to Julien Nabet from comment #15)
> > taichi: thought you might be interested in this one.
> > For FB4, you can try to implement the missing part for compatibility if
> > you're feel confident.
> > As an alternative, you may prepare a patch to upgrade to FB 3.0.10
> 
> I'm in the process of preparing a patch to upgrade to 3.0.10,
> but I haven't fix the error in building on Windows yet.
> https://gerrit.libreoffice.org/c/core/+/152016

Jenkins's log:
https://ci.libreoffice.org/job/gerrit_windows/161172/consoleFull#1408899889d893063f-7f3d-4b7e-b56f-4e0f225817cd
Comment 19 Julien Nabet 2023-10-28 09:08:22 UTC
(In reply to taichi from comment #18)
> ...
> Jenkins's log:
> https://ci.libreoffice.org/job/gerrit_windows/161172/
> consoleFull#1408899889d893063f-7f3d-4b7e-b56f-4e0f225817cd

I'm not astonished, Firebird seems quite a mess to deal with.
Considering the pb just for a minor upgrade, I don't imagine how hard it must be to upgrade to a major version like 4.X.
In all cases, I can't help here.

As it's been reported several times, Base part in LO is hardly maintained. Just take a look at commits to see the fixes specific to Base to make your opinion.
IMHO, either TDF should hire some people to tackle bugs concerning Base or they should decide to dump Base.
Comment 20 Alex Thurgood 2023-10-30 12:10:22 UTC
Please see also the discussion in bug 144619 relating to an upgrade to the on disk structure of FB4, which would apparently be incompatible with FB3.
Comment 21 Popa Adrian Marius 2023-11-03 09:09:09 UTC
(In reply to taichi from comment #18)
> (In reply to taichi from comment #16)
> > (In reply to Julien Nabet from comment #15)
> > > taichi: thought you might be interested in this one.
> > > For FB4, you can try to implement the missing part for compatibility if
> > > you're feel confident.
> > > As an alternative, you may prepare a patch to upgrade to FB 3.0.10
> > 
> > I'm in the process of preparing a patch to upgrade to 3.0.10,
> > but I haven't fix the error in building on Windows yet.
> > https://gerrit.libreoffice.org/c/core/+/152016
> 
> Jenkins's log:
> https://ci.libreoffice.org/job/gerrit_windows/161172/
> consoleFull#1408899889d893063f-7f3d-4b7e-b56f-4e0f225817cd


Might be related 

https://github.com/FirebirdSQL/firebird/issues/7522
Comment 22 Popa Adrian Marius 2023-11-03 09:15:28 UTC
(In reply to Popa Adrian Marius from comment #21)
> (In reply to taichi from comment #18)
> > (In reply to taichi from comment #16)
> > > (In reply to Julien Nabet from comment #15)
> > > > taichi: thought you might be interested in this one.
> > > > For FB4, you can try to implement the missing part for compatibility if
> > > > you're feel confident.
> > > > As an alternative, you may prepare a patch to upgrade to FB 3.0.10
> > > 
> > > I'm in the process of preparing a patch to upgrade to 3.0.10,
> > > but I haven't fix the error in building on Windows yet.
> > > https://gerrit.libreoffice.org/c/core/+/152016
> > 
> > Jenkins's log:
> > https://ci.libreoffice.org/job/gerrit_windows/161172/
> > consoleFull#1408899889d893063f-7f3d-4b7e-b56f-4e0f225817cd
> 
> 
> Might be related 
> 
> https://github.com/FirebirdSQL/firebird/issues/7522

This fix was backported to 3.0.10 and this might be the cause for the Jenkins's build issue 

https://github.com/FirebirdSQL/firebird/issues/7122
Comment 23 Popa Adrian Marius 2023-11-03 18:00:03 UTC
Request from firebird developers : 
if there are errors on the firebird side could you send/attach firebird.log
Comment 24 taichi 2023-11-06 12:02:26 UTC
(In reply to Popa Adrian Marius from comment #23)
> Request from firebird developers : 
> if there are errors on the firebird side could you send/attach firebird.log

Done.
Comment 25 Commit Notification 2024-01-06 01:37:32 UTC
Taichi Haradaguchi committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/00eae23267bf64e07cf057f828cd85f3c38ac669

tdf#134526 Firebird: upgrade to release 3.0.11

It will be available in 24.8.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 26 Commit Notification 2024-01-18 12:40:08 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/26cfd0d6997ebbad10049a5b6e38b73653553377

Revert "tdf#134526 Firebird: upgrade to release 3.0.11"

It will be available in 24.8.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.