Description:
The upgrade checker's `syntax` check raises a blocking Error on any stored routine whose body contains the legacy GROUP BY <cols> WITH ROLLUP syntax, reporting:
```
<schema>.<routine> - L:C: syntax error: near 'with'
```
`WITH ROLLUP` is valid, documented, non-deprecated SQL "GROUP BY Modifiers". The server parses and executes it correctly on 8.0, 8.4, and 9.7. The checker parses routine bodies with MySQL Shell's bundled parser rather than the server parser, and that bundled parser cannot parse GROUP BY ... WITH ROLLUP, so the check emits a false positive that blocks the upgrade.
The error message attributes the failure to "names that conflict with new reserved keywords" and advises quoting them — misleading here, because this is not a reserved-keyword conflict and backticking the identifiers does not help.
How to repeat:
1. On a MySQL 8.0.x server, create a routine using WITH ROLLUP
```
CREATE DATABASE IF NOT EXISTS upgrade_syntax_lab;
USE upgrade_syntax_lab;
CREATE TABLE t (id int, campus_id int, hospital_id int);
DELIMITER $$
CREATE PROCEDURE rollup_only(h int)
SQL SECURITY INVOKER
BEGIN
SELECT campus_id, COUNT(*) AS c
FROM t
WHERE hospital_id = h
GROUP BY campus_id
WITH ROLLUP;
END$$
DELIMITER ;
```
2. Run the upgrade checker targeting a higher version:
mysqlsh root@host:port -- util check-for-server-upgrade --target-version=8.4.7 --include=syntax
3. Syntax check reports an error:
```
upgrade_syntax_lab.rollup_only - 8:5: syntax error: near 'with'
```
Description: The upgrade checker's `syntax` check raises a blocking Error on any stored routine whose body contains the legacy GROUP BY <cols> WITH ROLLUP syntax, reporting: ``` <schema>.<routine> - L:C: syntax error: near 'with' ``` `WITH ROLLUP` is valid, documented, non-deprecated SQL "GROUP BY Modifiers". The server parses and executes it correctly on 8.0, 8.4, and 9.7. The checker parses routine bodies with MySQL Shell's bundled parser rather than the server parser, and that bundled parser cannot parse GROUP BY ... WITH ROLLUP, so the check emits a false positive that blocks the upgrade. The error message attributes the failure to "names that conflict with new reserved keywords" and advises quoting them — misleading here, because this is not a reserved-keyword conflict and backticking the identifiers does not help. How to repeat: 1. On a MySQL 8.0.x server, create a routine using WITH ROLLUP ``` CREATE DATABASE IF NOT EXISTS upgrade_syntax_lab; USE upgrade_syntax_lab; CREATE TABLE t (id int, campus_id int, hospital_id int); DELIMITER $$ CREATE PROCEDURE rollup_only(h int) SQL SECURITY INVOKER BEGIN SELECT campus_id, COUNT(*) AS c FROM t WHERE hospital_id = h GROUP BY campus_id WITH ROLLUP; END$$ DELIMITER ; ``` 2. Run the upgrade checker targeting a higher version: mysqlsh root@host:port -- util check-for-server-upgrade --target-version=8.4.7 --include=syntax 3. Syntax check reports an error: ``` upgrade_syntax_lab.rollup_only - 8:5: syntax error: near 'with' ```