[MXS-2498] MaxScale not routing TEMPORARY TABLE reading to MASTER Created: 2019-05-21  Updated: 2019-12-19  Resolved: 2019-12-18

Status: Closed
Project: MariaDB MaxScale
Component/s: Documentation, readwritesplit
Affects Version/s: 2.3.6
Fix Version/s: 2.4.5

Type: Bug Priority: Major
Reporter: Wagner Bianchi (Inactive) Assignee: markus makela
Resolution: Done Votes: 0
Labels: None


 Description   

Folks,

Below is what the customer is executing:

DROP TEMPORARY TABLE IF EXISTS ygcjdfiorq_rpb; 
 CREATE TEMPORARY TABLE ygcjdfiorq_rpb([...snip...]); 
 LOAD DATA INFILE '/tmp/ygcjdfiorq_rpb.csv' INTO TABLE ygcjdfiorq_rpb FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '\"' LINES TERMINATED BY '\n';

Right after that data load, a SELECT query is sent and even having MaxScale logging that "Multi-statement query or stored procedure call, routing all future queries to master.", right after data load reading, part of the same session/thread is sent to a slave, where the TEMPORARY TABLE can't be read and then, application throw an error.



 Comments   
Comment by markus makela [ 2019-07-04 ]

This can be solved by setting strict_multi_stmt=true but it prevents load balancing after any multi-statement queries. If the CREATE and LOAD DATA are done in separate queries, it should work without it.

Comment by markus makela [ 2019-12-18 ]

Documented this limitation for 2.4.6. This cannot be easily solved by readwritesplit as the parser currently doesn't support multi-statement queries.

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