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

Recursive query using temp table random crash

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.3.5, 10.2(EOL), 10.3(EOL)
    • 10.2.15
    • Optimizer - CTE
    • None
    • Linux Centos 7.0 / Ubuntu 16.04

    Description

      For our data we use a recursive query to group the data together.
      We have created a stored procedure which calls all of our required queries together for quicker processing.

      We create a temporary table which extracts the important information from the table, and then we run a recursive query on the table, which can be seen as taking all children and all parents from a node in a tree.

      When running these components separately, we get the correct results in little time without crashing. However when running this query in a stored procedure it has one of three possible outcomes:
      It runs the query as desired in very little time,
      It crashes and gives an out of memory error: (ERROR 5 (HY000): Out of memory (Needed 19091736 bytes))
      It crashes and gives a too big key error: (ERROR 1815 (HY000): Internal error: Using too big key for internal temp tables)

      I have included a portion of the table which also gives the same error, it also creates the stored procedure.
      To generate the errors call the following query a few times:
      call getNums('3', '49d18acc-d3aa-45db-9efd-6d1a66971964');

      Attachments

        Issue Links

          Activity

            People

              igor Igor Babaev
              fjf Duncan Kampert
              Votes:
              0 Vote for this issue
              Watchers:
              5 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.