Bug 70425 - EDITING: Embedded Firebird - Copying integer values from Calc to Base impossible
Summary: EDITING: Embedded Firebird - Copying integer values from Calc to Base impossible
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
4.2.0.0.alpha0+ Master
Hardware: x86-64 (AMD64) All
: high major
Assignee: Not Assigned
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 51780
  Show dependency treegraph
 
Reported: 2013-10-13 14:30 UTC by robert
Modified: 2016-11-24 15:45 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
Package with database and Calc-document for the data - copy and paste (52.56 KB, application/zip)
2013-10-13 14:30 UTC, robert
Details
Version 3.0 of original odb file (4.01 KB, application/vnd.oasis.opendocument.database)
2016-11-12 09:28 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description robert 2013-10-13 14:30:00 UTC
Created attachment 87557 [details]
Package with database and Calc-document for the data - copy and paste

Open the package of the attachment. There is a database with 3 different tables. The tables differ in the field-type of the primary-key-field "ID".

There is also a Calc-document with data for this tables.

Mark The data of one of the tables in the Calc-document and try to paste them to one table of the database. The tables with an integer or smallinteger primary-key won't accept the data:
Warning
Incorrect type for setString
Continue anyway?

OK, lets continue. One row would be added with, but the ID isn't the ID of the original table.
When you paste to the table Name_Varchar it would work.

Seems there are only characters allowed when pasting to Base-Firebird.
Comment 1 Terrence Enger 2013-10-13 17:57:18 UTC
I see this on Linux with master commit 95e95e0, fetched 2013-09-19.

Will somebody with Windows or Mac please test, so that we can tell
whether other platforms are afflicted?

Thanks,
Terry.
Comment 2 racoon 2014-07-10 19:17:44 UTC Comment hidden (me-too)
Comment 3 racoon 2014-08-05 11:55:42 UTC Comment hidden (no-value)
Comment 4 Alex Thurgood 2015-01-03 17:41:11 UTC Comment hidden (no-value)
Comment 5 racoon 2015-09-06 10:42:48 UTC Comment hidden (no-value)
Comment 6 Alex Thurgood 2016-06-03 07:19:08 UTC
Confirming on

Version: 4.4.5.2
Build ID: a22f674fd25a3b6f45bdebf25400ed2adff0ff99
Locale: fr.UTF-8

OSX 10.11.5
Comment 7 Julien Nabet 2016-06-04 16:44:23 UTC
On pc Debian x86-64 with master sources updated today, I gave a try but I only could paste the whole data in the same cell.
Must have missed something I suppose.

Anyway, it seems we're on a middle of a transition.
We won't upgrade to a newer HSQLDB version because we want to invest on Firebird but this last one is still experimental.
Moreover, an upgrade to Firebird 3.0 would arrive soon (I don't know when).
Comment 8 Julien Nabet 2016-08-19 18:09:34 UTC
With master sources updated today, I can't see tables.
Indeed, I got this error:
warn:connectivity.firebird:4258:1:connectivity/source/drivers/firebird/Util.cxx:52: firebird_sdbc error:
*unsupported on-disk structure for file /tmp/lu21wdtc.tmp/lu21wdth.tmp/firebird.fdb; found 11.2, support 12.0
caused by
'isc_attach_database'

warn:legacy.osl:4258:1:svtools/source/uno/genericunodialog.cxx:314: OGenericUnoDialog::OnDialogDying: where does this come from?
warn:connectivity.firebird:4258:1:connectivity/source/drivers/firebird/Util.cxx:52: firebird_sdbc error:
*unsupported on-disk structure for file /tmp/lu21wdtc.tmp/lu21wdti.tmp/firebird.fdb; found 11.2, support 12.0
caused by
'isc_attach_database'
Comment 9 Lionel Elie Mamane 2016-08-19 19:54:20 UTC
(In reply to Julien Nabet from comment #8)
> With master sources updated today, I can't see tables.
> Indeed, I got this error:
> warn:connectivity.firebird:4258:1:connectivity/source/drivers/firebird/Util.
> cxx:52: firebird_sdbc error:
> *unsupported on-disk structure for file
> /tmp/lu21wdtc.tmp/lu21wdth.tmp/firebird.fdb; found 11.2, support 12.0
> caused by
> 'isc_attach_database'

That's because of the update to Firebird 3.0; I just documented that in 
https://wiki.documentfoundation.org/ReleaseNotes/5.3#Base
Comment 10 Gerhard Schaber 2016-08-30 12:16:20 UTC
Could you please document the commands necessary to convert an fdb file to the archive format using a Firebird server? Thanks.
Comment 11 Gerhard Schaber 2016-08-30 12:44:53 UTC
Never mind. See http://www.firebirdsql.org/file/documentation/release_notes/html/en/3_0/rnfb30-compat-upgrade-secdb.html. The third step is apparently not necessary.
1. Extract firebird.fdb from the database folder of the odb file
2. With a Firebird 2.5 server installation run: gbak -user sysdba -pas masterkey -b {host/path}firebird.fdb firebird25.fbk
3. With a Firebird 3.0 server installation run: gbak -user sysdba -pas masterkey -c firebird25.fbk {host/path}firebird.fdb
4. Replace firebird.fdb in the database folder of the odb file with the newly generated firebird.fdb
Comment 12 robert 2016-10-21 06:46:07 UTC
Nothing changed.
Bug also appears with new internal Firebird 3.0.

Version: 5.3.0.0.alpha0+
Build ID: e7324c5705eaa38a2c9aa0636f01a73f033ba4d6
CPU Threads: 4; OS Version: Linux 4.1; UI Render: default; VCL: kde4; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2016-10-20_06:12:58
Locale: de-DE (de_DE.UTF-8); Calc: group
Comment 13 Julien Nabet 2016-11-12 09:28:29 UTC
Created attachment 128685 [details]
Version 3.0 of original odb file

I used Lionel's tip for the convert:
 - install Firebird 2.5
 - uncompress odb file
 - gbak -backup firebird.fdb firebird.fbk
 - rm firebird.fdb
 - change owner and rights of the file firebird.bk
 - recompress all the elements (with the brand new firebird.fbk)
 - change extension from zip to odb

(see https://bugs.documentfoundation.org/show_bug.cgi?id=70506#c15)
Comment 14 Julien Nabet 2016-11-12 09:34:26 UTC
On pc Debian x86-64 with master sources updated today but when pasting in Name_VarcharID, LO put all the content in the first cell (ID).
Whatever I selected 1 row or all the rows (without header) of non special character part from ods file.
Comment 15 Julien Nabet 2016-11-12 09:47:21 UTC
Ok, I succeeded in reproducing this.
I had tried to paste after having opened the table instead of pasting in table directly.

I noticed this on console when trying to paste in one of the tables with integer/smallinteger primary key:
warn:legacy.osl:7313:1:connectivity/source/commontools/TTableHelper.cxx:239: lcl_sanitizeColumnDescs: database did provide invalid ORDINAL_POSITION values!