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

plugin session local variable not reset at plugin reinstall

    XMLWordPrintable

Details

    • Bug
    • Status: Confirmed (View Workflow)
    • Minor
    • Resolution: Unresolved
    • 10.6, 10.11, 11.4, 11.8, 12.3
    • 10.11, 11.4, 11.8, 12.3, 13.0
    • Plugins
    • None

    Description

      Should not thd local also be reset?

      # Install the example engine (declares example.int_var)
      INSTALL PLUGIN example SONAME 'ha_example.so';
      # Registered default
      SELECT @@session.example_int_var AS first_install_default;
      first_install_default
      0
      # Set a per-session value on THIS connection (max of the -1..1 range)
      SET SESSION example_int_var = 1;
      SELECT @@session.example_int_var AS after_set;
      after_set
      1
      # Also move the GLOBAL off its registered default (0) to a distinct value
      # (-1), so a post-reinstall read can tell "reset to default" (0) from
      # "stale value survived" (-1)
      SET GLOBAL example_int_var = -1;
      SELECT @@global.example_int_var AS global_after_set;
      global_after_set
      -1
      UNINSTALL PLUGIN example;
      # Read the session var while the plugin is uninstalled
      SELECT @@session.example_int_var AS when_uninstalled;
      ERROR HY000: Unknown system variable 'example_int_var'
      # Reinstall on the SAME connection/server; session value MUST be default
      # again.
      INSTALL PLUGIN example SONAME 'ha_example.so';
      SELECT @@session.example_int_var AS after_reinstall;
      after_reinstall
      1
      SELECT @@global.example_int_var AS after_reinstall_global;
      after_reinstall_global
      0
      UNINSTALL PLUGIN example;
      

      Attachments

        Activity

          People

            serg Sergei Golubchik
            Ulin Tomas
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.