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

Drop TRIGGERs, FUNCTIONs and ROUTINEs from prepared statement

    XMLWordPrintable

    Details

      Description

      Hi,

      In a Galera cluster it is not recommended to dml the MyISAM tables in the mysql schema. Therefore it is not possible to programatically drop triggers, stored procedures and functions by deleting it from the corresponding tables.

      As a work-around, one can create a prepared statement to run the DDL. This works for ALTER TABLE statements. This way, from a stored procdure, one can programatically run alter tables.

      Unfortunately, when using the same technique to drop a trigger, routine or function, this error appears:

      MariaDB [dba]> set @bla='DROP TRIGGER `scehma`.`trigger_name`;';
      Query OK, 0 rows affected (0.000 sec)
       
      MariaDB [dba]> prepare smt from @bla;
      ERROR 1295 (HY000): This command is not supported in the prepared statement protocol yet
      

      Please implement this so we can do more DDL statements from stored procedures.

      Thank you,
      Michaël

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              shulga Dmitry Shulga
              Reporter:
              michaeldg Michaël de groot
              Votes:
              2 Vote for this issue
              Watchers:
              3 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.