Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-32069

Event count option for mariadb-binlog?

    XMLWordPrintable

Details

    Description

      I am trying to understand the use of mariadb-binlog as a tool for viewing or processing binary logs.
      I think that most of the time when you use such tool, it is for viewing or getting log events between a start point and an end point.
      So, for that, you have options:
      1. For starting:

      • --start-position, for starting at a numeric position, or a GTID list;
      • --start-datetime, for starting at a given timestamp;
      • --offset for skipping a given number of entries in the log.

      2. For ending:

      • --stop-position, for ending at a numeric position, or a GTID list;
      • --stop-datetime, for ending at a given timestamp.

      The problem with these ending options is that it is almost impossible to pick the proper one for achieving the expected ending.
      Especially when you started with a GTID list: how to guess a GTID list reasonably close in the future from the starting one for not getting a too long list of events?
      -xxxx-datetime is not a proper choice either. With both start and end, how to choose the correct one?

      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?
      A little like the LIMIT option in SQL queries.
      This would make the usage of this tool tremendously simpler.

      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.

      Attachments

        Activity

          People

            bnestere Brandon Nesterenko
            Gingko Gilles Reeves
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.