[MDEV-25660] New feature to remove all currently set user variables Created: 2021-05-12 Updated: 2022-06-17 Resolved: 2022-05-30 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Documentation, Information Schema, Variables |
| Affects Version/s: | N/A |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Minor |
| Reporter: | Markus Peter | Assignee: | Ian Gilfillan |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | feature_request | ||
| Issue Links: |
|
||||||||
| Description |
|
I suggest a new feature which would remove all user variables from the current thread again. It seems currently the only way to achieve that is a new connection. Syntax suggestion: "RESET USER VARIABLES" |
| Comments |
| Comment by Sergei Golubchik [ 2022-05-20 ] |
|
This was implemented in 10.2.0 in the USER_VARIABLES plugin. But RESET part isn't documented, this needs to be fixed. |
| Comment by Ian Gilfillan [ 2022-05-30 ] |
|
FLUSH USER_VARIABLES is what you are looking for, and this has now been documented in the appropriate locations. |
| Comment by Markus Peter [ 2022-05-31 ] |
|
Thank you. Just a nitpick: Not sure it should be part of "FLUSH" though, as this requires RELOAD rights. Deleting user variables shouldn't need more rights than actually setting them, this is non-sensical: MariaDB [(none)]> set @foo=1; MariaDB [(none)]> flush user_variables; |
| Comment by Sergei Golubchik [ 2022-06-17 ] |
|
You're right. To implement it we need to figure out how information_schema plugins can define what privileges FLUSH should require |