WL#9537: InnoDB_New_DD: Support InnoDB table import/export for new DD
Affects: Server-8.0
—
Status: Complete
This is a placeholder to enable import/export for InnoDB table in new DD environment. In this worklog, we will keep import/export working like the old way. Which means we will not touch the current syntax of it. For the old way, please check https://dev.mysql.com/doc/refman/5.7/en/innodb- transportable-tablespace-examples.html So, after this wl, user can still use theose syntax to import/export tablespaces. And just use the New DD APIs to get/set dictionary information, instead of get/set these information into InnoDB dictionary tables. In fact, those InnoDB dictionary tables will be discarded in NewDD environment. And we will evaluate if we need to optimize the import/export process, like no need to discard tablespace in import anymore, or support import/export general tablespace.
Import/export works correctly in New DD environment.
1: No need to touch flush table, since it's not related to dictionary. 2: For discarding table, we need to remove the code for setting the discard flag of table. 3: Need to get the discard flag when open a table, and set it to dict_table_t object. 4: Reset the discard flag when import is completed.
1: Add function to set discard flag:
/** Set the discard flag for a dd table.
@param[in,out] thd current thread
@param[in] name InnoDB table name
@param[in] discard discard flag
@retval false if fail. */
bool
dd_table_set_discard_flag(
THD* thd,
const char* name,
bool discard)
{
.....
}
2: Call set discard flag function in discard table.
row_discard_tablespace_end
....
{
........
dd_table_set_discard_flag(...);
........
}
3: Call set discard flag function when import is complete.
row_import_cleanup(
...)
{
........
dd_table_set_discard_flag(...);
........
}
Copyright (c) 2000, 2025, Oracle Corporation and/or its affiliates. All rights reserved.