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

Master & Relay Log Info: expand init_intvar_from_file from atoi to atoll

Details

    • Task
    • Status: Open (View Workflow)
    • Minor
    • Resolution: Unresolved
    • None
    • Replication
    • None

    Description

      MDEV-25674's Master_Retry_Count is an unsigned long, which is larger (in theory and Linux) than the int range of the info-reading API's init_intvar_from_file.

      Its PR currently parses the number from a string itself.
      For consistency and future-proofing, we should expand init_intvar_from_file's limit itself, at least to long long but ideally with an unsigned long long overload as well (as in MySQL's version).

      We must assess if this change impacts other numeric fields.
      It would be a positive impact if a previous field fell for this trap and was reading over-int values truncated or clamped, because that's a bug.

      Attachments

        Issue Links

          Activity

            Do you need Master_retry_count to be a long? Why we'd need any new variable to be long? It is the worst choice of a datatype

            wlad Vladislav Vaintroub added a comment - Do you need Master_retry_count to be a long? Why we'd need any new variable to be long? It is the worst choice of a datatype
            ParadoxV5 Jimmy Hú added a comment -

            wlad I need Master_Retry_Count to be a long to match --master-retry-count. And I completely agree that both of them shouldn’t be variable {{ulong}}s.
            That’s its own refactoring, though. This task is about making sure the info files are capable for larger-than-{{int}}s, be them {{long}}s or {{uint64_t}}s.

            ParadoxV5 Jimmy Hú added a comment - wlad I need Master_Retry_Count to be a long to match --master-retry-count . And I completely agree that both of them shouldn’t be variable {{ulong}}s. That’s its own refactoring, though. This task is about making sure the info files are capable for larger-than-{{int}}s, be them {{long}}s or {{uint64_t}}s.

            People

              Unassigned Unassigned
              ParadoxV5 Jimmy Hú
              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.