如何在MySQL中使用character_set_server影响参数

分类:编程技术 时间:2024-02-20 15:48 浏览:0 评论:0
0
本文主要讲解《如何在MySQL中使用character_set_server影响参数》。文章中的解释简单明了,易于学习和理解。请按照小编的思路慢慢深入,研究学习《如何使用MySQL》中的character_set_server影响参数》!

等待全局读锁:由于调用函数lock_global_read_lock使用读锁刷新表,DML操作被阻塞。

等待提交锁:由于带读锁的刷新表调用函数make_global_read_lock_block_commit,导致事务无法提交

现象

阻塞COMMIT和DML

mysql> 显示进程列表;+----+--------------------+------------+-------- -- -+---------+------+---------------------------------------- ---+ ----------------------------------------+----------+----- ---- ------+|身份证 |用户 |主持人|数据库 |命令|时间 |状态|资讯|已发送行数 | Rows_examined |+----+----------------+------------+--------- +------+------+-------------------------------- +- --------------------------+------------+--------- - -----+| 1 |事件调度程序 |本地主机 |空|守护进程 | 268 | 268等待空队列 |空| 0 | 0 || 5 |根 |本地主机 |空|查询 | 0 |开始|显示进程列表 | 0 | 0 || 6 |根 |本地主机 |测试 |查询 | 61 | 61等待提交锁|提交锁|提交 0 |;0 || 7 |根 |本地主机 |测试 |查询 | 6 |等待全局读锁|从 testcp 限制 1 中删除 | 0 | 0 |+----+------------ -----+------------+------------+-- -------+------+----- --------------------------+--- -------------------- ----+------------------------+------------ ---+

相关堆栈帧

等待提交锁
#0 0x00007ffff7bd3a5e in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread. so.0#1 0x000000000192027b in native_cond_timedwait (cond=0x7ffee0 000d08、mutex=0x7ffee0000cc0、abstime=0x7fffec5ec950) at /mysqldata/percona-server-locks-detail-5.7.22/include/thr_cond.h:129#2 0x00000000019205ea 在 safe_cond_timedwait (cond=0x7ffee0000d08,mp=0x7ffee0000c98,abstime=0x7fffec5ec 950,文件=0x204cdd0“/mysqldata/percona-server-locks-detail-5.7.2 2/sql/mdl.cc",行= 1899)在/mysqldata/percona-server-locks-detail-5.7.22/mysys/thr_cond.c:88#3 0x00000000014b9f21在my_cond_timedwait(cond=0x7ffee0000d08,mp=0x7ffee0000c98,abstime=0x7fffec5ec950,文件=0x204cdd0“/ mysqldata/percona-server-locks-detail-5.7.22/sql/mdl.cc", line=1899) 位于 /mysqldata/percona-server-locks-detail-5.7.22/include/thr_cond.h:180#4 inline_mysql_cond_timedwait中的0x00000000014ba484(即= 0x7ffee0000d08,互斥= 0x7ffee0000c98,abstime = 0x7fffec5ec950,src_file = 0x204cdd0“/mysqldata/percona-server-locks-detail-5.7.22/sql/mdl.cc “,src_line = 1899)位于/ mysqldata / percona-server-locks-detail-5.7.22/include/mysql/psi/ mysql_thread.h:1229#5 0x00000000014bb702 在 MDL_wait::timed_wait (这 = 0x7ffee0000c98,所有者 = 0x7ffee0000c00,abs_timeout = 0x7fffec5ec950,set_status_on_超时=真,wait _state_name=0x2d93240) 在 /mysqldata/percona-server-locks-detail-5.7.22/ sql/mdl.cc:1899#6 0x00000000014bd7ac in MDL_context::acquire_lock (this=0x7ffee0000c98, mdl_request=0x7fffec5ec9c0, lock_wait_timeout = 31536000)在/mysqldata/percona -server-locks-detail-5.7.22/sql/mdl.cc:ha_commit_trans 中的 3746#7 0x0000000000f7ffe4 (thd=0x7ffee0000c00,all=true,ignore_global_read_lock=false)位于 /mysqldata/percona-server-locks- /mysqldata/percona-server-locks-detail-5.7.22/sql/transaction.cc:239#9 0x00000000015cf466 中的 trans_commit (thd=0x7ffee0000c00) 中的细节5.7.22/sql/handler.cc:1795#8 0x00000000016dcd2f mysql_execute_command(thd=0x7ffee0000c00,first_level=true)位于mysql_parse中的/mysqldata/percona-server-locks-detail-5.7.22/sql/sql_parse.cc:4526#10 0x00000000015d2fde(thd=0x7ffee0000c00,parser_state=0x7ff) fec5ee600) 在 /mys qldata/percona-server-locks-detail -5.7.22/sql/sql_parse.cc:5901#11 0x00000000015c6b72 在dispatch_command (thd=0x7ffee0000c00, com_data=0x7fffec5eed70, 逗号nd=COM_QUERY) 位于 /mysqldata/percona-server -locks-detail-5.7.22/sql/sql_parse。 do_command 中的 cc:1490#12 0x00000000015c58ff (thd=0x7ffee0000c00) 位于 /mysqldata/percona-server-locks-detail-5.7.22/sql/sql_parse.cc:1021#13 0x000000000170e57 8 in handle_connection (arg=0) x67bf490) 在 /mysqldata /percona-server-locks-detail-5.7.22/sql/conn_handler/connection_handler_per_thread.cc:312#14 0x0000000001945538 在 pfs_spawn_thread (arg=0x66ff 4f0) 位于 /mysqldata/percona-server -locks-detail-5.7.22/storage /perfschema/pfs.cc:2190#15 0x00007ffff7bcfaa1 in start_thread () from /lib64/libpthread.so.0#16 0x00007ffff6b37c4d in clone () from /lib64/libc.so.6 
等待全局从 /lib64/libpthread.so.0#1 0x000000000192027b 在native_cond_timedwait中读取锁
pthread_cond_timedwait@@GLIBC_2.3.2 ()中的#0 0x00007ffff7bd3a5e (cond=0x7ffee4000c98,mutex=0x7ffee400 0c50,abstime = 0x7fffec58a0e0)在/ mysqldata/percona-server-locks-detail-5.7.22/include/thr_cond.h:129#2 0x00000000019205ea 在 safe_cond_timedwait(cond=0x7ffee4000c98,mp=0x7ffee4000c28,abstime=0x7fffec58a0e0,file=0x204cdd0“/mysqldata/percona-server-locks-detail-5.7.22/sql/mdl.cc”,行=1899)位于/mys qldata/percona -server-locks-detail-5.7.22/mysys/thr_cond.c:88#3 my_cond_timedwait 中的 0x00000000014b9f21 (cond=0x7ffee4000c98,mp=0x7ffee4000c28,abstime=0x7fffec58a0e0,文件=0x204cdd0“/mysqldata /percona-服务器锁-详细信息-5.7.22/sql/mdl.cc", line=1899) at /mysqldata/percona-server-locks-detail-5.7.22/include/thr_cond.h:180#4 0x00000000014ba484 inline_mysql_cond_timedwait (that=0x7ffee400 0c98,互斥锁=0x7ffee4000c28,abstime=0x7fffec58a0e0,src_file=0x204cdd0“/mysqldata/percona-server-locks-detail-5.7.22/sql/mdl.cc”,src_line=1899)位于/mysqldata/percona-server-locks-detail- 5.7.22/include/mysql/psi/mysql_thread.h:1229#5 0x00000000014bb702 在 MDL_wait::timed_wait (this=0x7ffee4000c28,owner=0x7ffee4000b90,abs_timeout=0x7fffec5 8a0e0,set_status_on_timeout=true,wait_state_name =0x2d93180) 在/mysqldata/percona-server-locks-detail-5.7.22/sql/mdl.cc:1899#6 0x00000000014bd7ac 在 MDL_context::acquire_lock (这 = 0x7ffee4000c28,mdl_request = 0x7fffec58a160,lock_wait _timeout = 31536000)在 /mysqldata/ percona-服务器锁-detail-5.7.22/sql/mdl.cc:3746#7 0x000000000153bed8 in open_table (thd=0x7ffee4000b90, table_list=0x7ffee40066e0, ot_ctx=0x7fffec58a5a0) 在 /mysqldata /percona-server-locks-detail-5.7.22 /sql/ sql_base.cc:3233#8 0x000000000153f904 在 open_and_process_table 中(thd=0x7ffee4000b90,lex=0x7ffee40031c0,表=0x7ffee40066e0,计数器=0x7ffee4003280,标志=0,prelocking_strategy=0x7ff fec58a6d0、has_prelocking_list=false、ot_ctx=0x7fffec58a5a0) 位于 /mysqldata/percona-server -locks-detail-5.7 .22/sql/sql_base.cc:5213# 9 0x0000000001540a58 在 open_tables (thd=0x7ffee4000b90, start=0x7fffec58a690, counter=0x7ffee4003280, flags=0, prelocking_strategy=0x7fffec58 a6d0) 位于 /mysqldata/percona -server- locks-detail-5.7.22/sql/sql_base.cc:5831#10 0x0000000001541e93 在 open_tables_for_query (第d=0x7ffee4000b90,表=0x7ffee40066e0,标志=0)在/mysqldata/percona-server-locks-detail-5.7.22/sql/sql_base.cc:6606# 11 0x00000000017f2b53在Sql_cmd_delete::mysql_delete(这= 0x7ffee4) 006c80,thd= 0x7ffee4000b90,限制= 1)在/mysqldata/percona-server-locks-detail-5.7.22/sql/sql_delete.cc:76#12 0x00000000017f7098在Sql_cmd_delete ::执行(这= 0x7ffee4006c80,thd = 0x7ffee4000b90 )在/mysqldata/ percona-server-locks-detail-5.7.2 2/sql/sql_delete.cc:1386 #13 0x00000000015cc801 在 mysql_execute_command (thd=0x7ffee4000b90,first_level=true) 位于 /mysqldata/percona-server-locks-detail-5.7.22/ sql/sql_parse.cc:3756#14 0x000000000 15d2fde 在 mysql_parse (thd=0x7ffee4000b90, parser_state=0x7fffec58c600 ) 位于 /mysqldata/percona-server-locks-detail-5.7.22/sql/sql_parse.cc:5901#15 0x0 0000000015c6b72 在dispatch_command (thd=0x7ffee4000b90,com_data=0x7fffec58cd70,command=COM _QUERY)位于 do_command 中的 /mysqldata/percona-server-locks-detail-5.7.22/sql/sql_parse.cc:1490#16 0x00000000015c58ff (thd=0x7ffee4000b90)在/mysqldata/percona-server-locks-detail-5.7.22/sql/sql_parse.cc:1021#17 0x000000000170e578在handle_connection(arg=0x67182c0)在/mysqldata/percona-server-locks-detail-5.7.22 /sql/conn_handler/connection_handler_per_thread.cc:312#18 0x00000000019 45538 在 pfs_spawn_thread (arg=0x671aca0) 位于 /mysqldata/ percona-server-locks-detail-5.7.22/storage/perfschema/pfs.cc:2190#19 0x00007 ffff7bcfaa1 中/lib64/libpthread.so.0#20 0x00007ffff6b37c4d 中的 start_thread () 位于 /lib64/libc 中的 clone () 中。 so.6

感谢您的阅读。以上就是《MySQL中如何使用character_set_server影响参数》的内容。经过文章的学习,相信大家对于MySQL中如何使用character_set_server已经有了清晰的认识。我们对character_set_server影响参数的问题有了更深入的了解,具体用法还需要在实践中验证。在这里,小编会为大家推送更多相关知识点的文章大家,欢迎关注!

1. 本站所有资源来源于用户上传或网络,仅作为参考研究使用,如有侵权请邮件联系站长!
2. 本站积分货币获取途径以及用途的解读,想在本站混的好,请务必认真阅读!
3. 本站强烈打击盗版/破解等有损他人权益和违法作为,请各位会员支持正版!
4. 编程技术 > 如何在MySQL中使用character_set_server影响参数

用户评论