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

mysqlbinlog --start-position isn't bigint

    Details

    • Type: Bug
    • Status: Confirmed
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 10.0.21
    • Fix Version/s: 10.1
    • Component/s: Scripts & Clients
    • Labels:
    • Environment:
      rhel6

      Description

      having 18G + binlogs probably isn't the best move however if mysqld supports them so should the client tools.

      # mysqlbinlog --start-position 18844480604 mysql-bin.000061
      Warning: option 'start-position': unsigned value 18844480604 adjusted to 4294967295
      
      
      # mysqlbinlog --version
      mysqlbinlog Ver 3.3 for Linux at x86_64
      
      # yum info MariaDB-client.x86_64
      
      Name        : MariaDB-client
      Arch        : x86_64
      Version     : 10.0.21
      Release     : 1.el6
      Size        : 49 M
      Repo        : installed
      From repo   : mariadb
      Summary     : MariaDB: a very fast and robust SQL database server
      URL         : http://mariadb.org
      License     : GPL
      Description : MariaDB: a very fast and robust SQL database server
      

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              elenst Elena Stepanova added a comment -

              Hi Daniel,
              Do you know whether it's already been filed upstream? If not, are you planning to do so?

              You must have a really huge transaction to have this binlog position, given that the max value for max_binlog_size is ~18 times less...

              Show
              elenst Elena Stepanova added a comment - Hi Daniel, Do you know whether it's already been filed upstream? If not, are you planning to do so? You must have a really huge transaction to have this binlog position, given that the max value for max_binlog_size is ~18 times less...
              Hide
              danblack Daniel Black added a comment -

              haven't looked upstream yet.

              log-slave-update and a start slave sql_thread until relay_log ....

              Seems the limit got exceeded

              | max_binlog_size                          | 104857600            |
              
              -rw-rw---- 1 mysql mysql   107362623 Aug 28 13:13 mysql-bin.000057
              -rw-rw---- 1 mysql mysql   104866589 Aug 28 13:13 mysql-bin.000058
              -rw-rw---- 1 mysql mysql   105813602 Aug 28 13:14 mysql-bin.000059
              -rw-rw---- 1 mysql mysql   105470582 Aug 28 13:14 mysql-bin.000060
              -rw-rw---- 1 mysql mysql 35721262759 Sep  3 12:30 mysql-bin.000061
              -rw-rw---- 1 mysql mysql        1952 Aug 28 13:14 mysql-bin.index
              
               mysql]# tail  mysql-bin.index
              /var/lib/mysql/mysql-bin.000052
              /var/lib/mysql/mysql-bin.000053
              /var/lib/mysql/mysql-bin.000054
              /var/lib/mysql/mysql-bin.000055
              /var/lib/mysql/mysql-bin.000056
              /var/lib/mysql/mysql-bin.000057
              /var/lib/mysql/mysql-bin.000058
              /var/lib/mysql/mysql-bin.000059
              /var/lib/mysql/mysql-bin.000060
              /var/lib/mysql/mysql-bin.000061
              
              Show
              danblack Daniel Black added a comment - haven't looked upstream yet. log-slave-update and a start slave sql_thread until relay_log .... Seems the limit got exceeded | max_binlog_size | 104857600 | -rw-rw---- 1 mysql mysql 107362623 Aug 28 13:13 mysql-bin.000057 -rw-rw---- 1 mysql mysql 104866589 Aug 28 13:13 mysql-bin.000058 -rw-rw---- 1 mysql mysql 105813602 Aug 28 13:14 mysql-bin.000059 -rw-rw---- 1 mysql mysql 105470582 Aug 28 13:14 mysql-bin.000060 -rw-rw---- 1 mysql mysql 35721262759 Sep 3 12:30 mysql-bin.000061 -rw-rw---- 1 mysql mysql 1952 Aug 28 13:14 mysql-bin.index mysql]# tail mysql-bin.index /var/lib/mysql/mysql-bin.000052 /var/lib/mysql/mysql-bin.000053 /var/lib/mysql/mysql-bin.000054 /var/lib/mysql/mysql-bin.000055 /var/lib/mysql/mysql-bin.000056 /var/lib/mysql/mysql-bin.000057 /var/lib/mysql/mysql-bin.000058 /var/lib/mysql/mysql-bin.000059 /var/lib/mysql/mysql-bin.000060 /var/lib/mysql/mysql-bin.000061
              Hide
              elenst Elena Stepanova added a comment -

              Is it possible that there was such a huge transaction?
              My point is, maybe we have a bug around max_binlog_size (regardless the initial mysqlbinlog issue).

              Show
              elenst Elena Stepanova added a comment - Is it possible that there was such a huge transaction? My point is, maybe we have a bug around max_binlog_size (regardless the initial mysqlbinlog issue).
              Hide
              danblack Daniel Black added a comment -

              no, it was mixed replication and lots of small transactions. Yes it looks like a max_binlog_size bug. start slave sql_thread until relay_log=.... is what was used on this node. I was replaying a few days of relay logs into galera as a replication slave as a test.

              Show
              danblack Daniel Black added a comment - no, it was mixed replication and lots of small transactions. Yes it looks like a max_binlog_size bug. start slave sql_thread until relay_log=.... is what was used on this node. I was replaying a few days of relay logs into galera as a replication slave as a test.
              Hide
              danblack Daniel Black added a comment -

              Elena Stepanova did you want a separate bug for the max_binlog_size being exceeded?

              Show
              danblack Daniel Black added a comment - Elena Stepanova did you want a separate bug for the max_binlog_size being exceeded?
              Hide
              elenst Elena Stepanova added a comment -

              Daniel Black, if you don't mind filing it, it would be nice, thanks. I was going to try to reproduce it, but I can easily get distracted and forget, with a separate bug it has much better chances.

              Show
              elenst Elena Stepanova added a comment - Daniel Black , if you don't mind filing it, it would be nice, thanks. I was going to try to reproduce it, but I can easily get distracted and forget, with a separate bug it has much better chances.
              Hide
              elenst Elena Stepanova added a comment -

              Back to the initial problem, apparently it's not mysqlbinlog-specific, but the protocol limitation (for COM_BINLOG_DUMP).
              It looks even worse with change master to...:

              MariaDB [test]> change master to master_log_pos = 4294967296, master_log_file='wheezy-64-bin.000001';
              Query OK, 0 rows affected (0.44 sec)
              
              MariaDB [test]> start slave;
              Query OK, 0 rows affected (0.00 sec)
              

              No warnings, no nothing, but

                              Last_IO_Error: Got fatal error 1236 from master when reading data from binary log: 'Client requested master to start replication from impossible position; the first event 'wheezy-64-bin.000001' at 0, the last event read from 'wheezy-64-bin.000001' at 4, the last b
              

              Note at 0. That's how master interpreted the request:

                                 13 Query     SELECT binlog_gtid_pos('wheezy-64-bin.000001',4294967296)
                                 13 Binlog Dump       Log: 'wheezy-64-bin.000001'  Pos: 0
              

              Compare:

              MariaDB [test]> change master to master_log_pos = 4294967295, master_log_file='wheezy-64-bin.000001';
              Query OK, 0 rows affected (0.33 sec)
              
              MariaDB [test]> start slave;
              Query OK, 0 rows affected (0.00 sec)
              
                              Last_IO_Error: Got fatal error 1236 from master when reading data from binary log: 'Client requested master to start replication from impossible position; the first event 'wheezy-64-bin.000001' at 4294967295, the last event read from 'wheezy-64-bin.000001' at 4, the last byte read from 'wheezy-64-bin.000001' at 4.'
              
                                 14 Query     SELECT binlog_gtid_pos('wheezy-64-bin.000001',4294967295)
                                 14 Binlog Dump       Log: 'wheezy-64-bin.000001'  Pos: 4294967295
              
              Show
              elenst Elena Stepanova added a comment - Back to the initial problem, apparently it's not mysqlbinlog-specific, but the protocol limitation (for COM_BINLOG_DUMP). It looks even worse with change master to... : MariaDB [test]> change master to master_log_pos = 4294967296, master_log_file='wheezy-64-bin.000001'; Query OK, 0 rows affected (0.44 sec) MariaDB [test]> start slave; Query OK, 0 rows affected (0.00 sec) No warnings, no nothing, but Last_IO_Error: Got fatal error 1236 from master when reading data from binary log: 'Client requested master to start replication from impossible position; the first event 'wheezy-64-bin.000001' at 0, the last event read from 'wheezy-64-bin.000001' at 4, the last b Note at 0 . That's how master interpreted the request: 13 Query SELECT binlog_gtid_pos('wheezy-64-bin.000001',4294967296) 13 Binlog Dump Log: 'wheezy-64-bin.000001' Pos: 0 Compare: MariaDB [test]> change master to master_log_pos = 4294967295, master_log_file='wheezy-64-bin.000001'; Query OK, 0 rows affected (0.33 sec) MariaDB [test]> start slave; Query OK, 0 rows affected (0.00 sec) Last_IO_Error: Got fatal error 1236 from master when reading data from binary log: 'Client requested master to start replication from impossible position; the first event 'wheezy-64-bin.000001' at 4294967295, the last event read from 'wheezy-64-bin.000001' at 4, the last byte read from 'wheezy-64-bin.000001' at 4.' 14 Query SELECT binlog_gtid_pos('wheezy-64-bin.000001',4294967295) 14 Binlog Dump Log: 'wheezy-64-bin.000001' Pos: 4294967295
              Hide
              elenst Elena Stepanova added a comment - - edited

              All in all, I suppose the fix might be quite intrusive.
              Also, I don't know if it makes any sense to re-report it upstream, most likely they'll suggest not to have such big binary logs...

              Show
              elenst Elena Stepanova added a comment - - edited All in all, I suppose the fix might be quite intrusive. Also, I don't know if it makes any sense to re-report it upstream, most likely they'll suggest not to have such big binary logs...

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  danblack Daniel Black
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated: