Bug Hunting Session
Bug 117867 - Firebird: migration: Auto Timestamp in HSQLDB not transfered to firebird
Summary: Firebird: migration: Auto Timestamp in HSQLDB not transfered to firebird
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
6.1.0.0.beta1+
Hardware: x86-64 (AMD64) All
: high major
Assignee: Not Assigned
URL:
Whiteboard: target:6.2.0
Keywords:
Depends on:
Blocks: Database-Firebird-Migration
  Show dependency treegraph
 
Reported: 2018-05-29 05:09 UTC by Rob Westein
Modified: 2018-07-06 12:21 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
HSQLDB with table and auto-timestamp-field (3.68 KB, application/vnd.oasis.opendocument.database)
2018-05-29 05:56 UTC, Robert Großkopf
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rob Westein 2018-05-29 05:09:59 UTC
Description:
If in a HSQLDB table a date field is defined to have an auto Timestamp when new record is created (created by  alter table "Table1" alter  COLUMN "Date" TIMESTAMP default now) this will not be transferred to the firebird DB

Steps to Reproduce:
1. Create a table in HSQLDB add date field
2. set  'alter table "Table1" alter  COLUMN "Date" TIMESTAMP default now' to the date field. 
3. Create a new record the date should be filled automatically
4. run the migration assistant.
5. create a new record in the migrated db.
 

Actual Results:  
Auto Timestamp setting in the date field is not converted to the firebird table

Expected Results:
Auto Timestamp should work in an migrated DB.


Reproducible: Always


User Profile Reset: No



Additional Info:


User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0
Comment 1 Robert Großkopf 2018-05-29 05:56:59 UTC
Created attachment 142367 [details]
HSQLDB with table and auto-timestamp-field

Could confirm the buggy behavior. Added an attachment which has a table and default for the timestamp set to NOW.
Tested with
Version: 6.1.0.0.alpha1+
Build-ID: 6fecbff9810ae9afc2de8c4d5e9e8a8a511d1f2d
CPU-Threads: 4; BS: Linux 4.4; UI-Render: Standard; VCL: kde4; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2018-05-23_22:35:09
Gebietsschema: de-DE (de_DE.UTF-8); Calc: group
Comment 2 Julien Nabet 2018-05-29 20:34:42 UTC
I tried to mimic https://cgit.freedesktop.org/libreoffice/core/commit/?id=b18953565b68e46289ad85927d79f5978a51078b but I don't understand the difference between:
- dbaccess/source/filter/hsqldb/fbcreateparser.cxx
- dbaccess/source/filter/hsqldb/parseschema.cxx
- dbaccess/source/filter/hsqldb/createparser.cxx
Comment 3 Julien Nabet 2018-05-29 20:35:13 UTC
(In reply to Julien Nabet from comment #2)
> I tried to mimic
> https://cgit.freedesktop.org/libreoffice/core/commit/
> ?id=b18953565b68e46289ad85927d79f5978a51078b but I don't understand the
> difference between:
> - dbaccess/source/filter/hsqldb/fbcreateparser.cxx
> - dbaccess/source/filter/hsqldb/parseschema.cxx
> - dbaccess/source/filter/hsqldb/createparser.cxx

The last one isn't in the patch but allows to parse hsqldb too.
Comment 4 Xisco Faulí 2018-06-06 17:45:02 UTC
In HSQLDB I get 29.05.18 07:49 while in Firebird i get 29.05.18 05:49, which is the UTC time
Comment 5 Commit Notification 2018-07-06 08:34:47 UTC
Tamas Bunth committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=8f3d6e67b08ed1bce9bc989e5e3df92c4d9d95d3

tdf#117867 dbahsql: Migrate default values

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