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

In SQL_MODE=ORACLE, sequence_name.nextval can get routed to slave

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Not a Bug
    • 2.2.13
    • N/A
    • readwritesplit
    • None

    Description

      MariaDB supports a special syntax for sequences when SQL_MODE=ORACLE is set:

      or in Oracle mode (SQL_MODE=ORACLE)

      sequence_name.nextval

      https://mariadb.com/kb/en/library/sequence-overview/#using-sequence-objects

      ReadWriteSplit does not currently seem to understand that this is something that needs to be routed to the master:

      2018-10-05 02:59:16   info   : (27442634) [readwritesplit] > Autocommit: [enabled], trx is [not open], cmd: (0x03) COM_QUERY, plen: 55, type: QUERY_TYPE_READ, stmt: SELECT MYSCHEMA.MY_DUMMY_SEQ_CACHED.NEXTVAL 
      2018-10-05 02:59:16   info   : (27442634) [readwritesplit] Route query to slave 	[10.1.1.107]:6603 <
      2018-10-05 02:59:16   info   : (27442634) [readwritesplit] Reply complete, last reply from node2
      

      Attachments

        Issue Links

          Activity

            People

              johan.wikman Johan Wikman
              GeoffMontee Geoff Montee (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.