Skip to content
This repository has been archived by the owner on Aug 21, 2023. It is now read-only.

Fix: dump all generated column table #166

Merged
merged 10 commits into from
Oct 22, 2020
Merged

Fix: dump all generated column table #166

merged 10 commits into from
Oct 22, 2020

Conversation

Abingcbc
Copy link
Contributor

@Abingcbc Abingcbc commented Oct 18, 2020

What problem does this PR solve?

Fix #145

What is changed and how it works?

Handling the case where selected field is empty

Check List

Tests

  • Unit test

Side effects

Related changes

Release note

@CLAassistant
Copy link

CLAassistant commented Oct 18, 2020

CLA assistant check
All committers have signed the CLA.

v4/export/dump_test.go Outdated Show resolved Hide resolved
Copy link
Collaborator

@kennytm kennytm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the PR.

when a table contains only generated columns, it should produce an output with COUNT(*) empty rows, rather than skipping the table entirely, for instance producing

INSERT INTO `the_table` VALUES
(),
(),
(),
(),
();

could you add a test for that (e.g. reuse tests/ignore_generate_column)?

(you could use the CI if setting up the environment is too hard 😛)

v4/export/dump.go Outdated Show resolved Hide resolved
Copy link
Collaborator

@kennytm kennytm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rest LGTM

v4/export/sql.go Outdated Show resolved Hide resolved
v4/export/test_util.go Outdated Show resolved Hide resolved
v4/export/writer_util.go Show resolved Hide resolved
Copy link
Collaborator

@kennytm kennytm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@lichunzhu lichunzhu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lichunzhu lichunzhu merged commit 766fd1c into pingcap:master Oct 22, 2020
@Abingcbc Abingcbc deleted the fix_all_generated_column branch October 22, 2020 07:20
tisonkun pushed a commit to tisonkun/dumpling that referenced this pull request Oct 20, 2021
* Fix dump all generated column table
tisonkun pushed a commit to tisonkun/dumpling that referenced this pull request Oct 20, 2021
* Fix dump all generated column table
tisonkun pushed a commit to tisonkun/dumpling that referenced this pull request Oct 20, 2021
* Fix dump all generated column table
tisonkun pushed a commit to tisonkun/dumpling that referenced this pull request Oct 20, 2021
* Fix dump all generated column table
tisonkun pushed a commit to tisonkun/tidb that referenced this pull request Oct 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

dump data failed with syntax error when the entire table is generated columns
5 participants