Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dumpling failed when mix tables and views in "tables-list" #53682

Closed
tangenta opened this issue May 30, 2024 · 0 comments · Fixed by #53683
Closed

Dumpling failed when mix tables and views in "tables-list" #53682

tangenta opened this issue May 30, 2024 · 0 comments · Fixed by #53683
Labels
affects-6.5 This bug affects the 6.5.x(LTS) versions. affects-7.1 This bug affects the 7.1.x(LTS) versions. affects-7.5 This bug affects the 7.5.x(LTS) versions. affects-8.1 This bug affects the 8.1.x(LTS) versions. component/dumpling This is related to Dumpling of TiDB. severity/major type/bug The issue is confirmed as a bug.

Comments

@tangenta
Copy link
Contributor

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

  1. Deploy a TiDB cluster.
  2. Create a table and a view.
create table t (a int);
create view v as select * from t;
./dumpling -u root -P 4000 -h 127.0.0.1 --consistency lock -T test.t,test.v -o /tmp/dumpling

2. What did you expect to see? (Required)

No error.

3. What did you see instead (Required)

[2024/05/30 16:10:52.691 +08:00] [ERROR] [main.go:78] ["dump failed error stack info"] [error="sql: SHOW CREATE TABLE `specified_table_view`.`v`, args: []: sql: expected 4 destination arguments in Scan, not 2; sql: SHOW CREATE TABLE `specified_table_view`.`v`, args: []: sql: expected 4 destination arguments in Scan, not 2; sql: SHOW CREATE TABLE `specified_table_view`.`v`, args: []: sql: expected 4 destination arguments in Scan, not 2"] [errorVerbose="the following errors occurred:\n -  sql: expected 4 destination arguments in Scan, not 2\n    sql: SHOW CREATE TABLE `specified_table_view`.`v`, args: []\n    github.com/pingcap/tidb/dumpling/export.simpleQueryWithArgs\n    \tgithub.com/pingcap/tidb/dumpling/export/sql.go:1270\n    github.com/pingcap/tidb/dumpling/export.(*BaseConn).QuerySQL.func1\n    \tgithub.com/pingcap/tidb/dumpling/export/conn.go:42\n    github.com/pingcap/tidb/br/pkg/utils.WithRetry.func1\n    \tgithub.com/pingcap/tidb/br/pkg/utils/retry.go:216\n    github.com/pingcap/tidb/br/pkg/utils.WithRetryV2[...]\n    \tgithub.com/pingcap/tidb/br/pkg/utils/retry.go:234\n    github.com/pingcap/tidb/br/pkg/utils.WithRetry\n    \tgithub.com/pingcap/tidb/br/pkg/utils/retry.go:215\n    github.com/pingcap/tidb/dumpling/export.(*BaseConn).QuerySQL\n    \tgithub.com/pingcap/tidb/dumpling/export/conn.go:34\n    github.com/pingcap/tidb/dumpling/export.ShowCreateTable\n    \tgithub.com/pingcap/tidb/dumpling/export/sql.go:94\n    github.com/pingcap/tidb/dumpling/export.dumpTableMeta\n    \tgithub.com/pingcap/tidb/dumpling/export/dump.go:1253\n    github.com/pingcap/tidb/dumpling/export.(*Dumper).dumpDatabases\n    \tgithub.com/pingcap/tidb/dumpling/export/dump.go:444\n    github.com/pingcap/tidb/dumpling/export.(*Dumper).Dump\n    \tgithub.com/pingcap/tidb/dumpling/export/dump.go:316\n    main.main\n    \t./main.go:75\n    runtime.main\n    \truntime/proc.go:267\n    runtime.goexit\n    \truntime/asm_amd64.s:1650\n -  sql: expected 4 destination arguments in Scan, not 2\n    sql: SHOW CREATE TABLE `specified_table_view`.`v`, args: []\n    github.com/pingcap/tidb/dumpling/export.simpleQueryWithArgs\n    \tgithub.com/pingcap/tidb/dumpling/export/sql.go:1270\n    github.com/pingcap/tidb/dumpling/export.(*BaseConn).QuerySQL.func1\n    \tgithub.com/pingcap/tidb/dumpling/export/conn.go:42\n    github.com/pingcap/tidb/br/pkg/utils.WithRetry.func1\n    \tgithub.com/pingcap/tidb/br/pkg/utils/retry.go:216\n    github.com/pingcap/tidb/br/pkg/utils.WithRetryV2[...]\n    \tgithub.com/pingcap/tidb/br/pkg/utils/retry.go:234\n    github.com/pingcap/tidb/br/pkg/utils.WithRetry\n    \tgithub.com/pingcap/tidb/br/pkg/utils/retry.go:215\n    github.com/pingcap/tidb/dumpling/export.(*BaseConn).QuerySQL\n    \tgithub.com/pingcap/tidb/dumpling/export/conn.go:34\n    github.com/pingcap/tidb/dumpling/export.ShowCreateTable\n    \tgithub.com/pingcap/tidb/dumpling/export/sql.go:94\n    github.com/pingcap/tidb/dumpling/export.dumpTableMeta\n    \tgithub.com/pingcap/tidb/dumpling/export/dump.go:1253\n    github.com/pingcap/tidb/dumpling/export.(*Dumper).dumpDatabases\n    \tgithub.com/pingcap/tidb/dumpling/export/dump.go:444\n    github.com/pingcap/tidb/dumpling/export.(*Dumper).Dump\n    \tgithub.com/pingcap/tidb/dumpling/export/dump.go:316\n    main.main\n    \t./main.go:75\n    runtime.main\n    \truntime/proc.go:267\n    runtime.goexit\n    \truntime/asm_amd64.s:1650\n -  sql: expected 4 destination arguments in Scan, not 2\n    sql: SHOW CREATE TABLE `specified_table_view`.`v`, args: []\n    github.com/pingcap/tidb/dumpling/export.simpleQueryWithArgs\n    \tgithub.com/pingcap/tidb/dumpling/export/sql.go:1270\n    github.com/pingcap/tidb/dumpling/export.(*BaseConn).QuerySQL.func1\n    \tgithub.com/pingcap/tidb/dumpling/export/conn.go:42\n    github.com/pingcap/tidb/br/pkg/utils.WithRetry.func1\n    \tgithub.com/pingcap/tidb/br/pkg/utils/retry.go:216\n    github.com/pingcap/tidb/br/pkg/utils.WithRetryV2[...]\n    \tgithub.com/pingcap/tidb/br/pkg/utils/retry.go:234\n    github.com/pingcap/tidb/br/pkg/utils.WithRetry\n    \tgithub.com/pingcap/tidb/br/pkg/utils/retry.go:215\n    github.com/pingcap/tidb/dumpling/export.(*BaseConn).QuerySQL\n    \tgithub.com/pingcap/tidb/dumpling/export/conn.go:34\n    github.com/pingcap/tidb/dumpling/export.ShowCreateTable\n    \tgithub.com/pingcap/tidb/dumpling/export/sql.go:94\n    github.com/pingcap/tidb/dumpling/export.dumpTableMeta\n    \tgithub.com/pingcap/tidb/dumpling/export/dump.go:1253\n    github.com/pingcap/tidb/dumpling/export.(*Dumper).dumpDatabases\n    \tgithub.com/pingcap/tidb/dumpling/export/dump.go:444\n    github.com/pingcap/tidb/dumpling/export.(*Dumper).Dump\n    \tgithub.com/pingcap/tidb/dumpling/export/dump.go:316\n    main.main\n    \t./main.go:75\n    runtime.main\n    \truntime/proc.go:267\n    runtime.goexit\n    \truntime/asm_amd64.s:1650"]

dump failed: sql: SHOW CREATE TABLE `specified_table_view`.`v`, args: []: sql: expected 4 destination arguments in Scan, not 2; sql: SHOW CREATE TABLE `specified_table_view`.`v`, args: []: sql: expected 4 destination arguments in Scan, not 2; sql: SHOW CREATE TABLE `specified_table_view`.`v`, args: []: sql: expected 4 destination arguments in Scan, not 2
[Thu May 30 16:10:52 CST 2024] File /tmp/dumpling_test_result/sql_res.specified_table_view/specified_table_view.v-schema-view.sql not found.

4. What is your TiDB version? (Required)

e6d1899

@tangenta tangenta added type/bug The issue is confirmed as a bug. severity/major labels May 30, 2024
@tangenta tangenta added affects-6.5 This bug affects the 6.5.x(LTS) versions. affects-7.1 This bug affects the 7.1.x(LTS) versions. affects-7.5 This bug affects the 7.5.x(LTS) versions. affects-8.1 This bug affects the 8.1.x(LTS) versions. and removed may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-8.1 labels May 30, 2024
@jebter jebter added the component/dumpling This is related to Dumpling of TiDB. label May 31, 2024
ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this issue Jun 3, 2024
ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this issue Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-6.5 This bug affects the 6.5.x(LTS) versions. affects-7.1 This bug affects the 7.1.x(LTS) versions. affects-7.5 This bug affects the 7.5.x(LTS) versions. affects-8.1 This bug affects the 8.1.x(LTS) versions. component/dumpling This is related to Dumpling of TiDB. severity/major type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants