• 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

  • 相关阅读:
    阿里云服务器购买后的配置指南
    第一阶段总结
    RDD的checkpoint机制和键值对RDD数据分区
    广播变量与累加器
    Spark的监控
    Spark和MR的区别
    hadoop离线项目处理流程
    Flume(一)
    Sparkcore高级应用3
    SparkCore高级应用2(Spark on yarn)
  • 原文地址:https://www.cnblogs.com/lqmblog/p/15506550.html
Copyright © 2020-2023  润新知