Bug 72804 - Embedded Firebird file firebird.msg missing
Summary: Embedded Firebird file firebird.msg missing
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
4.2.0.0.beta2
Hardware: All All
: low normal
Assignee: Andrzej Hunt
URL:
Whiteboard: target:4.3.0
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-17 19:19 UTC by ribotb
Modified: 2014-01-27 06:55 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
empty database (1.84 KB, application/vnd.oasis.opendocument.database)
2013-12-17 19:19 UTC, ribotb
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ribotb 2013-12-17 19:19:26 UTC
Created attachment 90894 [details]
empty database

Embedded Firebird doesn't find a firebird.msg file when an error message must be displayed. For example (execute  same create command 2 times) :

"firebird_sdbc error:
*unsuccessful metadata update
*can't format message 8:254 -- message file C:\Program Files\LibreOfficeDev 4\firebird.msg not found
caused by
'CREATE GENERATOR gen_t1_id'
"

To reproduce an empty database is just necessary (in attachment) and :
Open, then Tools > SQL
- step 1 :
create table t1
(
id integer not null,
field1 varchar(20) not null
)

- step 2 : same SQL command
create table t1
(
id integer not null,
field1 varchar(20) not null
)

Result : 
 firebird_sdbc error:
*unsuccessful metadata update
*can't format message 8:132 -- message file C:\Program Files\LibreOfficeDev 4\firebird.msg not found
caused by
'create table t1
(
id integer not null,
field1 varchar(20) not null
)'

Bernard Ribot
Comment 1 Alex Thurgood 2013-12-17 19:35:28 UTC
Confirming on Linux 64bit master build :

Version: 4.3.0.0.alpha0+
Build ID: 9a03791dc8e46f90566aab5d121309d61ad1576b

Alex
Comment 2 Lionel Elie Mamane 2013-12-17 19:38:12 UTC
Andrzej? That's your realm :)
Comment 3 pierre-yves samyn 2013-12-18 09:29:39 UTC
Hello

Reproduced on windows 7/64 with Version: 4.3.0.0.alpha0+
Build ID: f279acd3678d014d9d5dafe41971e0da4dec7b6c
TinderBox: Win-x86@47-TDF, Branch:master, Time: 2013-12-13_23:25:16

Regards
Pierre-Yves
Comment 4 Andrzej Hunt 2014-01-01 20:27:00 UTC
I'm not entirely sure how much we want to do with this:

* Ideally we'd catch any errors ourselves, and provide custom
  error message (firebird.msg is unlocalised).

* But we don't really want to have to support every single
  obscure error (there are a few that /might/ theoretically
  be able to happen when not using custom SQL, i.e. in the gui,
  which is what we definitely need translations).

Overall probably best to have it though.

However it's a bit of a pain because of firebird's way of finding firebird.msg,
which is to use a hardcoded compile-time path to the file (on linux at least, whereas on windows it looks like it goes straight to the soffice.bin location
which i sthe easy case), alternatively we can set an env variable (which is
what we do for the tmp dir etc.).


Admittedly the main target for fixing this is windows, where simply copying
the file at build time *looks* like it should be enough (this I've already done, but only tested on Linux -- however I still get the error message as firebird still assumes that the file is under /usr/local/wherever-it-thinks-it-will-install on Linux).

(On Linux less of a priority as most users will use distro supplied LOs with system-firebird I guess...)
Comment 5 ribotb 2014-01-02 17:01:48 UTC
Under Windows, the file firebird.msg must be put in installation folder of LibreOffice (eg C:\Program Files\LibreOffice 4.2.0.1). I have copied the file installed with my Firebird SQL server 2.5.

With that file the error message displayed in the example described in the first comment becomes :

firebird_sdbc error:
*unsuccessful metadata update
*Table T1 already exists
caused by
'create table t1
(
id integer not null,
field1 varchar(20) not null
)'

Bernard
Comment 6 Commit Notification 2014-01-27 06:51:03 UTC
Andrzej Hunt committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=3d2fefd80082574a603895d47b73d740b7f31e7d

fdo#72804 Add firebird.msg to install.



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.