https://bugs.freedesktop.org/show_bug.cgi?id=53867

             Bug #: 53867
           Summary: VIEWING: Base MySQL (JDBC) Problem with Query Builder
    Classification: Unclassified
           Product: LibreOffice
           Version: 3.5.6.2 rc
          Platform: Other
        OS/Version: All
            Status: UNCONFIRMED
 Status Whiteboard: BSA
          Severity: normal
          Priority: medium
         Component: Database
        AssignedTo: [email protected]
        ReportedBy: [email protected]


Created attachment 65864
  --> https://bugs.freedesktop.org/attachment.cgi?id=65864
Attached is a screenshot from where I tested the SQL statement (the smaller
box) using Tools -> SQL... The main image is the same SQL statement failing to
be made in the Query Builder.

Problem description: 
I have my LibreOffice Base connected to my MySQL database server. I have a
valid query that I have tested. Attached is a picture where I show you the
query is valid using Tools -> SQL... This query also works (without the grave
accents LibreOffice uses for MySQL) directly in MySQL.

The problem is with the Query Builder and the MySQL function, DATE_SUB. Query
Builder has a problem with the second parameter, the INTERVAL 2 WEEK.

http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#function_date-add
explains that there is nothing wrong with this statement. I also tried to put
the 2 in quotes as it is technically a string, but Query Builder wouldn't allow
this either.

In short, the run SQL command (and MySQL) has no problem with the statement,
but Query Builder claims the statement is invalid.

Steps to reproduce:
1. Connect to a MySQL database.
2. Click 'Create Query in SQL view...'
3. Create a query that uses the DATE_ADD or DATE_SUB functions.

Current behavior:
Gives Error Code:  1000 and will not proceed.

Expected behavior:
As the statement is valid, it should allow you to save and run the query.

Platform (if different from the browser): 
I am using 64-bit Microsoft Windows 7.

Browser: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.1 (KHTML, like
Gecko) Chrome/21.0.1180.79 Safari/537.1

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to