zoukankan      html  css  js  c++  java
  • Mysql报Deadlock found when trying to get lock; try restarting transaction问题解决

    Mysql报Deadlock found when trying to get lock; try restarting transaction问题解决!!

    事务1 begin;                                                                     事务2begin;

    select * from a where id = 1 for update;

                                                       select * from a where id = 2 for update;

    select * from a where id = 2 for update; lock wait 锁等待

                                                                                                   select * from a where id = 1 for update;    (  执行完就i报:Deadlock found when trying to get lock; try restarting transaction)

    这个时候事务2 被干掉了,只剩下了事务1

    select * from information_schema.INNODB_TRX
    trx_mysql_thread_id

    kill 进程ID


    原文链接:https://blog.csdn.net/qq_44240587/article/details/108400666

  • 相关阅读:
    lazyload【思路】
    图片旋转
    模拟滚动条【大体功能实现】
    Firefox window.close()的使用注意事项
    修改KindEditor的CSS文件
    ownerDocument property
    网易新闻图片展示效果
    关于td不支持position问题
    strcat strncat
    Tcl_FindExecutable
  • 原文地址:https://www.cnblogs.com/lqmblog/p/15506550.html
Copyright © 2011-2022 走看看