Bug #9266 mysqldump crash on big table

Submitted: 18 Mar 2005 8:38 Modified: 22 Jun 2005 19:34
Reporter: Andrey Kotrekhov Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: mysqldump Command-line Client Severity:S2 (Serious)
Version:4.1.9-log OS:FreeBSD (FreeBSD 5.2.1)
Assigned to: Magnus Blåudd CPU Architecture:Any

[18 Mar 2005 8:38] Andrey Kotrekhov
Description:
Mysqldump crash on big MYISAM table.
IMHO -q option dosn't work

/usr/local/mysql/bin/mysqldump -u mysql -c -q --skip-opt --add-drop-table my_db ppp_wtmp

mysqldump in malloc(): error: allocation failed
Abort trap (core dumped)

How to repeat:
Try dump table with big number of records.

mysql> select count(*) from ppp_wtmp;
+----------+
| count(*) |
+----------+
|  2355818 |
+----------+
1 row in set (0,00 sec)

mysql>
[8 Apr 2005 9:26] Geert Vanderkelen
Hi Andrey,

Could you please try to reproduce this on another machine, preferable same FreeBSD/MySQL setup. And if possible, on a Linux or other operating system?

Regards,

Geert
[8 May 2005 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[22 Jun 2005 11:55] Andrey Kotrekhov
mysql  Ver 14.7 Distrib 4.1.11, for redhat-linux-gnu (i386)
doesn't crash
but on FreeBSD  5.4-PRERELEASE
mysqldump crash too
[22 Jun 2005 19:34] Magnus Blåudd
/usr/local/mysql/bin/mysqldump -u mysql -c -q --skip-opt --add-drop-table my_db
ppp_wtmp

When writing a testcase for this I went through the flags:
# --complete-insert, -c
 Use complete INSERT statements that include column names.

#--quick, -q
This option is useful for dumping large tables. It forces mysqldump to retrieve rows for a table from the server a row at a time rather than retrieving the entire row set and buffering it in memory before writing it out.

# --opt
This option is shorthand; it is the same as specifying --add-drop-table --add-locks --create-options --disable-keys --extended-insert --lock-tables --quick --set-charset. It should give you a fast dump operation and produce a dump file that can be reloaded into a MySQL server quickly. As of MySQL 4.1, --opt is on by default, but can be disabled with --skip-opt. To disable only certain of the options enabled by --opt, use their --skip forms; for example, --skip-add-drop-table or --skip-quick.

Since you are using skip-opt, you are turning off all of the above optimizations, including quick. Sorry.

Please try to dump your table with the following commandline:
mysqldump -u mysql my_db ppp_wtmp,
or at least remove --skip-opt from the command line.
[5 Jul 2005 8:42] Andrey Kotrekhov
Thank you. It works.

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

Page generated in 0.040 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.