[MDEV-8612] Assertion `granted_role->is_role()' failed in mysql_grant_role on granting role starting with 0-character Created: 2015-08-13  Updated: 2022-09-08

Status: Confirmed
Project: MariaDB Server
Component/s: Admin statements
Affects Version/s: 10.0, 10.1
Fix Version/s: 10.1

Type: Bug Priority: Minor
Reporter: Elena Stepanova Assignee: Sergei Golubchik
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-5164 Testing Roles Closed

 Description   

I don't know if there is any practical meaning in this issue, but since I stumbled across it, I'll file it anyway.

GRANT '\0foo' TO bar;

Stack trace from 10.0 0403790722e3941779ccea26e85fcd818e2320b5

10.0/sql/sql_acl.cc:5967: bool mysql_grant_role(THD*, List<st_lex_user>&, bool): Assertion `granted_role->is_role()' failed.
150813 14:08:45 [ERROR] mysqld got signal 6 ;
 
#6  0x00007f37e9cd0311 in *__GI___assert_fail (assertion=0xef990e "granted_role->is_role()", file=<optimized out>, line=5967, function=0xefc000 "bool mysql_grant_role(THD*, List<st_lex_user>&, bool)") at assert.c:81
#7  0x0000000000603fe9 in mysql_grant_role (thd=0x7f37e53d4070, list=..., revoke=false) at 10.0/sql/sql_acl.cc:5967
#8  0x0000000000682dcb in mysql_execute_command (thd=0x7f37e53d4070) at 10.0/sql/sql_parse.cc:4243
#9  0x0000000000688a5e in mysql_parse (thd=0x7f37e53d4070, rawbuf=0x7f37e3ff8088 "GRANT '", length=19, parser_state=0x7f37e33b4600) at 10.0/sql/sql_parse.cc:6531
#10 0x000000000067b43f in dispatch_command (command=COM_QUERY, thd=0x7f37e53d4070, packet=0x7f37e53ca071 "GRANT '", packet_length=20) at 10.0/sql/sql_parse.cc:1308
#11 0x000000000067a725 in do_command (thd=0x7f37e53d4070) at 10.0/sql/sql_parse.cc:999
#12 0x0000000000798c86 in do_handle_one_connection (thd_arg=0x7f37e53d4070) at 10.0/sql/sql_connect.cc:1378
#13 0x00000000007989e5 in handle_one_connection (arg=0x7f37e53d4070) at 10.0/sql/sql_connect.cc:1293
#14 0x0000000000cdb22b in pfs_spawn_thread (arg=0x7f37e3dda5f0) at 10.0/storage/perfschema/pfs.cc:1860
#15 0x00007f37ebacab50 in start_thread (arg=<optimized out>) at pthread_create.c:304
#16 0x00007f37e9d8095d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112


Generated at Thu Feb 08 07:28:27 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.