mysql update 写undo日志的 加锁

/* If object is temporary, disable REDO logging that is done to track
1922|         changes done to UNDO logs. This is feasible given that temporary tables
1923|         are not restored on restart. */
1924|         mtr_start(&mtr);
1925+>        dict_disable_redo_if_temporary(index->table, &mtr);
/*当前事务加锁,此出锁可能会被purge线程持有,可能出现锁等待的情况*/
1926|         mutex_enter(&trx->undo_mutex);
#0  trx_undo_report_row_operation (flags=10, op_type=2, thr=0x7fff341cd7d0, index=0x7b89370, clust_entry=0x0, update=0x7fff341cd310, cmpl_info=1, rec=0x7fffc747408d "00100000000001", offsets=0x7
fff34018b40, roll_ptr=0x7fff92fa79b0) at storage/innobase/trx/trx0rec.cc:1925
#1  0x0000000001b39e1d in btr_cur_upd_lock_and_undo (flags=10, cursor=0x7fff3400b208, offsets=0x7fff34018b40, update=0x7fff341cd310, cmpl_info=1, thr=0x7fff341cd7d0, mtr=0x7fff92fa7e80, roll_ptr
=0x7fff92fa79b0) at storage/innobase/btr/btr0cur.cc:3534
#2  0x0000000001b3c44b in btr_cur_pessimistic_update (flags=10, cursor=0x7fff3400b208, offsets=0x7fff92fa7ab0, offsets_heap=0x7fff92fa7e78, entry_heap=0x7fff3400c4c8, big_rec=0x7fff92fa7ad0, upd
ate=0x7fff341cd310, cmpl_info=1, thr=0x7fff341cd7d0, trx_id=11536, mtr=0x7fff92fa7e80) at storage/innobase/btr/btr0cur.cc:4414
#3  0x0000000001a8ba17 in row_upd_clust_rec (flags=0, node=0x7fff341cd1f8, index=0x7b89370, offsets=0x7fff34018b40, offsets_heap=0x7fff92fa7e78, thr=0x7fff341cd7d0, mtr=0x7fff92fa7e80) at /root/
binloginredo/mysql5.7.32_addbininlog.0315/NestDB/storage/innobase/row/row0upd.cc:2703
#4  0x0000000001a8c33b in row_upd_clust_step (node=0x7fff341cd1f8, thr=0x7fff341cd7d0) at storage/innobase/row/row0upd.cc:2957
#5  0x0000000001a8c78c in row_upd (node=0x7fff341cd1f8, thr=0x7fff341cd7d0) at storage/innobase/row/row0upd.cc:3054
#6  0x0000000001a8cc6e in row_upd_step (thr=0x7fff341cd7d0) at storage/innobase/row/row0upd.cc:3200
#7  0x0000000001a2c379 in row_update_for_mysql_using_upd_graph (mysql_rec=0x7fff341cb340 "", prebuilt=0x7fff341cc6d0) at storage/innobase/r
ow/row0mysql.cc:2588
#8  0x0000000001a2c6b0 in row_update_for_mysql (mysql_rec=0x7fff341cb340 "", prebuilt=0x7fff341cc6d0) at storage/innobase/row/row0mysql.cc:
2679
#9  0x00000000018d4d3b in ha_innobase::update_row (this=0x7fff34012040, old_row=0x7fff341cb340 "", new_row=0x7fff341cb070 "") at storage/in
nobase/handler/ha_innodb.cc:8294
#10 0x0000000000f517ce in handler::ha_update_row (this=0x7fff34012040, old_data=0x7fff341cb340 "", new_data=0x7fff341cb070 "") at sql/handl
er.cc:8191
#11 0x00000000015fd8bd in mysql_update (thd=0x7fff34000b70, fields=..., values=..., limit=18446744073709551615, handle_duplicates=DUP_ERROR, found_return=0x7fff92fa9138, updated_return=0x7fff92f
a9130) at sql/sql_update.cc:894
#12 0x0000000001603a42 in Sql_cmd_update::try_single_table_update (this=0x7fff340215d0, thd=0x7fff34000b70, switch_to_multitable=0x7fff92fa91df) at sql/sql_update.cc:2931
#13 0x0000000001603fa9 in Sql_cmd_update::execute (this=0x7fff340215d0, thd=0x7fff34000b70) at sql/sql_update.cc:3058
#14 0x000000000154991e in mysql_execute_command (thd=0x7fff34000b70, first_level=true) at sql/sql_parse.cc:3616
#15 0x0000000001585f94 in Prepared_statement::execute (this=0x7fff34025f20, expanded_query=0x7fff92faa3c0, open_cursor=false) at sql/sql_pr
epare.cc:3996
#16 0x0000000001584dbb in Prepared_statement::execute_loop (this=0x7fff34025f20, expanded_query=0x7fff92faa3c0, open_cursor=false, packet=0x7fff34addd7a "", packet_end=0x7fff34aea5e8 "") at sql/sql_prepare.cc:3604
#17 0x0000000001582738 in mysqld_stmt_execute (thd=0x7fff34000b70, stmt_id=1, flags=0, params=0x7fff34addd7a "", params_length=51310) at sq
l/sql_prepare.cc:2592
#18 0x000000000154454c in dispatch_command (thd=0x7fff34000b70, com_data=0x7fff92faacd0, command=COM_STMT_EXECUTE) at sql/sql_parse.cc:1425
#19 0x000000000154373f in do_command (thd=0x7fff34000b70) at sql/sql_parse.cc:1032
#20 0x0000000001674b25 in handle_connection (arg=0x697a680) at sql/conn_handler/connection_handler_per_thread.cc:313
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值