Skip to content

Commit

Permalink
fix delete
Browse files Browse the repository at this point in the history
  • Loading branch information
liumengya94 committed Feb 6, 2023
1 parent 9794854 commit 2a82f8b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion dm/ctl/master/source_table_schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ func newSourceTableSchemaDeleteCmd() *cobra.Command {
database := args[1]
table := args[2]
request := &pb.OperateSchemaRequest{
Op: pb.SchemaOp_SetSchema,
Op: pb.SchemaOp_RemoveSchema,
Task: taskName,
Sources: sources,
Database: database,
Expand Down
4 changes: 4 additions & 0 deletions dm/tests/sequence_sharding_optimistic/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,10 @@ run() {
"binlog-schema list -s mysql-replica-01,mysql-replica-02 sequence_sharding_optimistic sharding_seq_opt t2" \
"\"result\": true" 3

run_dm_ctl $WORK_DIR "127.0.0.1:$MASTER_PORT" \
"binlog-schema delete -s mysql-replica-01 sequence_sharding_optimistic sharding_seq_opt t2" \
"\"result\": true" 2

# try to set another schema, `c3` `int` -> `bigint`.
echo 'CREATE TABLE `t1` ( `id` bigint(20) NOT NULL, `c2` varchar(20) DEFAULT NULL, `c3` bigint(11) DEFAULT NULL, PRIMARY KEY (`id`)) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin' >${WORK_DIR}/schema.sql
run_dm_ctl $WORK_DIR "127.0.0.1:$MASTER_PORT" \
Expand Down

0 comments on commit 2a82f8b

Please sign in to comment.