Bug 120691 - Firebird Migration of Existing Database Error on Importing Table Name with space (multiword handling)
Summary: Firebird Migration of Existing Database Error on Importing Table Name with sp...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
6.1.0.0.alpha0+
Hardware: All All
: high major
Assignee: Not Assigned
URL:
Whiteboard: target:6.2.0 target:6.1.4
Keywords:
Depends on:
Blocks: Database-Firebird-Migration
  Show dependency treegraph
 
Reported: 2018-10-19 02:00 UTC by sdritchey
Modified: 2019-02-11 17:47 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Test table with space in table name (4.39 KB, application/vnd.oasis.opendocument.database)
2018-10-19 07:16 UTC, Alex Thurgood
Details
error message upon conversion attempt to firebird from hsqldb with a space in database name (26.67 KB, image/png)
2019-02-11 02:47 UTC, sdritchey
Details

Note You need to log in before you can comment on or make changes to this bug.
Description sdritchey 2018-10-19 02:00:26 UTC
Description:
I am attempting to migrate an existing ODB database to Firebird with the new migration assistant in LO 6.1.2.1.  After selecting "Yes" to convert the database to Firebird I get the following 2 errors and the conversion will not complete:

firebird_sdbc error:
*Dynamic SQL Error
*SQL error code = -104
*Token unknown - line 1, column 22
*ID
caused by
'isc_dsql_prepare'

firebird_sdbc error:
*Dynamic SQL Error
*SQL error code = -104
*Token unknown - line 1, column 24
*ID
caused by
'isc_dsql_prepare'

Actual Results:
Migration fails.

Expected Results:
Migration should complete


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 sdritchey 2018-10-19 04:05:23 UTC
This bug appears to be due to the fact that my table name contained a space.  By removing the space from the table name this error message does not appear.

More info here: https://ask.libreoffice.org/en/question/169271/firebird-migration-of-existing-database-error-firebird_sdbc_error/
Comment 2 Alex Thurgood 2018-10-19 07:02:07 UTC
Seems like a fix similar to the one provided in bug 117694 might be necessary.
Comment 3 Alex Thurgood 2018-10-19 07:14:21 UTC
Confirming with :

Version: 6.2.0.0.alpha0+
Build ID: a6032ff5418ad66cc8fec10c636e32b124ee7864
CPU threads: 4; OS: Mac OS X 10.14; UI render: default; VCL: osx; 
Locale: fr-FR (fr_FR.UTF-8); Calc: threaded
Comment 4 Alex Thurgood 2018-10-19 07:16:13 UTC
Created attachment 145822 [details]
Test table with space in table name

Try opening this in a recent version of LO (experimental options activated) and accept the migration when clicking on the Tables icon. The migration fails because of the space in the table name.
Comment 5 Julien Nabet 2018-10-19 07:27:52 UTC
Thought this case should be already dealt thanks to https://cgit.freedesktop.org/libreoffice/core/commit/?id=9082e37400baf75296cb94c5588ddeb3d18f0b09.
At least, we've got some code pointer.
Comment 6 Xisco Faulí 2018-10-23 16:04:17 UTC
Reproduced back to the migration commit

Version: 6.1.0.0.alpha0+
Build ID: 5b0ceb86c342754d8f4e83408c7ae0da0e3931d3
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group
Comment 7 Julien Nabet 2018-10-24 19:20:46 UTC
The real fix would be to use the existing parser if i well understood. Far too much high level for me, can’t help here.
Comment 8 Drew Jensen 2018-10-24 19:33:06 UTC
(In reply to Julien Nabet from comment #7)
> The real fix would be to use the existing parser if i well understood. Far
> too much high level for me, can’t help here.

@Julien are coordinating with Tamas on this. My understand from an email exchange with him last week is the at he plans on changing over to use an existing SQL parser (implemented in C) to help cover some of these trickier issues. I don't think that code has been uploaded yet however, so you may want to touch base with him.
Comment 9 Commit Notification 2018-10-29 09:04:12 UTC
Tamas Bunth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/76279399f747548494a259173ef5669553c3f06f%5E%21

tdf#120691 Migrate tables which contain spaces

It will be available in 6.2.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 10 Xisco Faulí 2018-10-29 11:05:43 UTC
Verified in

Version: 6.2.0.0.alpha1+
Build ID: 19a0698079fbba36646a2d06eaec3a7fde60b2f5
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: threaded

@Tamas Bunth, thanks for fixing this!!

Cherry-picked to 6.1 -> https://gerrit.libreoffice.org/#/c/62501/
Comment 11 Commit Notification 2018-11-06 18:06:22 UTC
Tamas Bunth committed a patch related to this issue.
It has been pushed to "libreoffice-6-1":

https://git.libreoffice.org/core/+/3c8ad17c769753af50ef14770661a6c1ffed226e%5E%21

tdf#120691 Migrate tables which contain spaces

It will be available in 6.1.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.
Comment 12 sdritchey 2019-02-11 02:46:29 UTC
Tested HSQLDB database conversion with a space in database name in 6.2.0 and conversion failed with error message: "SQL Status: map::at: key not found".  If I remove the space in the database name conversion proceeds and completes.
Comment 13 sdritchey 2019-02-11 02:47:54 UTC
Created attachment 149073 [details]
error message upon conversion attempt to firebird from hsqldb with a space in database name
Comment 14 Xisco Faulí 2019-02-11 09:04:23 UTC
(In reply to sdritchey from comment #12)
> Tested HSQLDB database conversion with a space in database name in 6.2.0 and
> conversion failed with error message: "SQL Status: map::at: key not found". 
> If I remove the space in the database name conversion proceeds and completes.

Hello,
This bug has been in RESOLVED FIXED status for more than 3 months.
If the issue is still reproducible with the latest version of LibreOffice from https://www.libreoffice.org/download/libreoffice-fresh/, please report a new issue in https://bugs.documentfoundation.org/enter_bug.cgi providing, if     needed, the steps and documents to reproduce it.
Thanks for your understanding and collaboration.
Closing as RESOLVED FIXED
Comment 15 sdritchey 2019-02-11 17:46:27 UTC
Apologies for the confusion.  New bug report filed here #123368.