Bug #21059 | Server crashes on join query with large dataset with NDB tables | ||
---|---|---|---|
Submitted: | 14 Jul 2006 13:10 | Modified: | 17 Aug 2006 8:51 |
Reporter: | Giuseppe Maxia | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Cluster: Cluster (NDB) storage engine | Severity: | S1 (Critical) |
Version: | 5.1.11, 5.0.19 | OS: | Linux (Linux) |
Assigned to: | Martin Skold | CPU Architecture: | Any |
Tags: | cluster |
[14 Jul 2006 13:10]
Giuseppe Maxia
[26 Jul 2006 8:30]
Hartmut Holzgraefe
The query did not crash for me but after running it on the full table without the WHERE clause limitation mysqld had grown to a virtual size of 8GB, so consuming almost all available physical memory on my 64bit test system: PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 12501 hholzgra 16 0 8084m 7.5g 6292 S 0.0 98.9 8:32.82 mysqld So i'm pretty sure you experienced a crash caused by an out-of-memory situation.
[26 Jul 2006 8:46]
Giuseppe Maxia
As I said in my original report, the query without the WHERE clause is "safe" (for the cluster), while the query without the WHERE clause is not. Anyway, the problem could be an out-of-memory case, because my server has only 4 GB of RAM. The system should not crash, though. The same query in InnoDB or MyISAM works just fine, even with the full database, not only the reduced one, and much faster. Giuseppe
[26 Jul 2006 9:44]
Hartmut Holzgraefe
Even in its simplest form select player_name from players inner join results using (player_id) this query leaks memory at about the same speed. When converting the tables from NDB to MyISAM all is well. EXPLAIN for NDB tables: explain select player_name from players inner join results on players.player_id = results.player_id \G *************************** 1. row *************************** id: 1 select_type: SIMPLE table: results type: ALL possible_keys: PRIMARY key: NULL key_len: NULL ref: NULL rows: 3400000 Extra: *************************** 2. row *************************** id: 1 select_type: SIMPLE table: players type: eq_ref possible_keys: PRIMARY key: PRIMARY key_len: 4 ref: test.results.player_id rows: 1 Extra: 2 rows in set (0.01 sec) EXPLAIN for MyISAM tables: explain select player_name from players inner join results on players.player_id = results.player_id \G *************************** 1. row *************************** id: 1 select_type: SIMPLE table: results type: index possible_keys: PRIMARY key: PRIMARY key_len: 8 ref: NULL rows: 3400000 Extra: Using index *************************** 2. row *************************** id: 1 select_type: SIMPLE table: players type: eq_ref possible_keys: PRIMARY key: PRIMARY key_len: 4 ref: test.results.player_id rows: 1 Extra: 2 rows in set (0.00 sec)
[26 Jul 2006 11:13]
Hartmut Holzgraefe
raised to P1 (Critical) due to crashing behavior and probably customers being affected
[7 Aug 2006 11:51]
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/10113 ChangeSet@1.2498, 2006-08-07 13:51:20+02:00, mskold@mysql.com +3 -0 Fix for bug #21059 Server crashes on join query with large dataset with NDB tables: Releasing operation for each intermediate batch, before next call to trans->execute(NoCommit);
[7 Aug 2006 12:49]
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/10118 ChangeSet@1.2200, 2006-08-07 14:48:54+02:00, mskold@mysql.com +2 -0 Fix for bug #21059 Server crashes on join query with large dataset with NDB tables: Releasing operation for each intermediate batch, before next call to trans->execute(NoCommit);
[7 Aug 2006 13:58]
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/10119 ChangeSet@1.2201, 2006-08-07 15:58:43+02:00, mskold@mysql.com +1 -0 Fix for bug #21059 Server crashes on join query with large dataset with NDB tables: missing friend declaration in change set
[9 Aug 2006 12:33]
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/10198 ChangeSet@1.2203, 2006-08-09 14:32:56+02:00, mskold@mysql.com +2 -0 Fix for bug #21059 Server crashes on join query with large dataset with NDB tables: added more tests
[14 Aug 2006 7:43]
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/10339 ChangeSet@1.2204, 2006-08-14 09:42:51+02:00, mskold@mysql.com +2 -0 Fix for bug #21059 Server crashes on join query with large dataset with NDB tables: Post review fix, not releasing operation records if BLOB operations
[15 Aug 2006 7:38]
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/10424 ChangeSet@1.2537, 2006-08-15 09:38:21+02:00, mskold@mysql.com +5 -0 ndb_lock.test, ndb_lock.result: bug #18184 SELECT ... FOR UPDATE does not work..: New test case ha_ndbcluster.h, ha_ndbcluster.cc, NdbConnection.hpp: Fix for bug #21059 Server crashes on join query with large dataset with NDB tables: Releasing operation for each intermediate batch, before next call to trans->execute(NoCommit);
[15 Aug 2006 11:12]
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/10455 ChangeSet@1.2537, 2006-08-15 13:12:27+02:00, mskold@mysql.com +5 -0 ndb_lock.test, ndb_lock.result: bug #18184 SELECT ... FOR UPDATE does not work..: New test case ha_ndbcluster.h, ha_ndbcluster.cc, NdbConnection.hpp: Fix for bug #21059 Server crashes on join query with large dataset with NDB tables: Releasing operation for each intermediate batch, before next call to trans->execute(NoCommit);
[15 Aug 2006 12:31]
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/10468 ChangeSet@1.2254, 2006-08-15 14:31:21+02:00, mskold@mysql.com +2 -0 Fix for bug #21059 Server crashes on join query with large dataset with NDB tables: do not release operation records for on-going read_multi_range
[16 Aug 2006 7:39]
Martin Skold
Pushed to 4.1.22, 5.0.25, 5.1.12
[17 Aug 2006 8:51]
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 4.1.22/5.0.25/5.1.12 changelogs.