Skip to content

Commit

Permalink
dump: don't dump data for view (pingcap#227)
Browse files Browse the repository at this point in the history
  • Loading branch information
lance6716 authored Dec 30, 2020
1 parent 2d79697 commit b7671b6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion dumpling/tests/views/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@ file_not_exist "$DUMPLING_OUTPUT_DIR/views.v-schema-view.sql"
run_dumpling --no-views=false
#diff "$DUMPLING_BASE_NAME/data/views-schema-create.sql" "$DUMPLING_OUTPUT_DIR/views-schema-create.sql"
diff "$DUMPLING_BASE_NAME/data/views.v-schema.sql" "$DUMPLING_OUTPUT_DIR/views.v-schema.sql"
diff "$DUMPLING_BASE_NAME/data/views.v-schema-view.sql" "$DUMPLING_OUTPUT_DIR/views.v-schema-view.sql"
diff "$DUMPLING_BASE_NAME/data/views.v-schema-view.sql" "$DUMPLING_OUTPUT_DIR/views.v-schema-view.sql"
file_not_exist "$DUMPLING_BASE_NAME/data/views.v.000000000.sql"
8 changes: 4 additions & 4 deletions dumpling/v4/export/dump.go
Original file line number Diff line number Diff line change
Expand Up @@ -270,10 +270,10 @@ func (d *Dumper) dumpDatabases(metaConn *sql.Conn, taskChan chan<- Task) error {
} else {
task := NewTaskTableMeta(dbName, table.Name, meta.ShowCreateTable())
d.sendTaskToChan(task, taskChan)
}
err = d.dumpTableData(metaConn, meta, taskChan)
if err != nil {
return err
err = d.dumpTableData(metaConn, meta, taskChan)
if err != nil {
return err
}
}
}
}
Expand Down

0 comments on commit b7671b6

Please sign in to comment.