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

EVENTs created with SQL_MODE=ORACLE fail to execute

Details

    Description

      How to reproduce:

      Create the same event doing a simple "SELECT 1"
      in default and 'ORACLE' sql_modes:

      SET GLOBAL event_scheduler=1;
       
      SET sql_mode='';
      CREATE EVENT e1 ON SCHEDULE EVERY 1 MINUTE  DO SELECT 1;
       
      SET sql_mode='ORACLE';
      CREATE EVENT e2 ON SCHEDULE EVERY 1 MINUTE  DO SELECT 1;
      

      Creating the events succeeds just fine without problems.

      But when it is time to execute the events the one that was created while "ORACLE" mode was in effect fails with a syntax error:

      2018-08-03 11:38:11 14 [ERROR] Event Scheduler: error during compilation of test.e2
      2018-08-03 11:38:11 14 [ERROR] Event Scheduler: [root@localhost][test.e2] You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'select 1' at line 1
      2018-08-03 11:38:11 14 [Note] Event Scheduler: [root@localhost].[test.e2] event execution failed.
      

      Attachments

        Activity

          hholzgra Hartmut Holzgraefe created issue -

          Same way, if you have ORACLE mode by default (that is, if event scheduler itself starts with sql_mode=ORACLE), then the "normal" ev1 will cause the syntax error. It doesn't seem particularly surprising, but I'll leave it to bar to clarify whether it's expected behavior.

          elenst Elena Stepanova added a comment - Same way, if you have ORACLE mode by default (that is, if event scheduler itself starts with sql_mode=ORACLE ), then the "normal" ev1 will cause the syntax error. It doesn't seem particularly surprising, but I'll leave it to bar to clarify whether it's expected behavior.
          elenst Elena Stepanova made changes -
          Field Original Value New Value
          Component/s Parser [ 10201 ]
          Fix Version/s 10.3 [ 22126 ]
          Assignee Alexander Barkov [ bar ]
          elenst Elena Stepanova made changes -
          Status Open [ 1 ] Confirmed [ 10101 ]
          bar Alexander Barkov made changes -
          Status Confirmed [ 10101 ] In Progress [ 3 ]
          bar Alexander Barkov made changes -
          issue.field.resolutiondate 2018-08-07 07:56:15.0 2018-08-07 07:56:15.135
          bar Alexander Barkov made changes -
          Fix Version/s 10.3.9 [ 23114 ]
          Fix Version/s 10.3 [ 22126 ]
          Resolution Fixed [ 1 ]
          Status In Progress [ 3 ] Closed [ 6 ]
          serg Sergei Golubchik made changes -
          Workflow MariaDB v3 [ 88729 ] MariaDB v4 [ 154748 ]
          mariadb-jira-automation Jira Automation (IT) made changes -
          Zendesk Related Tickets 139159

          People

            bar Alexander Barkov
            hholzgra Hartmut Holzgraefe
            Votes:
            0 Vote for this issue
            Watchers:
            4 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.