[MDEV-2802] LP:706884 - INSERT ... SELECT consumes all memory and causes crash Created: 2011-01-24 Updated: 2015-02-02 Resolved: 2012-10-04 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor |
| Reporter: | Sergei Petrunia | Assignee: | Oleksandr Byelkin |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | Launchpad | ||
| Attachments: |
|
| Description |
|
Run the following queries (this is not necessary the minimum testcase): create table t0 (a int); create table t1 ( set myisam_sort_buffer_size=32*1000*1000; You'll see that mysqld will consume more and more memory, and on 32-bit machine will eventually be killed when it has consumed 2G and asks for more. |
| Comments |
| Comment by Sergei Petrunia [ 2011-01-24 ] |
|
Re: INSERT ... SELECT consumes all memory and causes crash Breakpoint 3, alloc_root (mem_root=0xa8cf618, length=8) at my_alloc.c:180 Breakpoint 3, alloc_root (mem_root=0xa8cf618, length=8) at my_alloc.c:180 Breakpoint 3, alloc_root (mem_root=0xa8cf618, length=8) at my_alloc.c:180 Breakpoint 3, alloc_root (mem_root=0xa8cf618, length=8) at my_alloc.c:180 Breakpoint 3, alloc_root (mem_root=0xa8cf618, length=8) at my_alloc.c:180 The stack trace seems to be always the same: |
| Comment by Sergei Petrunia [ 2011-01-24 ] |
|
Re: INSERT ... SELECT consumes all memory and causes crash bool ... List::push_back() will call alloc_root(). One may not call List::push_back() from a function that's run per each record combination. |
| Comment by Sergei Petrunia [ 2011-01-24 ] |
|
Re: INSERT ... SELECT consumes all memory and causes crash |
| Comment by Rasmus Johansson (Inactive) [ 2011-12-13 ] |
|
Launchpad bug id: 706884 |