Uploaded image for project: 'MariaDB MaxScale'
  1. MariaDB MaxScale
  2. MXS-6880

MaxScale treats SET GLOBAL SQL_MODE=ORACLE as if it was SET SESSION

    XMLWordPrintable

Details

    Description

      MariaDB behavior:

      MariaDB [test]> SELECT @@session.SQL_MODE;
      +-------------------------------------------------------------------------------------------+
      | @@session.SQL_MODE                                                                        |
      +-------------------------------------------------------------------------------------------+
      | STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION |
      +-------------------------------------------------------------------------------------------+
      1 row in set (0.000 sec)
       
      MariaDB [test]> SET GLOBAL SQL_MODE=ORACLE;
      Query OK, 0 rows affected (0.000 sec)
       
      MariaDB [test]> SELECT @@session.SQL_MODE;
      +-------------------------------------------------------------------------------------------+
      | @@session.SQL_MODE                                                                        |
      +-------------------------------------------------------------------------------------------+
      | STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION |
      +-------------------------------------------------------------------------------------------+
      1 row in set (0.000 sec)
       
      MariaDB [test]> SET SESSION SQL_MODE=ORACLE;
      Query OK, 0 rows affected (0.000 sec)
       
      MariaDB [test]> SELECT @@session.SQL_MODE;
      +----------------------------------------------------------------------------------------------------------------------------------------------+
      | @@session.SQL_MODE                                                                                                                           |
      +----------------------------------------------------------------------------------------------------------------------------------------------+
      | PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ORACLE,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS,NO_AUTO_CREATE_USER,SIMULTANEOUS_ASSIGNMENT |
      +----------------------------------------------------------------------------------------------------------------------------------------------+
      1 row in set (0.000 sec)
      

      As can be seen, the value is not modified by SET GLOBAL. MaxScale treats SET GLOBAL as if it was a plain SET or SET SESSION. The parsing in MaxScale also doesn't correctly detect this type of SET command:

      MariaDB [test]> SET GLOBAL SQL_MODE=DEFAULT, SESSION SQL_MODE=ORACLE;
      Query OK, 0 rows affected (0.000 sec)
      

      Attachments

        Issue Links

          Activity

            People

              markus makela markus makela
              markus makela markus makela
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.