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

Microseconds: In time functions precision is calculated modulo 256

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Trivial
    • Resolution: Fixed
    • 5.5.25, 5.3.7
    • 5.5.27, 5.3.9
    • None
    • None

    Description

      SELECT NOW(257);
      +-----------------------+
      | NOW(257)              |
      +-----------------------+
      | 2012-08-07 04:07:25.8 |
      +-----------------------+
      1 row in set (0.01 sec)

      Works the same way in MySQL 5.6. It seems harmless, just somewhat embarrassing, so unless it's a cool feature, maybe it makes sense to fix it some day.

      With columns it's different though:

      CREATE TABLE t (a DATETIME(257));
      ERROR 1426 (42000): Too big precision 257 specified for 'a'. Maximum is 6.

      Attachments

        Activity

          People

            serg Sergei Golubchik
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0d
                0d
                Logged:
                Time Spent - 3.75d
                3.75d

                Git Integration

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