Bug #44072 MySQL client should show progress when importing data

Submitted: 3 Apr 2009 8:45
Reporter: Andrew Hutchings Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S4 (Feature request)
Version: OS:Any
Assigned to: Assigned Account CPU Architecture:Any
Tags: Contribution

[3 Apr 2009 8:45] Andrew Hutchings
Description:
When importing a large .sql (or other piped data) file the mysql client should give some idea of how much progress has been made

How to repeat:
mysql < input-file.sql

Suggested fix:
This patch has the new parameter "--show-progress-size=#" where # is the number of lines per output.

For example:

shell> mysql --show-progress-size=1500 < input-file.sql
Processing line: 1500
Processing line: 3000
...
[3 Apr 2009 8:45] Andrew Hutchings
Patch to apply feature to 5.1.30

Attachment: MySQL-5.1.30-import-progress-3.0.diff (application/octet-stream, text), 1.92 KiB.

[3 Apr 2009 8:47] Andrew Hutchings
Harrison Fisk also recommended 'bar' for this task:

For large imports, I will often use the 'bar' program from:

http://www.theiling.de/projects/bar.html

You can use it like cat, but it provides an ASCII progress bar. Normally, it is used as:

bar importfile.sql | mysql

Of course, it would be nice to not have to install an additional program from a third part to get this functionality.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.041 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.