-
Jon Olav Hauglid authored
This worklog adds the runtime side for the new FOR EXPORT option for FLUSH TABLES <table_list>. The FLUSH TABLES <table_list> FOR EXPORT statement: - Acquires MDL_SHARED_NO_WRITE metadata lock on the tables listed in <table_list>. The effect is that FLUSH TABLES <table_list> FOR EXPORT will block until all active transactions that have updated any table in <table_list> have completed. While FLUSH TABLES <table_list> FOR EXPORT is in effect, no new updating transactions and no DDL statements are allowed. Read-only transactions will not be affected. - Enters LOCK TABLES mode so that locks are held until the UNLOCK TABLES statement is executed. - Notifies the storage engine by calling handler::extra() using the new flag HA_EXTRA_EXPORT. This allows the storage engine to perform any steps needed to make the table ready for export (e.g. quiesce the table and write metadata file). The worklog also adds a new ha_table_flags() flag: HA_CAN_EXPORT_TABLESPACE. This flags indicates that a given storage engine support FLUSH TABLES <table_list> FOR EXPORT. If such a statement includes tables for which the storage engine does not have this flag, an error will be returned.
Jon Olav Hauglid authoredThis worklog adds the runtime side for the new FOR EXPORT option for FLUSH TABLES <table_list>. The FLUSH TABLES <table_list> FOR EXPORT statement: - Acquires MDL_SHARED_NO_WRITE metadata lock on the tables listed in <table_list>. The effect is that FLUSH TABLES <table_list> FOR EXPORT will block until all active transactions that have updated any table in <table_list> have completed. While FLUSH TABLES <table_list> FOR EXPORT is in effect, no new updating transactions and no DDL statements are allowed. Read-only transactions will not be affected. - Enters LOCK TABLES mode so that locks are held until the UNLOCK TABLES statement is executed. - Notifies the storage engine by calling handler::extra() using the new flag HA_EXTRA_EXPORT. This allows the storage engine to perform any steps needed to make the table ready for export (e.g. quiesce the table and write metadata file). The worklog also adds a new ha_table_flags() flag: HA_CAN_EXPORT_TABLESPACE. This flags indicates that a given storage engine support FLUSH TABLES <table_list> FOR EXPORT. If such a statement includes tables for which the storage engine does not have this flag, an error will be returned.
Loading