[MXS-2103] ReadWriteSplit, SELECT on fully qualified temporary table is wrongly routed to Slave Created: 2018-10-18  Updated: 2020-08-25  Resolved: 2018-10-18

Status: Closed
Project: MariaDB MaxScale
Component/s: readwritesplit
Affects Version/s: 2.2.13
Fix Version/s: 2.2.16

Type: Bug Priority: Critical
Reporter: Claudio Nanni Assignee: markus makela
Resolution: Fixed Votes: 0
Labels: 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]> 


Generated at Thu Feb 08 04:11:42 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.