MySQLMDL与存储引擎相关吗?_MySQL
背景是某个业务的logdb历史oss_log(MyISAM表类型)例行删除,有时候会告"deadlock"。分析slow log发现有些删除需要很长时间,比如:drop table 2014_10_17_oss_abandonquest 花费了15041.2410秒。删除行为在凌晨4点发出,刚好落在备份期间,因为5.5有了MDL(Meta data lock),所以–single-transaction时,事务内操作过的表都会持有MDL,因此不会被DDL破坏。所以,查看get_status.err会有如下日志:
11966363,hardcore,localhost,oss_log,Query,11084,Waiting for table metadata lock,drop table 2014_10_17_oss_abandonquest
5.5的MDL机制是如果事务不释放,事务里边涉及到的表都会持有该表的DML锁,事务不释放,锁就不释放。而5.0、5.1的MDL机制与事务无关,只要语句结束,语句持有的MDL锁就会释放。这是两者的区别,确实该表引擎没关系。
下面是个测试:
session.1 | session.2 | |||||||
Step.1 | begin; | |||||||
Step.2 | select * from tb_myisam; | |||||||
Step.3 | drop table tb_myisam; | |||||||
被阻塞… |

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



Redmi officially announced today that the new Redmi GPro 2024 will be officially released on March 4. In other words, next week we will have the release of this exciting new product. RedmiGPro2024 makes its full debut as an e-sports flagship, deeply integrating the mobile phone industry capabilities into the notebook business, presenting 210W super performance release, and Redmi performance reaching a new high. Equipped with i9-14900HX processor and RTX4060 graphics card, it perfectly combines e-sports and creation to achieve dual evolution. From this point of view, the performance of this new product will be improved again, and the actual effect is exciting. It was mentioned in the official warm-up that the new Redmi G Pro 2024 brings the PC version of the violent engine. Mobile phone technology empowerment, three major factors lead

Real-time global illumination (Real-time GI) has always been the holy grail of computer graphics. Over the years, the industry has proposed various methods to solve this problem. Common methods include constraining the problem domain by utilizing certain assumptions, such as static geometry, a rough scene representation, or tracking rough probes, and interpolating lighting between the two. In Unreal Engine, the global illumination and reflection system Lumen technology was co-founded by Krzysztof Narkowicz and Daniel Wright. The goal was to build a solution that was different from its predecessors, capable of achieving uniform lighting and a baked-like lighting quality. Recently, at SIGGRAPH 2022, Krzysztof Narko

The intelligent NPC created by Academician Huang in "Cyberpunk 2077" can already speak Chinese? Qubit's first-hand experience, witnessing NPCs conversing fluently in both Chinese and English, with natural expressions and movements, and matching mouth shapes... If there wasn't a screen in front of me, it would really feel like being there. . At this year's CES exhibition, Nvidia used its intelligent engine Avatar Cloud Engine (ACE) to make game NPCs "alive", which caused quite a shock. △The intelligent NPC displayed at CES uses ACE. The characters in the game can have realistic voice conversations with players, while showing vivid expressions and body movements without having to prepare a script in advance. At the time of its debut, there were Ubisoft, Tencent, NetEase, MiHoYo and other countries.

According to news on October 8, the U.S. auto market is undergoing a change under the hood. The previously beloved six-cylinder and eight-cylinder power engines are gradually losing their dominance, while three-cylinder engines are emerging. News on October 8 showed that the U.S. auto market is undergoing a change under the hood. The beloved six-cylinder and eight-cylinder power engines in the past are gradually losing their dominance, and the three-cylinder engine is beginning to emerge. In most people's minds, Americans love large-displacement models, and the "American big V8" has always been the Synonymous with American cars. However, according to data recently released by foreign media, the landscape of the U.S. auto market is undergoing tremendous changes, and the battle under the hood is intensifying. It is understood that before 2019, the United States

With the continuous development of Internet technology, web template engines have become an indispensable part of website development. PHP web page template engine is one of the commonly used web page template engines. This article will introduce how to use the PHP web template engine and answer frequently asked questions. 1. What is PHP web template engine? PHP web template engine is a technology that separates web design from business logic. Using a template engine can separate the display and logical processing of web pages, making the code clean, clear and easy to maintain. PHP web template engine and original

To solve engine problems when SAS connects to Oracle database, specific code examples are required. When using SAS software for data analysis, it is often necessary to connect to the database to obtain data for analysis and processing. Among them, connecting to the Oracle database is a relatively common operation. However, sometimes engine problems occur when connecting to the Oracle database, causing the connection to fail or not operate normally. This article will introduce how to solve engine problems when connecting to Oracle database in SAS software, and provide specific code

To solve the problem that SAS cannot find the Oracle engine, specific code examples are needed. When using SAS software for data processing and analysis, we often encounter situations where we need to connect to an external database, of which Oracle database is a common choice. However, sometimes when we try to connect to the Oracle database, SAS prompts that the Oracle engine cannot be found, which brings trouble to our work. This article will introduce how to solve the problem that SAS cannot find the Oracle engine and provide specific

From the day ChatGPT was born, Microsoft should feel lucky. Apart from being glad that the $1 billion I invested a few years ago was not in vain. More importantly, ChatGPT is a friendly force, not an opponent. The mood of other major technology companies is very complicated, especially Microsoft's old rival Google. Paul Buchheit, a veteran Google employee and one of the creators of Gmail, recently said that artificial intelligence chatbots like ChatGPT will destroy Google, just like the search engine completely wiped out the yellow pages phone book. As for the time, it is only a matter of one or two years. Buchheit tweeted on Wednesday: "It may only take a year or two for Google to be completely disrupted. AI will wipe out the search engine results page, even after
