[Libreoffice-bugs] [Bug 144694] New: Base Direct SQL Not Running Properly

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Fri Sep 24 06:56:18 UTC 2021


https://bugs.documentfoundation.org/show_bug.cgi?id=144694

            Bug ID: 144694
           Summary: Base Direct SQL Not Running Properly
           Product: LibreOffice
           Version: 7.2.1.1 rc
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Base
          Assignee: libreoffice-bugs at lists.freedesktop.org
          Reporter: flywire0 at gmail.com

Direct SQL should process code the same as running it directly for both Tools →
SQL and Query → Direct SQL.

The only real difference between these commands should be the second one holds
the output in a view (query grid).

(In reply to Robert Großkopf from
https://bugs.documentfoundation.org/show_bug.cgi?id=143656#c18)
> (In reply to flywire from comment #17)

Your findings are consistent with mine:

> Empty SQLite database:
> 1. Output is never generated by Tools → SQL
> 2. Run code through Query → Direct SQL and table is generated first time [but returns error "The data content could not be loaded. The execution of the query doesn't return a valid result set."], run WITH RECURSIVE... code again and output is generated.

=====

*query.sql*

CREATE TABLE org(
  name TEXT PRIMARY KEY,
  boss TEXT REFERENCES org
) WITHOUT ROWID;
INSERT INTO org VALUES('Alice',NULL);
INSERT INTO org VALUES('Bob','Alice');
INSERT INTO org VALUES('Cindy','Alice');
INSERT INTO org VALUES('Dave','Bob');
INSERT INTO org VALUES('Emma','Bob');
INSERT INTO org VALUES('Fred','Cindy');
INSERT INTO org VALUES('Gail','Cindy');

WITH RECURSIVE
  under_alice(name,level) AS (
    VALUES('Alice',0)
    UNION ALL
    SELECT org.name, under_alice.level+1
      FROM org JOIN under_alice ON org.boss=under_alice.name
     ORDER BY 2 DESC
  )
SELECT substr('..........',1,level*3) || name FROM under_alice;

*output*

Alice
...Bob
......Dave
......Emma
...Cindy
......Fred
......Gail


Version: 7.3.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: e9b674a768fcf534335f172664aaf13dc2c79023
CPU threads: 8; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win
Locale: en-AU (en_AU); UI: en-GB
Calc: threaded

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20210924/63f30aec/attachment.htm>


More information about the Libreoffice-bugs mailing list