[MXS-2145] new options prequery_sql_file and connection_sql_file Created: 2018-11-06 Updated: 2020-08-25 Resolved: 2020-03-27 |
|
| Status: | Closed |
| Project: | MariaDB MaxScale |
| Component/s: | Core, mariadbbackend |
| Affects Version/s: | None |
| Fix Version/s: | 2.5.0 |
| Type: | New Feature | Priority: | Major |
| Reporter: | Richard Stracke | Assignee: | Esa Korhonen |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Epic Link: | Filter Improvements |
| Sprint: | MXS-SPRINT-98, MXS-SPRINT-99, MXS-SPRINT-100, MXS-SPRINT-101, MXS-SPRINT-102 |
| Description |
|
In some cases, it can be useful to execute some SQL statements at begin of the session or the query to set some session variables like autocommit, timeout, isolation_level etc. New common router options. prequery_sql_file=/home/root/scripts/prequery.sql |
| Comments |
| Comment by markus makela [ 2018-11-06 ] |
|
This could be implemented as a filter that injects a one-time SQL statement the first time a query is received. |
| Comment by Dipti Joshi (Inactive) [ 2018-11-08 ] |
|
markus makela, johan.wikman Can any of the existing filter be used to do so? or does this need to be done as listener parameter? |
| Comment by Johan Wikman [ 2018-11-09 ] |
|
Any existing filter could be modified to do this, but that does not seem like a good idea. A new filter called, say header, that, just like Markus writes above, would inject a one-time SQL statement the first time a query is received sounds like the right approach. |