facebook / mysql-5.6

Facebook's branch of the Oracle MySQL database. This includes MyRocks.
http://myrocks.io
Other
2.47k stars 711 forks source link

multiple fix for ddse change #1374

Closed luqun closed 8 months ago

luqun commented 9 months ago

Summary:

During DDSE change, for each DD table, it should always call ha_get_se_private_data() to fetch its table id and index ids. INNODB DD Tables and MyRocks DD tables has different table ids and index ids.

also During DDSE change, these DD table are temporarily created in schema and then rename it to "mysql". Due to rename call in myrocks is a meta-data only change and DD table should always created in __system CF, We will always treat table as dd table if the corresponding mysql table is a DD table.

also During DDSE change, the old dd table should be dropped, thus we allow dd table to be dropped if current SE isn't DDSE.

During DDSE change, commit changes before rename tables to avoid use-after-free issue. This may need more crash recovery testing.

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

facebook-github-bot commented 8 months ago

@luqun has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

facebook-github-bot commented 8 months ago

@luqun has updated the pull request. You must reimport the pull request before landing.

facebook-github-bot commented 8 months ago

@luqun has updated the pull request. You must reimport the pull request before landing.

facebook-github-bot commented 8 months ago

@luqun has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

facebook-github-bot commented 8 months ago

@luqun has updated the pull request. You must reimport the pull request before landing.

facebook-github-bot commented 8 months ago

@luqun has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.