Bug #101340 update5.7 to mysqld 8.0.21-0ubuntu0.20.04.4
Submitted: 27 Oct 13:39 Modified: 27 Oct 13:49
Reporter: tinker nig Email Updates:
Status: Need Feedback Impact on me:
None 
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 13:39] tinker nig
Description:
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 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).