[MDEV-7567] rename slow queries variables Created: 2015-02-09 Updated: 2023-03-21 Resolved: 2022-10-04 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | OTHER |
| Fix Version/s: | 10.11.1 |
| Type: | Task | Priority: | Critical |
| Reporter: | VAROQUI Stephane | Assignee: | Sergei Golubchik |
| Resolution: | Fixed | Votes: | 3 |
| Labels: | Preview_10.11, beginner-friendly | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Description |
|
This task is a proposal to introduce new variables |
| Comments |
| Comment by Michael Qin (Inactive) [ 2022-05-25 ] | ||||||||||||||||
|
The idea here seems to be to rename all variables relating to the slow query log such that they have the prefix "log_slow". The following is a list of variables I found to be related to the slow query log. The original variable names are on the left and the new aliases, if any, are on the right. log_queries_not_using_indexes - log_slow_queries_not_using_indexes | ||||||||||||||||
| Comment by Otto Kekäläinen [ 2022-07-19 ] | ||||||||||||||||
|
PR https://github.com/MariaDB/server/pull/2137 that implements this has been open since May 31st, 2022. | ||||||||||||||||
| Comment by Sergei Golubchik [ 2022-07-29 ] | ||||||||||||||||
|
This is generally a good idea. I'm a bit worried that we have no approach to dealing with aliases. I mean, new aliases are added, duplicates are left, "we'll solve it later, somehow". May be, something like
How does that sound? Note, this is not something that should be done in this MDEV, this is just a discussion | ||||||||||||||||
| Comment by Ian Gilfillan [ 2022-07-29 ] | ||||||||||||||||
|
Sounds good. For the --old suggestion, I presume you mean an --old-mode option? | ||||||||||||||||
| Comment by Sergei Golubchik [ 2022-07-31 ] | ||||||||||||||||
|
right. a new old-mode value, which I didn't bother to find a name for | ||||||||||||||||
| Comment by Michael Qin (Inactive) [ 2022-08-09 ] | ||||||||||||||||
|
I agree with the suggested approach for dealing with aliases, and can create a new ticket for it. The current PR for this ticket still needs a review. | ||||||||||||||||
| Comment by Sergei Golubchik [ 2022-08-11 ] | ||||||||||||||||
|
Why do you want an alias for an alias? --log-queries-not-using-indexes is already an alias for --log-slow-filter=not_using_index. I don't see why you need to create --log-slow-queries-not-using-indexes. | ||||||||||||||||
| Comment by Michael Qin (Inactive) [ 2022-08-18 ] | ||||||||||||||||
|
The idea for that alias and the new aliases in general is to add the prefix log_slow and eventually deprecate old ones like --log-queries-not-using-indexes | ||||||||||||||||
| Comment by Sergei Golubchik [ 2022-08-20 ] | ||||||||||||||||
|
I understand that. But *-queries-not-using-indexes is going to be eventually deprecated anyway, with any prefix. | ||||||||||||||||
| Comment by Sergei Golubchik [ 2022-09-07 ] | ||||||||||||||||
|
also, log_slow_query_enable would be the first variable using xxx_enable naming pattern. Wouldn't it be more consistent to name it just log_slow_query ? | ||||||||||||||||
| Comment by Sergei Golubchik [ 2022-09-20 ] | ||||||||||||||||
|
bb-10.11- | ||||||||||||||||
| Comment by Elena Stepanova [ 2022-09-21 ] | ||||||||||||||||
|
There was some back-and-forth in this task, so, to summarize, as of bb-10.11-
It remains unclear what was the role-model for log_slow_query_file_name. but I couldn't find any %_file_name (maybe somewhere in optional plugins, those I didn't check). So, maybe it should be just log_slow_query_file, like several existing _file's. Or even just log_slow_file, given the variable list
Filed as | ||||||||||||||||
| Comment by Elena Stepanova [ 2022-09-21 ] | ||||||||||||||||
|
There is an ambiguity in MDEV-29297 which, I think, may affect the approach to this task. | ||||||||||||||||
| Comment by Elena Stepanova [ 2022-09-25 ] | ||||||||||||||||
|
As of bb-10.11-
Please reassign it back to me when all planned fixes are in and the branch is rebased, I'd like to take a look at the resulting status before it's pushed into main. | ||||||||||||||||
| Comment by Elena Stepanova [ 2022-09-28 ] | ||||||||||||||||
|
As of 36b42630:
Please reassign it back to me when all planned fixes are in and the branch is rebased. | ||||||||||||||||
| Comment by Elena Stepanova [ 2022-10-03 ] | ||||||||||||||||
|
In my opinion bb-10.11- The final change is:
The new variables are already documented in the KB, with a minor error to fix |