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

          Priority: medium
            Bug ID: 82403
          Assignee: [email protected]
           Summary: Base:  CONCAT string function returns error when given
                    more than two strings to concatenate (query builder)
          Severity: minor
    Classification: Unclassified
                OS: All
          Reporter: [email protected]
          Hardware: Other
            Status: UNCONFIRMED
           Version: 4.3.0.4 release
         Component: Database
           Product: LibreOffice

Created attachment 104359
  --> https://bugs.freedesktop.org/attachment.cgi?id=104359&action=edit
error message from concatenate

CONCAT string function in HSQLDB (default Base format) is supposed to handle
*minimum* of two string arguments, up to indeterminate number, ie, CONCAT('a',
'b', 'c', 'd').  Query builder accepts the function, but on execution returns:

S1000 General error java.lang.ArrayIndexOutOfBoundsException: 2 in statement
[SELECT CONCAT('a', 'b', 'c', 'd') FROM "Table1"]

See screenshot.  Base HSQLDB accepts *maximum* of two arguments for CONCAT
function, is regression from documentation.

See HSQLDB documentation:
http://hsqldb.org/doc/guide/builtinfunctions-chapt.html#bfc_string_binary_functions

At this time, I am not encountering this same problem via native or JBDC MySQL
connectors although that might be new (did the development releases fix?).

Steps to replicate:

1.  In default HSQLDB-formatted database, create query in design view.
2.  Create function field CONCAT('a', 'b', 'c', 'd')
3.  Execute query

Actual result:  General error.

Expected result:  table with one row 'abcd'

Obviously, there is a workaround at this time of stringing together multiple
CONCAT functions, ie CONCAT(CONCAT(CONCAT('a', 'b'), 'c'), 'd'), but would be
better to fix.

-- 
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