Server crashes in is_invalid_role_name on reloading ACL with a blank role name

Description

1 2 create role ' '; flush privileges;

Stack trace from 10.0 0403790722e3941779ccea26e85fcd818e2320b5

1 2 3 4 5 6 7 8 9 10 11 12 13 14 #3 <signal handler called> #4 0x00000000005f4396 in is_invalid_role_name (str=0x0) at 10.0/sql/sql_acl.cc:804 #5 0x00000000005f51af in acl_load (thd=0x7f070efd4070, tables=0x7f0715caed30) at 10.0/sql/sql_acl.cc:1167 #6 0x00000000005f6c2a in acl_reload (thd=0x7f070efd4070) at 10.0/sql/sql_acl.cc:1614 #7 0x00000000007cb2b8 in reload_acl_and_cache (thd=0x7f070efd4070, options=1, tables=0x0, write_to_binlog=0x7f0715cb11dc) at 10.0/sql/sql_reload.cc:82 #8 0x0000000000682efb in mysql_execute_command (thd=0x7f070efd4070) at 10.0/sql/sql_parse.cc:4278 #9 0x0000000000688a5e in mysql_parse (thd=0x7f070efd4070, rawbuf=0x7f070dbf8088 "flush privileges", length=16, parser_state=0x7f0715cb1600) at 10.0/sql/sql_parse.cc:6531 #10 0x000000000067b43f in dispatch_command (command=COM_QUERY, thd=0x7f070efd4070, packet=0x7f070efca071 "flush privileges", packet_length=16) at 10.0/sql/sql_parse.cc:1308 #11 0x000000000067a725 in do_command (thd=0x7f070efd4070) at 10.0/sql/sql_parse.cc:999 #12 0x0000000000798c86 in do_handle_one_connection (thd_arg=0x7f070efd4070) at 10.0/sql/sql_connect.cc:1378 #13 0x00000000007989e5 in handle_one_connection (arg=0x7f070efd4070) at 10.0/sql/sql_connect.cc:1293 #14 0x0000000000cdb22b in pfs_spawn_thread (arg=0x7f070d9da5f0) at 10.0/storage/perfschema/pfs.cc:1860 #15 0x00007f0715934b50 in start_thread (arg=<optimized out>) at pthread_create.c:304 #16 0x00007f0713bea95d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112

Environment

None

Status

Assignee

Sergei Golubchik

Reporter

Elena Stepanova

Labels

None

External issue ID

None

External issue ID

None

Components

Sprint

None

Fix versions

Affects versions

10.0
10.1

Priority

Major