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

mariadb-binlog ignores a --stop-datetime of exactly the max timestamp on Windows

    XMLWordPrintable

Details

    Description

      On Windows, 11.4 takes a --stop-datetime that converts to exactly TIMESTAMP_MAX_VALUE as if the option wasn't given at all:

      mariadb-binlog --stop-datetime='2038-01-19 03:14:07' master-bin.000001    # in UTC
      

      Linux prints "WARNING: Did not reach stop datetime '2038-01-19 03:14:07' before end of input", Windows prints nothing.

      In 11.4 an unset stop_datetime is MY_TIME_T_MAX (LONG_MAX), checked with stop_datetime != MY_TIME_T_MAX. long is 32-bit on Windows, so LONG_MAX == INT_MAX32 == TIMESTAMP_MAX_VALUE, which is a valid timestamp.

      11.5+ isn't affected, since MDEV-33239 replaced the magic value with a stop_datetime_given flag.

      Since MDEV-40294, over-max values are clamped to TIMESTAMP_MAX_VALUE, so they hit this too. That's how it showed up in the Windows CI of PR #5983; its test works around it with --replace_regex for now.

      Attachments

        Issue Links

          Activity

            People

              shipjain Shipra Jain
              zeyad_zahran Zeyad Zahran
              Jimmy Hú Jimmy Hú
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - Not Specified
                  Not Specified
                  Logged:
                  Time Spent - 10m
                  10m

                  Git Integration

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