[MDEV-5520] Connection lost on wrong CREATE ROLE Created: 2014-01-12  Updated: 2014-02-04  Resolved: 2014-02-04

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: 10.0.7
Fix Version/s: 10.0.8

Type: Bug Priority: Major
Reporter: Federico Razzoli Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: None


 Description   

MariaDB [test]> CREATE ROLE '';
ERROR 2013 (HY000): Lost connection to MySQL server during query

I don't expect this statement to work, but why is connection lost?



 Comments   
Comment by Elena Stepanova [ 2014-01-12 ]

That's because it crashes.

#2  0x00000000008487dd in handle_fatal_signal (sig=11) at 10.0/sql/signal_handler.cc:262
#3  <signal handler called>
#4  0x0000000000ec17aa in insert_dynamic (array=0x58, element=0x7ff1a6ffa208) at 10.0/mysys/array.c:89
#5  0x00000000005e1a46 in add_role_user_mapping (grantee=0x7ff1a896e070, role=0x0) at 10.0/sql/sql_acl.cc:2342
#6  0x00000000005f5695 in mysql_create_user (thd=0x7ff1b5f4c070, list=..., handle_as_role=true) at 10.0/sql/sql_acl.cc:9169
#7  0x0000000000668835 in mysql_execute_command (thd=0x7ff1b5f4c070) at 10.0/sql/sql_parse.cc:4038
#8  0x000000000066eb28 in mysql_parse (thd=0x7ff1b5f4c070, rawbuf=0x7ff1a8822088 "create role ''", length=14, parser_state=0x7ff1a6ffd630) at 10.0/sql/sql_parse.cc:6394
#9  0x00000000006619e2 in dispatch_command (command=COM_QUERY, thd=0x7ff1b5f4c070, packet=0x7ff1af24c071 "create role ''", packet_length=14) at 10.0/sql/sql_parse.cc:1296
#10 0x0000000000660d84 in do_command (thd=0x7ff1b5f4c070) at 10.0/sql/sql_parse.cc:993
#11 0x000000000077a4e5 in do_handle_one_connection (thd_arg=0x7ff1b5f4c070) at 10.0/sql/sql_connect.cc:1379
#12 0x000000000077a238 in handle_one_connection (arg=0x7ff1b5f4c070) at 10.0/sql/sql_connect.cc:1293
#13 0x0000000000a9d219 in pfs_spawn_thread (arg=0x7ff1af64cf90) at 10.0/storage/perfschema/pfs.cc:1853
#14 0x00007ff1d5371b50 in start_thread (arg=<optimized out>) at pthread_create.c:304
#15 0x00007ff1d3ec0a7d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112

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