[MDEV-32069] Event count option for mariadb-binlog? Created: 2023-09-01 Updated: 2023-09-12 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Minor |
| Reporter: | Gilles Reeves | Assignee: | Brandon Nesterenko |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | count, mariadb-binlog, option | ||
| Description |
|
I am trying to understand the use of mariadb-binlog as a tool for viewing or processing binary logs.
2. For ending:
The problem with these ending options is that it is almost impossible to pick the proper one for achieving the expected ending. There is an --offset option for starting after a given number of events from the beginning. Why isn't there a, for example, --count option, for getting a given number of events after the starting point, for example --count=100, and then stop, whatever was the chosen option for starting? I have to say that I am considering adding this option myself in the source code and re-compiling, as its implementation seems simple to achieve. But the problem is that this manipulation would have to be done again with each version update, which complicates things a little. Regards. P.S.: Sorry for choosing the "Task" category to post this. If you had a “Feature Request” category, I definitely would have selected that one. |
| Comments |
| Comment by Brandon Nesterenko [ 2023-09-01 ] |
|
Hi Gingko! Thanks for creating this ticket. Would you be willing to create a PR for the feature? We would welcome the contribution. Though, as you mention the relation with the LIMIT clause in SQL, perhaps for consistency we should name the new option --limit (or something similar). Thanks! |
| Comment by Gilles Reeves [ 2023-09-01 ] |
|
Hi Brandon. Thank you for your answer. Maybe I could create a PR, but ……… And for your information, --limit is actually the name that I finally chose for the compilation patch that I made, following the same idea as you, and it works perfectly, I must say (with -L — uppercase — for the short form). 10 lines added in the source code + comments. |
| Comment by Brandon Nesterenko [ 2023-09-01 ] |
|
Ah sorry, a *P*ull *R*equest And there is also this page with some more information on contributing code. if you're up for it, I'd be happy to share some similar patches that extended mariadb-binlog with new options that you can follow as examples. Glad we're on the same page about the naming convention |
| Comment by Gilles Reeves [ 2023-09-12 ] |
|
Hello, The main issue, there, is that I probably need to fully understand, first, the whole logic of Git and GitHub whereas I have been only used to use Subversion so far. This looks like a great deal of effort leading to nothing much, or « une montagne pour accoucher d'une souris » in French. But who knows … |