Bug 140713 - Error if I do a Time query in LibreOffice Base [Critical]
Summary: Error if I do a Time query in LibreOffice Base [Critical]
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
7.1.0.3 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-28 13:37 UTC by Faizan Rizwan
Modified: 2022-01-28 09:51 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Image of error. (151.70 KB, image/jpeg)
2021-03-01 15:33 UTC, Faizan Rizwan
Details
Test file containing hour fields in table Timetable (3.71 KB, application/vnd.oasis.opendocument.database)
2021-09-23 10:28 UTC, Alex Thurgood
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Faizan Rizwan 2021-02-28 13:37:08 UTC
Description:
I created a table in which I wanted to find the records which have a Departure Time more than 10:00:00. When I try that in LibreOffice Base Query Editor I enter: > '10:00:00: in the criterion, but when I ran the query it gave me this error:

firebird_sdbc error:
*conversion error from string "10:00:00.000000000"
caused by
'isc_dsql_fetch'

This is the SQL for it:

SELECT "Flight number" FROM "Table1" WHERE "Notes" = 'Passengers only' AND "Departure time" > '10:00:00.000000000'

See, the problem here is that Base is automatically adding trailer zeros in front of the time I have specified. 

Please fix this. There shouldn't be such a big in such a simple thing.

Steps to Reproduce:
1. Make a field and sets its data type as "Time"
2. Fill in some time values for the database.
3.Make a query in which you compare the times, e.g. finding the record which has the time more than 10:00.

Actual Results:
SELECT "Flight number" FROM "Table1" WHERE "Notes" = 'Passengers only' AND "Departure time" > '10:00:00.000000000'

Expected Results:
It should have found the single record which satisfied the criterion.


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Version: 7.1.0.3 (x64) / LibreOffice Community
Build ID: f6099ecf3d29644b5008cc8f48f42f4a40986e4c
CPU threads: 8; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL: win
Locale: en-GB (en_US); UI: en-GB
Calc: CL
Comment 1 Xisco Faulí 2021-03-01 12:23:02 UTC
Thank you for reporting the bug. Please attach a sample document, as this makes it easier for us to verify the bug. 
I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' once the requested document is provided.
(Please note that the attachment will be public, remove any sensitive information before attaching it. 
See https://wiki.documentfoundation.org/QA/FAQ#How_can_I_eliminate_confidential_data_from_a_sample_document.3F for help on how to do so.)
Comment 2 Faizan Rizwan 2021-03-01 15:33:11 UTC
Created attachment 170152 [details]
Image of error.
Comment 3 Buovjaga 2021-03-26 17:19:03 UTC
(In reply to Faizan Rizwan from comment #2)
> Created attachment 170152 [details]
> Image of error.

This is a screenshot, while we would like a Base document.

Set to NEEDINFO.
Change back to UNCONFIRMED after you have provided the document.
Comment 4 QA Administrators 2021-09-23 03:34:12 UTC Comment hidden (obsolete)
Comment 5 Alex Thurgood 2021-09-23 10:26:58 UTC
No repro with

Version: 7.1.5.2 / LibreOffice Community
Build ID: 85f04e9f809797b8199d13c421bd8a2b025d52b5
CPU threads: 8; OS: Mac OS X 10.16; UI render: default; VCL: osx
Locale: fr-FR (fr_FR.UTF-8); UI: fr-FR
Calc: threaded

1) Created an embedded Firebird ODB file (attached)

2) Manually created a table called "Timetable" in the GUI table editor 

3) This table had 3 fields :
- an ID field (INT) autoincrement primary key
- a departure time field (HOUR/Time)
- an arrival time field (HOUR/Time) 

4) Entered some sample data into the Timetable table

5) Created and saved a manual SQL query with a parameter, saved as "DepartureLaterThan"

The query is as follows:
SELECT * FROM "Timetable" WHERE "departure" > :dep

6) Execute the query, enter a departure time, e.g. 07:30

7) Correct query results displayed - no error
Comment 6 Alex Thurgood 2021-09-23 10:28:04 UTC
Created attachment 175213 [details]
Test file containing hour fields in table Timetable
Comment 7 Julien Nabet 2022-01-28 09:51:26 UTC
No feedback since 03/2021, so 10 months, following Alex's comment, let's put this one to WFM.

Faizan: don't hesitate to reopen this tracker if you still reproduce this with LO 7.2.5 and in this case provide the odb file so we can give it a try.