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

MySQL WL#4179 - Stored programs: validation of stored program statements

    XMLWordPrintable

Details

    Description

      Test case for MySQL "WL#4179 - Stored programs: validation of stored program statements" fails in 10.0.

      Test diff attached. Please try to apply test case as is unless it is applicable.

      Changes introduced by the task MDEV-5816.
      ---------------------------------------------
      Main logic of SP instructions processing is modified to support handling of tables metadata change the Stored routine's instructions depends on.

      • On first execution of SP instruction the current version of metadata for tables used by SP statement is extracted from the data dictionary and remembered in SP instruction's context.
      • Next time the same SP instruction is run the current version of underlying tables metadata is checked against their version loaded from data dictionary. In case these versions are different the statement for this SP instruction is re-parsed and actual metadata of underlying tables is reloaded from the data dictionary.

      To invalidate current SP instruction on metadata change and force its re-parsing, the same approach that used for Prepared Statement is applied - an instance of the class Reprepare_observer installed before second and subsequent executions of SP instruction and in case underlying tables metadata be changed this fact will be notified to and SP instruction's statement be re-parsed.

      Attachments

        1. wl4179.patch
          79 kB
          Sergey Vojtovich
        2. wl4179-add.patch
          16 kB
          Sergey Vojtovich

        Issue Links

          Activity

            People

              shulga Dmitry Shulga
              svoj Sergey Vojtovich
              Votes:
              2 Vote for this issue
              Watchers:
              10 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.