Bug #116598 | MDL deadlock occurs due to the order of the view filed | ||
---|---|---|---|
Submitted: | 8 Nov 2024 9:44 | Modified: | 9 Nov 2024 1:12 |
Reporter: | zongyi chen (OCA) | Email Updates: | |
Status: | Can't repeat | Impact on me: | |
Category: | MySQL Server: InnoDB storage engine | Severity: | S3 (Non-critical) |
Version: | OS: | Any | |
Assigned to: | CPU Architecture: | Any |
[8 Nov 2024 9:44]
zongyi chen
[8 Nov 2024 10:42]
MySQL Verification Team
Hi Mr. chen, Thank you for your bug report. We would like to inform you that we have tested both of your test cases on 8.0.40, 8.4.1 and 9.0.1 and in all those cases we never experienced any deadlocks. We try both test cases on all three latest releases and they just worked without any deadlock. Can' repeat.
[9 Nov 2024 1:12]
zongyi chen
you need change the code ,to make it reproduce stably. If you don't modify the code, it's hard to reproduce. diff --git a/sql/dd_sql_view.cc b/sql/dd_sql_view.cc index d825dca..368675c 100644 --- a/sql/dd_sql_view.cc +++ b/sql/dd_sql_view.cc @@ -475,6 +475,10 @@ static bool open_views_and_update_metadata( if (check_schema_readonly(thd, view->db)) return true; } + LogErr(ERROR_LEVEL, ER_MYSQLBACKUP_MSG, "wait to get table shared lock"); + DBUG_EXECUTE_IF("view_MDL_X_acquired", {sleep(15);}); + LogErr(ERROR_LEVEL, ER_MYSQLBACKUP_MSG, "start to get table shared lock"); + for (auto view : *views) { View_metadata_updater_context vw_metadata_update_context(thd);
[11 Nov 2024 10:08]
MySQL Verification Team
Hi Mr. chen, Thank you for your feedback. However, it is our policy that we check reports only on our own, unchanged code. Actually, it is also our policy that we check bug reports on our official binary releases only. Can't repeat.