Details
-
Task
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
Description
I think
--tab
|
export would be improved if there was an option to export a row of column headers. This is a very standard CSV format.
Ex. rather than just the .sql file, you could have an output like:
"City","State","Zip"
"New York","New York","10001"
"Washington","District of Columbia","20002"
Perhaps
--prefix-data-by-column-names
|
, which can only be used together with
--tab
|
, would match the style of other options.
Attachments
Issue Links
- causes
-
MDEV-29889 mysqldump --tab --header is slow
-
- Closed
-
I have submitted the PR #1937 on this issue, which provides a new option --header.
Invoking mysqldump database --tab <path> --header adds a header row with column names to the text files generated by --tab. The options --fields-terminated-by, --fields-enclosed-by, --fields-optionally-enclosed-by and --lines-terminated-by also apply to the header row. If the --header option is used without a leading --tab option, an error occurs