<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h4 class="title">
      <a name="version-tokens-elements">
      </a>
      7.6.6.1 Version Tokens Elements
     </h4>
    </div>
   </div>
  </div>
  <a class="indexterm" name="idm46045256123648">
  </a>
  <p>
   Version Tokens is based on a plugin library that implements
        these elements:
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      A server-side plugin named
      <code class="literal">
       version_tokens
      </code>
      holds the list of version tokens associated with the server
            and subscribes to notifications for statement execution
            events. The
      <code class="literal">
       version_tokens
      </code>
      plugin uses
            the
      <a class="ulink" href="/doc/extending-mysql/8.4/en/plugin-types.html#audit-plugin-type" target="_top">
       audit plugin
            API
      </a>
      to monitor incoming statements from clients and
            matches each client's session-specific version token list
            against the server version token list. If there is a match,
            the plugin lets the statement through and the server
            continues to process it. Otherwise, the plugin returns an
            error to the client and the statement fails.
     </p>
    </li>
    <li class="listitem">
     <p>
      A set of loadable functions provides an SQL-level API for
            manipulating and inspecting the list of server version
            tokens maintained by the plugin. The
      <a class="link" href="privileges-provided.html#priv_version-token-admin">
       <code class="literal">
        VERSION_TOKEN_ADMIN
       </code>
      </a>
      privilege
            (or the deprecated
      <a class="link" href="privileges-provided.html#priv_super">
       <code class="literal">
        SUPER
       </code>
      </a>
      privilege) is required to call any of the Version Token
            functions.
     </p>
    </li>
    <li class="listitem">
     <p>
      When the
      <code class="literal">
       version_tokens
      </code>
      plugin loads, it
            defines the
      <a class="link" href="privileges-provided.html#priv_version-token-admin">
       <code class="literal">
        VERSION_TOKEN_ADMIN
       </code>
      </a>
      dynamic
            privilege. This privilege can be granted to users of the
            functions.
     </p>
    </li>
    <li class="listitem">
     <p>
      A system variable enables clients to specify the list of
            version tokens that register the required server state. If
            the server has a different state when a client sends a
            statement, the client receives an error.
     </p>
    </li>
   </ul>
  </div>
 </div>
 <br/>
</div>
