Bug #101340 update5.7 to mysqld 8.0.21-0ubuntu0.20.04.4
Submitted: 27 Oct 2020 13:39 Modified: 27 Nov 2020 13:49
Reporter: tinker nig Email Updates:
Status: No Feedback Impact on me:
Category:MySQL Server: Installing Severity:S2 (Serious)
Version:8.0.21 OS:Linux (ubuntu0.20.04.4)
Assigned to: CPU Architecture:x86
Tags: Error in parsing Routine

[27 Oct 2020 13:39] tinker nig
the error log in /var/log/mysql/error.log as follow:
Error in parsing Routine 'test'.'test_proc' during upgrade. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(num),FROM_UNIXTIME(UNIX_TIMESTAMP('2018-01-01 00:00:00')+RAND()*1000%365*24*60*' at line 5

How to repeat:
create a producer with the function FROM_UNIXTIME(UNIX_TIMESTAMP('2018-01-01 00:00:00')+RAND()*1000%365*24*60,in mysql 5.7,then upgrade the mysql to 8.0.
then the server can't start

Suggested fix:
it seems the FROM_UNIXTIME or my producer define sql contains syntax not supported in 8.0
[27 Oct 2020 13:49] MySQL Verification Team
Thank you for the bug report. 2 things: 1- Try to upgrade to latest 8.0.22. 2- If the issue continues with 8.0.22 provide the complete script to create the procedure on 5.7 (provide the 5.7 version too).
[28 Nov 2020 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".