Bug #92898 | Error MY-013235 Error in parsing View during upgrade with MySQL 8.0.13 | ||
---|---|---|---|
Submitted: | 23 Oct 2018 13:08 | Modified: | 23 Oct 2018 19:37 |
Reporter: | Georgi Sotirov | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: DML | Severity: | S2 (Serious) |
Version: | 8.0.13 | OS: | Linux (Slackware64 current) |
Assigned to: | CPU Architecture: | x86 |
[23 Oct 2018 13:08]
Georgi Sotirov
[23 Oct 2018 13:44]
MySQL Verification Team
Thank you for the bug report. To process this bug report is necessary a repeatable test case, please re-open when you are able to provide the test case. Thanks in advance.
[23 Oct 2018 14:15]
Georgi Sotirov
I'm really not sure how to provide a repeatable test case for this problem, because it's the server trying to upgrade a database that was previously ran by MySQL 8.0.12. The problematic view is as simple as: CREATE VIEW AvrgByMonth AS SELECT YEAR(`table`.`date`) AS `Year`, (COUNT(0) / 12) AS `Average` FROM `table` GROUP BY YEAR(`table`.`date`) DESC; I.t. it just counts the average number of rows in table per month for a given year. Can you please, indicate what's the problem with this syntax in MySQL 8.0.13?
[23 Oct 2018 16:24]
MySQL Verification Team
Thank you for the feedback. Please see the link: https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-13.html#mysqld-8-0-13-sql-syntax "Incompatible Change: ..... ...... Queries and stored program definitions from MySQL 8.0.12 or lower that use ASC or DESC qualifiers for GROUP BY clauses should be amended. Otherwise, ...."
[23 Oct 2018 16:27]
MySQL Verification Team
Sorry I removed the initial quoiting note: "SQL Syntax Notes Incompatible Change: The deprecated ASC or DESC qualifiers for GROUP BY clauses have been removed. ...."
[23 Oct 2018 19:37]
Georgi Sotirov
Thank you very much Miguel for uncovering the reason for my problem. I'm pretty sure I've read about ASC and DESC on GROUP BY being deprecated and I'm really not sure why I used this syntax in the past, but apparently I have to update those old view's definitions. However, for this I'l have to revert to 8.0.12 and then upgrade back to 8.0.13, right?