Description: The following query in a single table mysql database works when send directly to MariaDB, but not when send via the parser: SELECT `ANK`.`company`, `ANK`.`journal`,`ANK`.`pb`, `ANK`.`db`, `DEUTERO`.`dbdesc`, SUM( CASE WHEN `ANK`.`year` = 2024 THEN `ANK`.`dc` END ) AS `T`, SUM( CASE WHEN `ANK`.`year` = 2024 - 1 THEN `ANK`.`dc` END ) AS `T_prev`, SUM( CASE WHEN `ANK`.`year` = 2024 THEN `ANK`.`dc` END ) - SUM( CASE WHEN `ANK`.`year` = 2024 - 1 THEN `ANK`.`dc` END ) AS `Diff`, ( SUM( CASE WHEN `ANK`.`year` = 2024 THEN `ANK`.`dc` END ) / NULLIF ( SUM( CASE WHEN `ANK`.`year` = 2024 - 1 THEN `ANK`.`dc` END ), 0 ) - 1 ) AS `Percent` FROM `ANK` LEFT JOIN `DEUTERO` ON `ANK`.`db` = `DEUTERO`.`db` WHERE `ANK`.`year` >= 2024 - 1 AND `company` = 'VD' AND `ANK`.`omada` = '6' AND `ANK`.`month` <= 12 AND `ANK`.`journal` = 'ΓΗ' GROUP BY `ANK`.`pb`, `ANK`.`db` WITH ROLLUP The reason is the usage of WITH ROLLUP in the GROUP BY statement. However, as I would like to use parameters, I would like to use the parser. Steps to Reproduce: 1. Connect to a MariaDB or MySQL database 2. Write a query with a WITH ROLLUP in the GROUP BY statement. 3. Send it via the parser Actual Results: Syntax error Expected Results: The requested query Reproducible: Always User Profile Reset: Yes Additional Info: Version: 25.2.5.2 (X86_64) / LibreOffice Community Build ID: 03d19516eb2e1dd5d4ccd751a0d6f35f35e08022 CPU threads: 12; OS: Linux 6.14; UI render: default; VCL: gtk3 Locale: el-GR (en_US.UTF-8); UI: en-US Flatpak Calc: threaded
Could confirm "WITH ROLLUP" is only working in direct SQL mode. Like other special commands this is a command not used in internal databases. Would be a good idea to support this function. Have a look also to https://bugs.documentfoundation.org/show_bug.cgi?id=166303 - other commands only known in direct SQL for MariaDB.