[MXS-2898] warning: The query can't be routed to all backend servers because it includes SELECT and SQL variable modifications which is not supported. Created: 2020-02-25 Updated: 2020-03-13 Resolved: 2020-03-04 |
|
| Status: | Closed |
| Project: | MariaDB MaxScale |
| Component/s: | qc_sqlite |
| Affects Version/s: | 2.4.4 |
| Fix Version/s: | 2.4.8 |
| Type: | Bug | Priority: | Major |
| Reporter: | Claudio Nanni | Assignee: | Johan Wikman |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Sprint: | MXS-SPRINT-101 |
| Description |
|
SET @my_id = (SELECT LAST_INSERT_ID()) Generates the warning in the subject. > 2020-02-24 15:04:00 warning: (162) The query can't be routed to all backend servers because it includes SELECT and SQL variable modifications which is not supported. Set use_sql_variables_in=master or split the query to two, where SQL variable modifications are done in the first and the SELECT in the second one. Looks like the SELECT queryi is not properly classified. |
| Comments |
| Comment by Johan Wikman [ 2020-03-03 ] | ||
|
The problem is caused by SET @my_id = (SELECT LAST_INSERT_ID()) being classified as
and not as
as SET @my_id = (SELECT @@LAST_INSERT_ID) is. |