Bug #27029 | alter table ... enable keys crashes mysqld on large table | ||
---|---|---|---|
Submitted: | 11 Mar 2007 8:07 | Modified: | 23 Jun 2007 8:35 |
Reporter: | Shane Bester (Platinum Quality Contributor) | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: MyISAM storage engine | Severity: | S1 (Critical) |
Version: | <=5.0.38 | OS: | Windows (windows) |
Assigned to: | Iggy Galarza | CPU Architecture: | Any |
Tags: | ALTER TABLE, crash, myisam |
[11 Mar 2007 8:07]
Shane Bester
[11 Mar 2007 8:10]
MySQL Verification Team
some outputs from debugger, 5.0.38
Attachment: bug_debug_info.txt (text/plain), 10.10 KiB.
[11 Mar 2007 8:22]
MySQL Verification Team
debug trace output from -#F:L:t:n:i:d:O,keys.log
Attachment: debug_trace_keys.log (application/octet-stream, text), 208.04 KiB.
[11 Mar 2007 13:25]
MySQL Verification Team
the table files. unrar, then unrar again.
Attachment: t1_table_64GB_rar.rar (application/octet-stream, text), 44.81 KiB.
[11 Mar 2007 17:18]
MySQL Verification Team
I can't seem to repeat this on linux. fyi, i have 64-bit windows XP and both 32-bit and 64-bit mysqld-nt and mysqld-debug binaries crashed instantly after running the ALTER TABLE t1 ENABLE KEYS.
[21 Jun 2007 16:46]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/29317 ChangeSet@1.2485, 2007-06-21 12:45:56-04:00, iggy@amd64.(none) +4 -0 Bug#27029 alter table ... enable keys crashes mysqld on large table - When creating an index for the sort, the number of rows plus 1 is used to allocate a buffer. In this test case, the number of rows 4294967295 is the max value of an unsigned integer, so when 1 was added to it, a buffer of size 0 was allocated causing the crash. - Create new test suite for this bug's test suite as per QA.
[22 Jun 2007 18:07]
Bugs System
Pushed into 5.1.20-beta
[22 Jun 2007 18:09]
Bugs System
Pushed into 5.0.46
[23 Jun 2007 8:35]
Jon Stephens
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release. If necessary, you can access the source repository and build the latest available version, including the bug fix. More information about accessing the source trees is available at http://dev.mysql.com/doc/en/installing-source.html Documented bugfix in 5.0.46 and 5.1.20 changelogs.
[29 Jul 2007 22:45]
Michael Rack
Hi, i've installed 5.1.20 on my Gentoo Linux Box running Kernel 2.6.16. MySQL is still die when i run the statement: /*!40000 ALTER TABLE `KUNDE` DISABLE KEYS */ .... /*!40000 ALTER TABLE `...` ENABLE KEYS */ <<--- CRASH The Query is a result of an mysqldump result with enabled option --disable-keys Now, when i'm import the mysqldump-result, mysql is restarting. ---- MYSQL-LOG-FILE: ---- 070730 0:38:55 - mysqld got signal 11; This could be because you hit a bug. It is also possible that this binary or one of the libraries it was linked against is corrupt, improperly built, or misconfigured. This error can also be caused by malfunctioning hardware. We will try our best to scrape up some info that will hopefully help diagnose the problem, but since we have already crashed, something is definitely wrong and this may fail. key_buffer_size=268435456 read_buffer_size=16773120 max_used_connections=1 max_threads=151 threads_connected=1 It is possible that mysqld could use up to key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 5210871 K bytes of memory Hope that's ok; if not, decrease some variables in the equation. thd: 0x0 Attempting backtrace. You can use the following information to find out where mysqld died. If you see no messages after this, something went terribly wrong... frame pointer is NULL, did you compile with -fomit-frame-pointer? Aborting backtrace! The manual page at http://www.mysql.com/doc/en/Crashing.html contains information that should help you find out what is causing the crash. 070730 00:38:55 mysqld_safe Number of processes running now: 0 070730 00:38:55 mysqld_safe mysqld restarted