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

ReadWriteSplit, SELECT on fully qualified temporary table is wrongly routed to Slave

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • 2.2.13
    • 2.2.16
    • readwritesplit
    • None

    Description

      ## the service to talk to the servers.
      [MDB-Service]
      type=service
      router=readwritesplit
      servers=sw-db1,sw-db2
      user=maxuser
      passwd=maxpwd
      #filters=duplicator
      max_slave_replication_lag=1
      

      Using fully qualified table names:

      MySQL [(none)]> CREATE TEMPORARY TABLE temp.dummy5 (dum INT);
      Query OK, 0 rows affected (0.00 sec)
       
      MySQL [(none)]> INSERT INTO temp.dummy5 VALUES(1),(2);
      Query OK, 2 rows affected (0.00 sec)
      Records: 2  Duplicates: 0  Warnings: 0
       
      MySQL [(none)]> SELECT * FROM temp.dummy5;
      ERROR 1146 (42S02): Table 'temp.dummy5' doesn't exist
      MySQL [(none)]> 
      

      Not using fully qualified table names:

      MySQL [temp]> CREATE TEMPORARY TABLE dummy5 (dum INT);
      ERROR 1050 (42S01): Table 'dummy5' already exists
      MySQL [temp]> CREATE TEMPORARY TABLE dummy6 (dum INT);
      Query OK, 0 rows affected (0.01 sec)
      MySQL [temp]> INSERT INTO dummy6 VALUES(1),(2);
      Query OK, 2 rows affected (0.00 sec)
      Records: 2  Duplicates: 0  Warnings: 0
      MySQL [temp]> SELECT * FROM dummy6;
      +------+
      | dum  |
      +------+
      |    1 |
      |    2 |
      +------+
      2 rows in set (0.00 sec)
      

      And for confirmation:

      MySQL [temp]> SELECT * FROM temp.dummy6;
      ERROR 1146 (42S02): Table 'temp.dummy6' doesn't exist
      MySQL [temp]> 
      

      Attachments

        Activity

          People

            markus makela markus makela
            claudio.nanni Claudio Nanni
            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.