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

LP:603750 - Problems with curdate()-1 function when is first day of the month

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Resolution: Not a Bug
    • None
    • None
    • None

    Description

      curdate() function is for get current date value, acording documentation when you use: curdate()-1 you will obtain yesterday date value, but when is the first day of the month (for example: July 1, 2010) you got a wrong value!, you will get July 0, 2010 in our example (20100700).

      To avoid this I use: from_unixtime(unix_timestamp(curdate()) - 86400)

      but I think that curdate()-1 function have to work fine every day and not only when curent day of the month is greater than 1

      I am using: 5.1.42-MariaDB-mariadb73 version
      and my operating system is: GNU/Linux Debian Lenny Kernel 2.6.26-2-686
      platform: i686

      Attachments

        Activity

          People

            Unassigned Unassigned
            pabloalejandromanyomavallejos Pablo Alejandro Manyoma Vallejos (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 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.