-
-
Notifications
You must be signed in to change notification settings - Fork 2k
MDEV-38822: Fix self-deadlock on CTAS from innodb stats tables #4669
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 10.6
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -104,12 +104,17 @@ n_rows database_name lower(table_name) | |
| DROP TABLE t1; | ||
| DROP TABLE t2; | ||
| # | ||
| # MDEV-38667 Assertion in diagnostics area on DDL stats timeout | ||
| # MDEV-38822 Lock wait timeout does not happen anymore | ||
| # | ||
| set @lock_wait_timeout= @@global.innodb_lock_wait_timeout; | ||
| SET innodb_lock_wait_timeout = 1; | ||
| CREATE TABLE t ENGINE=InnoDB AS SELECT * FROM mysql.innodb_table_stats; | ||
| Warnings: | ||
| Warning 1088 Error updating stats for table after table rebuild: Lock wait timeout | ||
| SET innodb_lock_wait_timeout = @lock_wait_timeout; | ||
| SELECT COUNT(*) as n_rows FROM t; | ||
| n_rows | ||
| 1 | ||
| # For a deterministic test, we wait for the background thread to update the stats for the new table. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fwiw, (not really insisting on it and hope the final reviewer would consider it) you could use the DBUG library to produce the effect: https://mariadb.com/docs/server/clients-and-utilities/testing-tools/mariadb-test/the-debug-sync-facility. I'd give it a couple of hours to try and reproduce it by dipping in DBUG_SYNC points and running two threads in mariadb-test. |
||
| SELECT table_name, n_rows FROM mysql.innodb_table_stats WHERE table_name = 't'; | ||
| table_name n_rows | ||
| t 1 | ||
| DROP TABLE t; | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would add a note on MDEV-38667 that the current change further addresses the same issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean adding a note on the topic on Jira?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. You are altering the test added through that Jira. So it'd be polite to add an update to it so that people watching it will get a notification.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, I added a comment there explaining the change.