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

PERIOD_ADD increment argument 32-bit wraparound

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Duplicate
    • 13.1
    • N/A
    • Optimizer
    • None
    • Not for Release Notes

    Description

      SELECT PERIOD_ADD(202601, 4294967296);   -- MariaDB: 202601 (2^32→+0 months, unchanged)
      SELECT PERIOD_ADD(202601, 4294967295);   -- MariaDB: 202512 (2^32-1→-1 month)
      SELECT PERIOD_ADD(202601, 4294967297);   -- MariaDB: 202602 (2^32+1→+1 month)
      -- MySQL: 35791596705 / 35791596704 / 35791596706 (computes without truncation)
      

      The following functiosn also hit the same issue:

      SELECT SUBSTRING_INDEX('a.b.c', '.', 4294967296);   -- MDB: ''(empty string!)  MY: 'a.b.c'
      SELECT SUBSTRING_INDEX('a.b.c', '.', 4294967295);   -- MDB: 'c'         MY: 'a.b.c'
      SELECT ELT(4294967297, 'a','b');   -- MDB: 'a' (2^32+11)   MY: NULL
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              chunlingqin chunlingqin
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

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