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

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Not a Bug
    • Affects Version/s: 2.2.13
    • Fix Version/s: N/A
    • Component/s: readwritesplit
    • Labels:
      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

              Assignee:
              johan.wikman Johan Wikman
              Reporter:
              GeoffMontee Geoff Montee
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Git Integration