(gdb) info threads
  Id   Target Id         Frame 
  55   Thread 0x416a6940 (LWP 30401) "mysqld" 0x000000338d60aee9 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
  54   Thread 0x421ad940 (LWP 30402) "mysqld" 0x000000338d60aee9 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
  53   Thread 0x429ae940 (LWP 30403) "mysqld" 0x000000338d60aee9 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
  52   Thread 0x431af940 (LWP 30404) "mysqld" 0x000000338d60aee9 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
  51   Thread 0x439b0940 (LWP 30405) "mysqld" 0x000000338d60aee9 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
  50   Thread 0x441b1940 (LWP 30406) "mysqld" 0x000000338d60aee9 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
  49   Thread 0x40a37940 (LWP 30407) "mysqld" 0x000000338d60aee9 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
  48   Thread 0x449b2940 (LWP 30408) "mysqld" 0x000000338d60aee9 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
  47   Thread 0x451b3940 (LWP 30409) "mysqld" 0x000000338d60aee9 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
  46   Thread 0x459b4940 (LWP 30410) "mysqld" 0x000000338d60aee9 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
  45   Thread 0x461b5940 (LWP 30411) "mysqld" 0x000000338cacd722 in select () from /lib64/libc.so.6
  44   Thread 0x469b6940 (LWP 30412) "mysqld" 0x000000338cacd722 in select () from /lib64/libc.so.6
  43   Thread 0x471b7940 (LWP 30413) "mysqld" 0x000000338cacd722 in select () from /lib64/libc.so.6
  42   Thread 0x479b8940 (LWP 30414) "mysqld" 0x000000338cacd722 in select () from /lib64/libc.so.6
  41   Thread 0x481b9940 (LWP 30421) "mysqld" 0x000000338d60aee9 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
  40   Thread 0x416e7940 (LWP 30422) "mysqld" 0x000000338d60e838 in do_sigwait () from /lib64/libpthread.so.0
  39   Thread 0x41728940 (LWP 30423) "mysqld" 0x000000338d60db3b in accept () from /lib64/libpthread.so.0
  38   Thread 0x400b5940 (LWP 30424) "mysqld" 0x000000338d60d4c4 in __lll_lock_wait () from /lib64/libpthread.so.0
  37   Thread 0x40cf4940 (LWP 14343) "mysqld" 0x000000338d60d4c4 in __lll_lock_wait () from /lib64/libpthread.so.0
  36   Thread 0x40b3b940 (LWP 14404) "mysqld" 0x000000338d60d4c4 in __lll_lock_wait () from /lib64/libpthread.so.0
  35   Thread 0x4827c940 (LWP 14432) "mysqld" 0x000000338d60d4c4 in __lll_lock_wait () from /lib64/libpthread.so.0
  34   Thread 0x40df8940 (LWP 14444) "mysqld" 0x000000338d60d4c4 in __lll_lock_wait () from /lib64/libpthread.so.0
  33   Thread 0x482fe940 (LWP 14448) "mysqld" 0x000000338d60d4c4 in __lll_lock_wait () from /lib64/libpthread.so.0
  32   Thread 0x40d35940 (LWP 14456) "mysqld" 0x000000338d60d4c4 in __lll_lock_wait () from /lib64/libpthread.so.0
  31   Thread 0x40e39940 (LWP 14460) "mysqld" 0x000000338d60d4c4 in __lll_lock_wait () from /lib64/libpthread.so.0
  30   Thread 0x40c80940 (LWP 14466) "mysqld" 0x000000338d60d4c4 in __lll_lock_wait () from /lib64/libpthread.so.0
  29   Thread 0x40c3f940 (LWP 14474) "mysqld" 0x000000338d60d4c4 in __lll_lock_wait () from /lib64/libpthread.so.0
  28   Thread 0x401e1940 (LWP 14475) "mysqld" 0x000000338d60d4c4 in __lll_lock_wait () from /lib64/libpthread.so.0
  27   Thread 0x4012b940 (LWP 14479) "mysqld" 0x000000338d60d4c4 in __lll_lock_wait () from /lib64/libpthread.so.0
  26   Thread 0x40db7940 (LWP 14483) "mysqld" 0x000000338d60d4c4 in __lll_lock_wait () from /lib64/libpthread.so.0
  25   Thread 0x4833f940 (LWP 14495) "mysqld" 0x000000338d60d4c4 in __lll_lock_wait () from /lib64/libpthread.so.0
  24   Thread 0x4823b940 (LWP 14498) "mysqld" 0x000000338d60d4c4 in __lll_lock_wait () from /lib64/libpthread.so.0
  23   Thread 0x40afa940 (LWP 14502) "mysqld" 0x000000338d60d4c4 in __lll_lock_wait () from /lib64/libpthread.so.0
  22   Thread 0x40bbd940 (LWP 14505) "mysqld" 0x000000338d60d4c4 in __lll_lock_wait () from /lib64/libpthread.so.0
  21   Thread 0x482bd940 (LWP 14509) "mysqld" 0x000000338d60d4c4 in __lll_lock_wait () from /lib64/libpthread.so.0
  20   Thread 0x417eb940 (LWP 14513) "mysqld" 0x000000338d60d4c4 in __lll_lock_wait () from /lib64/libpthread.so.0
  19   Thread 0x40d76940 (LWP 14519) "mysqld" 0x000000338d60d4c4 in __lll_lock_wait () from /lib64/libpthread.so.0
  18   Thread 0x40b7c940 (LWP 14524) "mysqld" 0x000000338d60d4c4 in __lll_lock_wait () from /lib64/libpthread.so.0
  17   Thread 0x41943940 (LWP 14533) "mysqld" 0x000000338d60d4c4 in __lll_lock_wait () from /lib64/libpthread.so.0
  16   Thread 0x4182c940 (LWP 14534) "mysqld" 0x000000338d60d4c4 in __lll_lock_wait () from /lib64/libpthread.so.0
  15   Thread 0x481fa940 (LWP 14537) "mysqld" 0x000000338d60d4c4 in __lll_lock_wait () from /lib64/libpthread.so.0
  14   Thread 0x40a78940 (LWP 14543) "mysqld" 0x000000338d60d4c4 in __lll_lock_wait () from /lib64/libpthread.so.0
  13   Thread 0x4186d940 (LWP 14545) "mysqld" 0x000000338d60d4c4 in __lll_lock_wait () from /lib64/libpthread.so.0
  12   Thread 0x41769940 (LWP 14549) "mysqld" 0x000000338d60d4c4 in __lll_lock_wait () from /lib64/libpthread.so.0
  11   Thread 0x41984940 (LWP 14553) "mysqld" 0x000000338d60d4c4 in __lll_lock_wait () from /lib64/libpthread.so.0
  10   Thread 0x418ae940 (LWP 14557) "mysqld" 0x000000338d60d4c4 in __lll_lock_wait () from /lib64/libpthread.so.0
* 9    Thread 0x4016c940 (LWP 14563) "mysqld" 0x000000338d60d4c4 in __lll_lock_wait () from /lib64/libpthread.so.0
  8    Thread 0x48380940 (LWP 14564) "mysqld" 0x000000338d60d4c4 in __lll_lock_wait () from /lib64/libpthread.so.0
  7    Thread 0x40ab9940 (LWP 14569) "mysqld" 0x000000338d60d4c4 in __lll_lock_wait () from /lib64/libpthread.so.0
  6    Thread 0x417aa940 (LWP 14572) "mysqld" 0x000000338d60d4c4 in __lll_lock_wait () from /lib64/libpthread.so.0
  5    Thread 0x483c1940 (LWP 14575) "mysqld" 0x000000338d60d4c4 in __lll_lock_wait () from /lib64/libpthread.so.0
  4    Thread 0x48402940 (LWP 14578) "mysqld" 0x000000338d60d4c4 in __lll_lock_wait () from /lib64/libpthread.so.0
  3    Thread 0x40bfe940 (LWP 14582) "mysqld" 0x000000338d60d4c4 in __lll_lock_wait () from /lib64/libpthread.so.0
  2    Thread 0x418ef940 (LWP 14586) "mysqld" 0x000000338d60d4c4 in __lll_lock_wait () from /lib64/libpthread.so.0
  1    Thread 0x7f77b44ea6f0 (LWP 30193) "mysqld" 0x000000338d60aee9 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
(gdb) bt
#0  0x000000338d60d4c4 in __lll_lock_wait () from /lib64/libpthread.so.0
#1  0x000000338d608e50 in _L_lock_1233 () from /lib64/libpthread.so.0
#2  0x000000338d608dd3 in pthread_mutex_lock () from /lib64/libpthread.so.0
#3  0x00000000006c650b in Events::get_opt_event_scheduler_str () at events.cc:186
#4  0x00000000006755ef in show_status_array (thd=0x1489a70, wild=0x0, variables=<optimized out>, value_type=OPT_GLOBAL, status_var=0x0, prefix=<optimized out>, table=0x1518630, ucase_names=false, cond=0x0) at sql_show.cc:2274
#5  0x00000000006759c9 in fill_variables (thd=0x1489a70, tables=0x16e66e8, cond=0x0) at sql_show.cc:5526
#6  0x0000000000670d60 in get_schema_tables_result (join=0x17bd480, executed_place=PROCESSED_BY_JOIN_EXEC) at sql_show.cc:6241
#7  0x00000000005f11a9 in JOIN::exec (this=0x17bd480) at sql_select.cc:1884
#8  0x00000000005f3199 in mysql_select (thd=0x1489a70, rref_pointer_array=0x148bce0, tables=0x16e66e8, wild_num=0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2684635648, result=0x16e6db8, unit=0x148b6e8, select_lex=0x148bb10) at sql_select.cc:2576
#9  0x00000000005f3b15 in handle_select (thd=0x1489a70, lex=0x148b648, result=0x16e6db8, setup_tables_done_option=0) at sql_select.cc:284
#10 0x0000000000581c50 in execute_sqlcom_select (thd=0x1489a70, all_tables=0x16e66e8, last_timer=0x4016be20) at sql_parse.cc:5852
#11 0x0000000000586a2e in mysql_execute_command (thd=0x1489a70, statement_start=0x4016aa08, post_parse=0x4016be20) at sql_parse.cc:2826
#12 0x000000000058abfa in mysql_parse (thd=0x1489a70, rawbuf=0x16e63e0 "SHOW GLOBAL VARIABLES", length=<optimized out>, found_semicolon=0x4016be10, last_timer=0x4016be20, async_commit=0x4016be2f "") at sql_parse.cc:6793
#13 0x000000000058c12a in dispatch_command (command=COM_QUERY, thd=0x1489a70, packet=<optimized out>, packet_length=21) at sql_parse.cc:1426
#14 0x000000000058c99b in do_command (thd=0x1489a70) at sql_parse.cc:951
#15 0x000000000057d0ff in handle_one_connection (arg=0x1489a70) at sql_connect.cc:1517
#16 0x000000338d60673d in start_thread () from /lib64/libpthread.so.0
#17 0x000000338cad44bd in clone () from /lib64/libc.so.6
#18 0x0000000000000000 in ?? ()
(gdb) frame 3
#3  0x00000000006c650b in Events::get_opt_event_scheduler_str () at events.cc:186
186	  pthread_mutex_lock(&LOCK_event_metadata);
(gdb) print LOCK_event_metadata
$1 = {__data = {__lock = 2, __count = 0, __owner = 14343, __nusers = 1, __kind = 3, __spins = 0, __list = {__prev = 0x0, __next = 0x0}}, __size = "\002\000\000\000\000\000\000\000\a8\000\000\001\000\000\000\003", '\000' <repeats 22 times>, __align = 2}
(gdb) thread 37
[Switching to thread 37 (Thread 0x40cf4940 (LWP 14343))]
#0  0x000000338d60d4c4 in __lll_lock_wait () from /lib64/libpthread.so.0
(gdb) bt
#0  0x000000338d60d4c4 in __lll_lock_wait () from /lib64/libpthread.so.0
#1  0x000000338d608e50 in _L_lock_1233 () from /lib64/libpthread.so.0
#2  0x000000338d608dd3 in pthread_mutex_lock () from /lib64/libpthread.so.0
#3  0x00000000005c7a79 in open_table (thd=0x170a4e0, table_list=0x40cf0e50, mem_root=0x40cf0d60, refresh=0x40cf0dbf, flags=0) at sql_base.cc:2786
#4  0x00000000005c89b3 in open_tables (thd=0x170a4e0, start=0x40cf0e08, counter=0x40cf0e18, flags=0) at sql_base.cc:4817
#5  0x00000000005c8d82 in open_and_lock_tables_derived (thd=0x170a4e0, tables=0x40cf0e50, derived=false) at sql_base.cc:5235
#6  0x00000000006c5313 in simple_open_n_lock_tables (tables=<optimized out>, thd=<optimized out>) at mysql_priv.h:1576
#7  Event_db_repository::open_event_table (this=<optimized out>, thd=0x170a4e0, lock_type=TL_WRITE, table=0x40cf1288) at event_db_repository.cc:586
#8  0x00000000006c570a in Event_db_repository::drop_events_by_field (this=0xc44640 <LOCK_open>, thd=0x80, field=ET_FIELD_DB, field_value=...) at event_db_repository.cc:977
#9  0x00000000006c69c8 in Events::drop_schema_events (thd=0x170a4e0, db=<optimized out>) at events.cc:731
#10 0x000000000065c907 in mysql_rm_db (thd=0x170a4e0, db=0x1533cc0 "tttuQk14340", if_exists=false, silent=false) at sql_db.cc:981
#11 0x0000000000585d60 in mysql_execute_command (thd=0x170a4e0, statement_start=0x40cf2a08, post_parse=0x40cf3e20) at sql_parse.cc:4299
#12 0x000000000058abfa in mysql_parse (thd=0x170a4e0, rawbuf=0x1533c10 "DROP DATABASE tttuQk14340", length=<optimized out>, found_semicolon=0x40cf3e10, last_timer=0x40cf3e20, async_commit=0x40cf3e2f "") at sql_parse.cc:6793
#13 0x000000000058c12a in dispatch_command (command=COM_QUERY, thd=0x170a4e0, packet=<optimized out>, packet_length=25) at sql_parse.cc:1426
#14 0x000000000058c99b in do_command (thd=0x170a4e0) at sql_parse.cc:951
#15 0x000000000057d0ff in handle_one_connection (arg=0x170a4e0) at sql_connect.cc:1517
#16 0x000000338d60673d in start_thread () from /lib64/libpthread.so.0
#17 0x000000338cad44bd in clone () from /lib64/libc.so.6
#18 0x0000000000000000 in ?? ()
(gdb) frame 3
#3  0x00000000005c7a79 in open_table (thd=0x170a4e0, table_list=0x40cf0e50, mem_root=0x40cf0d60, refresh=0x40cf0dbf, flags=0) at sql_base.cc:2786
2786	  VOID(pthread_mutex_lock(&LOCK_open));
(gdb) print LOCK_open
$2 = {__data = {__lock = 2, __count = 0, __owner = 14519, __nusers = 1, __kind = 3, __spins = 94, __list = {__prev = 0x0, __next = 0x0}}, __size = "\002\000\000\000\000\000\000\000\267\070\000\000\001\000\000\000\003\000\000\000^", '\000' <repeats 18 times>, __align = 2}
(gdb) thread 19
[Switching to thread 19 (Thread 0x40d76940 (LWP 14519))]
#0  0x000000338d60d4c4 in __lll_lock_wait () from /lib64/libpthread.so.0
(gdb) bt
#0  0x000000338d60d4c4 in __lll_lock_wait () from /lib64/libpthread.so.0
#1  0x000000338d608e50 in _L_lock_1233 () from /lib64/libpthread.so.0
#2  0x000000338d608dd3 in pthread_mutex_lock () from /lib64/libpthread.so.0
#3  0x00000000006ca1e5 in intern_sys_var_ptr (thd=0x169fff0, offset=8, global_lock=true) at sql_plugin.cc:2456
#4  0x00000000006e5172 in create_options_are_valid (create_info=<optimized out>, form=<optimized out>, thd=<optimized out>) at handler/ha_innodb.cc:7596
#5  ha_innobase::create (this=<optimized out>, name=0x40d733b0 "./tttTHh14515/t", form=0x40d72300, create_info=0x40d745a0) at handler/ha_innodb.cc:7774
#6  0x0000000000659fe8 in ha_create_table (thd=<optimized out>, path=<optimized out>, db=0x17c3c10 "tttTHh14515", table_name=0x17c3c20 "t", create_info=0x40d745a0, update_create_info=false) at handler.cc:3964
#7  0x0000000000627497 in rea_create_table (thd=0x169fff0, path=0x40d733b0 "./tttTHh14515/t", db=0x17c3c10 "tttTHh14515", table_name=0x17c3c20 "t", create_info=0x40d745a0, create_fields=..., keys=0, key_info=0x17c4470, file=0x17c4108) at unireg.cc:423
#8  0x00000000006651aa in mysql_create_table_no_lock (thd=0x169fff0, db=0x17c3c10 "tttTHh14515", table_name=0x17c3c20 "t", create_info=0x40d745a0, alter_info=<optimized out>, internal_tmp_table=false, select_field_count=0) at sql_table.cc:4015
#9  0x00000000006688f0 in mysql_create_table (thd=0x169fff0, db=0x17c3c10 "tttTHh14515", table_name=0x17c3c20 "t", create_info=0x40d745a0, alter_info=0x40d74680, internal_tmp_table=false, select_field_count=0) at sql_table.cc:4112
#10 0x00000000005894a1 in mysql_execute_command (thd=0x169fff0, statement_start=0x40d74a08, post_parse=0x40d75e20) at sql_parse.cc:3360
#11 0x000000000058abfa in mysql_parse (thd=0x169fff0, rawbuf=0x17c3b30 "CREATE TABLE tttTHh14515.t (a INT) ENGINE=InnoDB", length=<optimized out>, found_semicolon=0x40d75e10, last_timer=0x40d75e20, async_commit=0x40d75e2f "") at sql_parse.cc:6793
#12 0x000000000058c12a in dispatch_command (command=COM_QUERY, thd=0x169fff0, packet=<optimized out>, packet_length=48) at sql_parse.cc:1426
#13 0x000000000058c99b in do_command (thd=0x169fff0) at sql_parse.cc:951
#14 0x000000000057d0ff in handle_one_connection (arg=0x169fff0) at sql_connect.cc:1517
#15 0x000000338d60673d in start_thread () from /lib64/libpthread.so.0
#16 0x000000338cad44bd in clone () from /lib64/libc.so.6
#17 0x0000000000000000 in ?? ()
(gdb) frame 3
#3  0x00000000006ca1e5 in intern_sys_var_ptr (thd=0x169fff0, offset=8, global_lock=true) at sql_plugin.cc:2456
2456	      pthread_mutex_lock(&LOCK_global_system_variables);
(gdb) print LOCK_global_system_variables
$3 = {__data = {__lock = 2, __count = 0, __owner = 14563, __nusers = 1, __kind = 3, __spins = 9, __list = {__prev = 0x0, __next = 0x0}}, __size = "\002\000\000\000\000\000\000\000\343\070\000\000\001\000\000\000\003\000\000\000\t", '\000' <repeats 18 times>, __align = 2}