Skip to content

Commit

Permalink
commit-message: fix log level
Browse files Browse the repository at this point in the history
  • Loading branch information
WizardXiao committed Dec 3, 2021
1 parent 57b326d commit dfc5fdf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
8 changes: 4 additions & 4 deletions dumpling/export/dump.go
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ func adjustDatabaseCollation(tctx *tcontext.Context, parser *parser.Parser, orig
// get db collation
collation, ok := charsetAndDefaultCollationMap[strings.ToLower(charset)]
if !ok {
tctx.L().Error("not found database charset default collation.", zap.String("originSQL", originSQL), zap.String("charset", strings.ToLower(charset)))
tctx.L().Warn("not found database charset default collation.", zap.String("originSQL", originSQL), zap.String("charset", strings.ToLower(charset)))
return originSQL, nil
}
// add collation
Expand All @@ -437,7 +437,7 @@ func adjustDatabaseCollation(tctx *tcontext.Context, parser *parser.Parser, orig
In: bf,
})
if err != nil {
return "", err
return "", errors.Trace(err)
}
return bf.String(), nil
}
Expand Down Expand Up @@ -467,7 +467,7 @@ func adjustTableCollation(tctx *tcontext.Context, parser *parser.Parser, originS
// get db collation
collation, ok := charsetAndDefaultCollationMap[strings.ToLower(charset)]
if !ok {
tctx.L().Error("not found table charset default collation.", zap.String("originSQL", originSQL), zap.String("charset", strings.ToLower(charset)))
tctx.L().WARN("not found table charset default collation.", zap.String("originSQL", originSQL), zap.String("charset", strings.ToLower(charset)))
return originSQL, nil
}

Expand All @@ -481,7 +481,7 @@ func adjustTableCollation(tctx *tcontext.Context, parser *parser.Parser, originS
In: bf,
})
if err != nil {
return "", err
return "", errors.Trace(err)
}
return bf.String(), nil
}
Expand Down
3 changes: 2 additions & 1 deletion dumpling/tests/placement_policy/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ file_should_exist "$DUMPLING_OUTPUT_DIR/x1-placement-policy-create.sql"
diff "$DUMPLING_BASE_NAME/result/x-placement-policy-create.sql" "$DUMPLING_OUTPUT_DIR/x-placement-policy-create.sql"
diff "$DUMPLING_BASE_NAME/result/x1-placement-policy-create.sql" "$DUMPLING_OUTPUT_DIR/x1-placement-policy-create.sql"

run_sql "drop database if exists policy"
run_sql "drop placement policy if exists x"
run_sql "drop placement policy if exists x1"
run_sql "drop database if exists policy"

0 comments on commit dfc5fdf

Please sign in to comment.