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

Support --where clause #9

Closed
4 tasks
kennytm opened this issue Dec 8, 2019 · 0 comments · Fixed by #40
Closed
4 tasks

Support --where clause #9

kennytm opened this issue Dec 8, 2019 · 0 comments · Fixed by #40

Comments

@kennytm
Copy link
Collaborator

kennytm commented Dec 8, 2019

Support the --where clause from mysqldump. The condition is applied on all tables.

  • The file size of the SQL dump should still be close to the configuration. If we dumped 1000 files of 256 MB each originally, and we use --where to filter out half of the rows, the result should be 500 files of 256 MB each, not 1000 files of 128 MB each.

  • If the expression cannot be evaluated, abort and report the error.

  • The condition used should be written out for SQL dumps (can be skipped for CSV and binary dumps) like:

    /* WHERE (id > 500) */
    INSERT INTO ...
  • Even if all rows are filtered out, it should still generate an SQL file with content:

    /* All data are filtered out by this condition: */
    /* WHERE (id > 500) */

Should work just fine by adding the condition to SELECT *.

Score

  • 600
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 a pull request may close this issue.

1 participant