This repository was archived by the owner on Mar 1, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 714
Skip drop system tables during clone drop user data #1501
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| call mtr.add_suppression("Clone removing all user data for provisioning: Started"); | ||
| call mtr.add_suppression("Clone removing all user data for provisioning: Finished"); | ||
| Install clone plugin on recipient server | ||
| INSTALL PLUGIN clone SONAME 'CLONE_PLUGIN'; | ||
| CREATE TABLE t_recipient(col1 INT PRIMARY KEY, col2 int); | ||
| INSERT INTO t_recipient VALUES(1, 10); | ||
| CREATE UNDO TABLESPACE undo_005 ADD DATAFILE 'undo_005.ibu'; | ||
| CREATE TABLESPACE tbs1_recipient ADD DATAFILE 'tbs1_data1.ibd'; | ||
| INSTALL PLUGIN clone SONAME 'CLONE_PLUGIN'; | ||
| select @@default_dd_system_storage_engine; | ||
| @@default_dd_system_storage_engine | ||
| InnoDB | ||
| SET DEBUG_SYNC = 'clone_after_drop_user_data SIGNAL check_user_table WAIT_FOR resume_clone'; | ||
| SET GLOBAL clone_valid_donor_list = 'HOST:PORT'; | ||
| CLONE INSTANCE FROM USER@HOST:PORT IDENTIFIED BY '' ; | ||
| SET DEBUG_SYNC = 'now WAIT_FOR check_user_table'; | ||
| select count(*) > 0 from mysql.user; | ||
| count(*) > 0 | ||
| 1 | ||
| SET DEBUG_SYNC = 'now SIGNAL resume_clone'; | ||
| Uninstall clone plugin on recipient server | ||
| UNINSTALL PLUGIN clone; | ||
| UNINSTALL PLUGIN clone; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| # Test remote clone command to replace data directory | ||
| !include ../../clone/t/remote_dml_replace.cnf | ||
|
|
||
| [mysqld.1] | ||
| default_storage_engine=RocksDB | ||
| default_dd_system_storage_engine=InnoDB | ||
|
|
||
| [mysqld.2] | ||
| default_storage_engine=RocksDB | ||
| default_dd_system_storage_engine=InnoDB |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| --source include/have_rocksdb.inc | ||
| --source include/have_debug.inc | ||
| --source include/have_debug_sync.inc | ||
|
|
||
| call mtr.add_suppression("Clone removing all user data for provisioning: Started"); | ||
| call mtr.add_suppression("Clone removing all user data for provisioning: Finished"); | ||
|
|
||
| --let $HOST = 127.0.0.1 | ||
| --let $PORT = `select @@port` | ||
| --let $USER = root | ||
| --let remote_clone = 1 | ||
| --let clone_remote_replace = 1 | ||
| --let clone_inst_number = 2 | ||
| --let inst_monitor = 1 | ||
| --let clone_connections = 2 | ||
|
|
||
| --source ../../clone/include/clone_connection_begin.inc | ||
|
|
||
| --replace_result $CLONE_PLUGIN CLONE_PLUGIN | ||
| --eval INSTALL PLUGIN clone SONAME '$CLONE_PLUGIN' | ||
|
|
||
| --connection clone_conn_1 | ||
| select @@default_dd_system_storage_engine; | ||
| SET DEBUG_SYNC = 'clone_after_drop_user_data SIGNAL check_user_table WAIT_FOR resume_clone'; | ||
|
|
||
| --replace_result $HOST HOST $PORT PORT | ||
| --eval SET GLOBAL clone_valid_donor_list = '$HOST:$PORT' | ||
|
|
||
| --replace_result $HOST HOST $PORT PORT $USER USER | ||
| --send_eval CLONE INSTANCE FROM $USER@$HOST:$PORT IDENTIFIED BY '' | ||
|
|
||
| --connection clone_conn_2 | ||
| SET DEBUG_SYNC = 'now WAIT_FOR check_user_table'; | ||
|
|
||
| # quick check mysql.user table still exists | ||
| select count(*) > 0 from mysql.user; | ||
|
|
||
| SET DEBUG_SYNC = 'now SIGNAL resume_clone'; | ||
|
|
||
| --connection clone_conn_1 | ||
| --reap | ||
|
|
||
| --source ../../clone/include/clone_connection_end.inc | ||
|
|
||
| # cleanup | ||
| --connection default | ||
| UNINSTALL PLUGIN clone; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.