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

Function crash server

    XMLWordPrintable

    Details

      Description

      If I execute this function 2 or 3 times (manually), the server CRASH.

      the idea of the function is to search if a columns exists in 2 different tables

      CREATE FUNCTION if_column_exists_normal_and_backup(tableNameToSearch TINYTEXT,
                                                         columnNameToSearch TINYTEXT)
          RETURNS BOOLEAN
          LANGUAGE SQL
      BEGIN
          SET @original = tableNameToSearch;
          SET @backup = CONCAT(tableNameToSearch, '_backup');
       
          RETURN (
                  exists(SELECT COLUMN_NAME
                         FROM INFORMATION_SCHEMA.COLUMNS
                         WHERE TABLE_NAME = @original
                           AND COLUMN_NAME = `columnnametosearch`
                      )
                  AND
                  exists(SELECT COLUMN_NAME
                         FROM INFORMATION_SCHEMA.COLUMNS
                         WHERE TABLE_NAME = @backup
                           AND COLUMN_NAME = `columnnametosearch`
                      )
              );
      END
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              sanja Oleksandr Byelkin
              Reporter:
              francogp Franco Gastón Pellegrini
              Votes:
              1 Vote for this issue
              Watchers:
              6 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.