Bug 79433 - Other: Uninformative error messages in sql queries
Summary: Other: Uninformative error messages in sql queries
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
4.2.4.2 release
Hardware: Other All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard: BSA
Keywords:
Depends on:
Blocks: Error-Messages Database-Queries
  Show dependency treegraph
 
Reported: 2014-05-30 03:22 UTC by David Dyer-Bennet
Modified: 2017-11-05 23:25 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot of the SQL query and the resulting error messages. (49.99 KB, image/jpeg)
2014-05-30 03:22 UTC, David Dyer-Bennet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Dyer-Bennet 2014-05-30 03:22:17 UTC
Created attachment 100132 [details]
Screenshot of the SQL query and the resulting error messages.

In a database I created a table "foobar".  I then tried both to use the SQL tool, and to create an SQL query, that executed the SQL command "truncate table foobar".  

The error resulting is a basic "syntax erro", which if I ask for more detail breaks down into three errors none of which contain any actual information.  So far as I can tell from HSQLDB docs, the syntax is flawless (I did play with presence and absence of a terminating ";", that makes no difference).  And the "BETWEEN" and "IN" token referenced *aren't* syntactically valid there according to the HSQLDB docs. 
              
Operating System: Windows 7
Version: 4.2.4.2 release
Comment 1 Robert Großkopf 2014-06-08 18:13:26 UTC
I could confirm the information of the error-message of the query-editor is very confusing. Don't know where the message come from (HSQLDB or internal dialog?). So I set this bug to new and as an ask for an enhancement (better messages ...).
It's the same behavior on all systems - get the same with Linux rpm.

What do you want to get with "truncate table toolbar"? 
In the internal HSQLDB (1.8!) there is a function TRUNCATE.
TRUNCATE(2.37456,2) = 2.37

The code you put in the query-editor isn't a valid query for the internal HSQLDB and any other database. The query-editor does allow only queries. And so the editor produces an error-message, which seems to be the last in a circle of informations. Says only: I'm missing a possible end of a query. Better would be: The command isn't a query - it doesn't start with SELECT.

The code would work together, for example, MySQL, when you put it to Tools → SQL.
Could be you need something like 
truncate table `toolbar`
Comment 2 Alex Thurgood 2015-01-03 17:40:54 UTC Comment hidden (no-value)