Skip to content

Commit

Permalink
add test for restore view table and fk table (#1.2-dev) (#16432)
Browse files Browse the repository at this point in the history
add test for restore view table and fk table

Approved by: @daviszhen, @aressu1985, @sukki37
  • Loading branch information
YANGGMM authored May 30, 2024
1 parent 085936b commit 7d957a2
Show file tree
Hide file tree
Showing 7 changed files with 3,501 additions and 76 deletions.
4 changes: 2 additions & 2 deletions pkg/frontend/snapshot.go
Original file line number Diff line number Diff line change
Expand Up @@ -885,7 +885,7 @@ func showFullTables(ctx context.Context, bh BackgroundExec, snapshotName string,
if len(snapshotName) > 0 {
sql += fmt.Sprintf(" {snapshot = '%s'}", snapshotName)
}

getLogger().Info(fmt.Sprintf("[%s] get table %v info sql: %s", snapshotName, tblName, sql))
// cols: table name, table type
colsList, err := getStringColsList(ctx, bh, sql, 0, 1)
if err != nil {
Expand All @@ -904,7 +904,7 @@ func showFullTables(ctx context.Context, bh BackgroundExec, snapshotName string,
}

func getTableInfos(ctx context.Context, bh BackgroundExec, snapshotName string, dbName string, tblName string) ([]*tableInfo, error) {
getLogger().Info(fmt.Sprintf("[%s] start to get table info: %v", snapshotName, dbName))
getLogger().Info(fmt.Sprintf("[%s] start to get table info: %v", snapshotName, tblName))
tableInfos, err := showFullTables(ctx, bh, snapshotName, dbName, tblName)
if err != nil {
return nil, err
Expand Down
Loading

0 comments on commit 7d957a2

Please sign in to comment.