Bug #109525 the Maximum Length of Compound Statement Label (characters) is inaccurate
Submitted: 4 Jan 2023 6:18 Modified: 4 Jan 2023 12:50
Reporter: yuling zhang Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Stored Routines Severity:S3 (Non-critical)
Version:mysql-8.0.25-linux-glibc2.12-x86_64.tar., 8.0.31 OS:CentOS (Linux release 7.9.2009 (Core))
Assigned to: CPU Architecture:x86

[4 Jan 2023 6:18] yuling zhang
Description:
Recently we are testing MySQL8.0.25 and noticed the the Maximum Length of Compound Statement Label  (characters) is inaccurate.

As described in the document the Maximum Length of Compound Statement Label  (characters) is 16.

https://dev.mysql.com/doc/refman/8.0/en/identifier-length.html

but when the label's length is 65, the sql still execute successfully without any warning.

Maybe the description is wrong.

How to repeat:
create database test1;
use test1;
CREATE TABLE employee (
           NAME  CHAR(20),
           AGE int,
           SEX CHAR(10),
           INCOME float );
delimiter $$
create procedure p1(in param int)
    begin
    westwestwestwestwestwestwestwestwestwestwestwestwestwesaatwestwes:loop  # the label's length is 65
        insert into employee(name) values(now());
        set param=param+1;
        if param>10 then
            leave westwestwestwestwestwestwestwestwestwestwestwestwestwesaatwestwes;
        end if;
    end loop;
    end$$
delimiter ;
call p1(10);
[4 Jan 2023 6:26] yuling zhang
Server version: 8.0.25 MySQL Community Server - GPL
[4 Jan 2023 12:50] MySQL Verification Team
Hello yuling zhang,

Thank you for the report and feedback.

regards,
Umesh