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

          Priority: medium
            Bug ID: 72267
          Assignee: libreoffice-bugs@lists.freedesktop.org
           Summary: "Is Null" is invalid SQL
          Severity: major
    Classification: Unclassified
                OS: Linux (All)
          Reporter: t...@tim-passingham.co.uk
          Hardware: x86-64 (AMD64)
            Status: UNCONFIRMED
           Version: 4.2.0.0.beta1
         Component: Database
           Product: LibreOffice

Created attachment 90158
  --> https://bugs.freedesktop.org/attachment.cgi?id=90158&action=edit
Demo database

Prior to 4.2 Beta (e.g. in 4.1.3.2) the following SQL is valid:

   SELECT "id", "txt", "num" FROM "Table1" WHERE "num" IS NULL

In 4.2 Beta this results in:

  "Syntax error in SQL statement

       syntax is ambiguous"

See the attached demonstration odb, which includes the definition of Table1 (id
is the integer primary key, txt is mandatory text, num is an optional integer),
and the above query is Query1.

The same error occurs using an external database with much more complex queries
(I came across it with a MariaDB 10 database connected using MySql(JDBC)).  I
produced this stand-alone example to make it easy to reproduce the problem.

This is a non-trivial issue, since checking if a field is NULL is particularly
useful in some situations (eg where it may be a foreign key).

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to