Bug 105142 - FIREBIRD 3 - create default collation or character set on database creation
Summary: FIREBIRD 3 - create default collation or character set on database creation
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
5.3.0.0.beta2
Hardware: x86-64 (AMD64) All
: high major
Assignee: Not Assigned
URL:
Whiteboard: target:5.4.0 target:5.3.1
Keywords:
Depends on:
Blocks: Database-Firebird 104905
  Show dependency treegraph
 
Reported: 2017-01-06 11:11 UTC by Alex Thurgood
Modified: 2017-03-30 18:56 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 Alex Thurgood 2017-01-06 11:11:35 UTC
Description:
Currently, our embedded FB3 databases do not set collation / character sets when the database is created. This causes problems with string functions in queries that contain non-ASCII strings.

The embedded hsqldb script file contains a collation statement when the database is created. We should do something like this so that the user doesn't have to worry that their existing queries will no longer work when they convert their old hslqdb embedded databases to the new FB3 format. 

Steps to Reproduce:
See bug 104905, of which this report is a clone

Actual Results:  
Neither the FB3 embedded database, or any of its tables, contain collation / character set data.

Expected Results:
The collation / character set statement should be set at database creation time.


Reproducible: Always

User Profile Reset: No

Additional Info:


User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:50.0) Gecko/20100101 Firefox/50.0
Comment 1 Julien Nabet 2017-01-25 10:00:45 UTC
Could we copycat onConnectedNewDatabase from hsqldb? (see http://opengrok.libreoffice.org/xref/core/connectivity/source/drivers/hsqldb/HDriver.cxx#onConnectedNewDatabase) and call it from FirebirdDriver::connect (see http://opengrok.libreoffice.org/xref/core/connectivity/source/drivers/firebird/Driver.cxx#178)
Comment 2 Commit Notification 2017-01-30 14:51:19 UTC
Tamás Bunth committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=1db423338899c71ba70e361af339d7b7e4aff61f

tdf#105142 set default charset to UTF8

It will be available in 5.4.0.

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.
Comment 3 robert 2017-02-01 18:50:59 UTC
Could confirm it solves many bugs of functions for characters.

Thanks Tamas!

Now we need a backport to LO 5.3.1.
Comment 4 Julien Nabet 2017-02-01 18:59:30 UTC
For 5.3 backport, I cherry-picked the Tamas' commit, waiting for review here:
https://gerrit.libreoffice.org/#/c/33809/1
Comment 5 Commit Notification 2017-02-02 12:54:30 UTC
Tamás Bunth committed a patch related to this issue.
It has been pushed to "libreoffice-5-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=fb72da075f20403008207fba0a6c36e808ffa3b1&h=libreoffice-5-3

tdf#105142 set default charset to UTF8

It will be available in 5.3.1.

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.