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

Server crash when calling twice procedure using FOR-loop

    XMLWordPrintable

Details

    Description

      Steps to reproduce:

      1. Create a function, which selects data from any table. It is not enough to just return some constant value.

      2. Create a view, which uses the function created in step 1.

      3. Create a procedure, which runs for-loop. This for loop must query view created on step 2. However, it should not use any columns returned from the query, but a constant, eg. 1, for each row.

      4. Call procedure twice from the same connection. First run success normally. The second one crashes the server without any explanation.

      Minimal Reproducible Example is on attachment server_crash.sql.

      All these details seem to be required to cause the server to crash. Interestingly enough, dropping some of them causes a different issue. If I select any value on cursor definition or skip the view and call the function directly, the first run results an error Table 'test_table' doesn't exist. Example of this is on file table_does_not_exist.sql.

      Attachments

        Activity

          People

            sanja Oleksandr Byelkin
            pauluslimma Paulus Limma
            Votes:
            0 Vote for this issue
            Watchers:
            9 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.