Closed luqun closed 1 year ago
@laurynas-biveinis , I will commit this PR today if it looks okay to you.
@laurynas-biveinis , I will commit this PR today if it looks okay to you.
Please add const
to the method definition (now only declaration has it), and then go ahead 👍
Summary:
When customer issue a DDL statement, it will change a table's metadata(whose data is stored in DD) and a tables' raw data.
during table metadata change, DD will enable OPTION_DD_UPDATE_CONTEXT flag(https://github.com/facebook/mysql-5.6/blob/fb-mysql-8.0.28/sql/dd/impl/transaction_impl.cc#L169).
during table raw data change, OPTION_DD_UPDATE_CONTEXT flag isn't enabled.
if current DD is myrocks and customer try to run a DDL with bulk loading enabled,
before this change, myrocks write table metadata using bulk loading when DD save new schema(such as dd::Table_impl::store_children). Later, DD will try to read new schema(such as dd::Table_impl::restore_children), then it fail to find new schema due myrocks bulk load doesn't support read your own data.
after this change, table metadata won't use bulk loading(its change data is small) and current trx can read its own data.
Test Plan:
Reviewers:
Subscribers:
Tasks:
Tags: