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

Recursive query using temp table random crash

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.2, 10.3, 10.3.5
    • Fix Version/s: 10.2.15
    • Component/s: Optimizer - CTE
    • Labels:
      None
    • Environment:
      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

              Assignee:
              igor Igor Babaev
              Reporter:
              fjf Duncan Kampert
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: