[MDEV-24635] CONNECT Engine - Feature Request: Allow Connection=variable Created: 2021-01-20 Updated: 2022-10-03 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - Connect |
| Fix Version/s: | None |
| Type: | Task | Priority: | Minor |
| Reporter: | Ember Ludwig | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
It would be helpful to be able to use a variable for the Connection value when using the CONNECT Engine. I am trying to create a stored proc to create databases, but each table will reference a different DSN which is already defined. I cannot find a way to do this with a variable. I think I might be able do this by creating a string of sql and executing it, but I would prefer not to do that because of the issues with that and introducing that pattern into our app. This works: This does not work: Thank you for your consideration. |
| Comments |
| Comment by markus makela [ 2022-10-03 ] | |||||
|
A workaround to this is to use EXECUTE IMMEDIATE:
|