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

spiders' background initialization causes conflicts with mysql-upgrade (and general improvements)

    XMLWordPrintable

    Details

      Description

      The loading of the spider plugin causes a background thread to be created and the set of sql in storage/spider/spd_init_query.h to be run.

      Running mysql_upgrade at the same time the initialization of spider is occurring can cause problems as MDEV-27068 shows.

      One of the conflicts was

      • ALTER TABLE proc MODIFY
      • and spiders' {{ drop procedure}}

      Other similar conflicts can occur on plugin and udf function installation

      MDEV-19275 sql service for plugins means 10.7+ can simply this. Is it valid during initialization? Not 100% sure, but if it is, it would avoid the mariadb-upgrade conflicts.

      Other simplifications are:

      spider_fix_one_table looks like a simple modification of the ALTER TABLE syntax to use the column IF NOT EXISTS syntax of https://mariadb.com/kb/en/alter-table/ would negate the need for this function.

      mysql.spider_fix_system_tables, a procedure with zero arguments that sets user variables could be inline. Or better, removed and use the executable comment syntax in https://mariadb.com/kb/en/comment-syntax/#executable-comment-syntax to run statements based on the server version.

      Can the following be implemented another way install plugin [spider_rewrite soname 'ha_spider' (INSTALL PLUGIN has IF NOT EXISTS from 10.4)

      Can the udf functions created another way?

      Is there are reason (all of) this couldn't be part of mysql-upgrade? wrapped under conditional upgrade if spider is installed?

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              nayuta-yanagisawa Nayuta Yanagisawa
              Reporter:
              danblack Daniel Black
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:

                  Git Integration

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