Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-2802

LP:706884 - INSERT ... SELECT consumes all memory and causes crash

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • None
    • None
    • None

    Description

      Run the following queries (this is not necessary the minimum testcase):

      create table t0 (a int);
      insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);

      create table t1 (
      kp1 int, kp2 int,
      filler char(100),
      col int,
      key(kp1, kp2)
      );

      set myisam_sort_buffer_size=32*1000*1000;
      insert into t1
      select
      1000 + A.a + 10*B.a + 100*C.a + 1000*D.a + 10000 * F.a,
      1,
      'filler-data filler-data filler-data filler-data filler-data',
      1
      from
      t0 A, t0 B, t0 C, t0 D, t0 E, t0 F, t0 G, t0 H

      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.

      Attachments

        Activity

          People

            sanja Oleksandr Byelkin
            psergei Sergei Petrunia
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.