Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
2.1.3
-
None
-
2017-42
Description
MaxScale's ReadWriteSplit router is not smart enough to assume that stored procedure call may modify a user variable. If we have a procedure, p1, defined like this:
delimiter //
|
create procedure p1(OUT p_id int(11) unsigned)
|
MODIFIES SQL DATA
|
BEGIN
|
...
|
SET p_id = some_value; -- last_insert_id(), for example
|
END//
|
then for the following sequence of statements:
SET @id = NULL;
|
CALL p1(@id);
|
SELECT @id;
|
we may still get NULL from the last statement, even if the value is changed inside the procedure and this is clear when we connect to master directly.
MaxScale should be smarter and either assume that any procedure call may change data, including user variables, or parse the definition of the procedure called to check if this is the case, before decide what node to route queries to.
Attachments
Issue Links
- duplicates
-
MDEV-26788 Does Maxscale 6.1.3 prevent the reassembly of user variables?
- Closed