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

The yearweek() and week() functions return a wrong value

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Not a Bug
    • 5.5.33a
    • N/A
    • Temporal Types
    • Linux

    Description

      select yearweek('2014-02-25') - returns 201408 instead of 201409
      select week('2014-02-25') - returns 8 instead of 9

      It seems to be caused by incorrectly using week 201253 instead of week 201301. All dates I have tried after this week report one week too low.

      select yearweek('2012-12-31') - returns 201253 instead of 201301

      We report weekly statistics and now just discovered that all of 2013 and 2014 are one week off. Using Microsoft SQL we get the correct week numbers, but that's not an option right now.

      Attachments

        Activity

          People

            Unassigned Unassigned
            leifinge Leif Inge Sandberg
            Votes:
            0 Vote for this issue
            Watchers:
            4 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.