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

Microseconds: In time functions precision is calculated modulo 256

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 5.5.25, 5.3.7
    • Fix Version/s: 5.5.27, 5.3.9
    • Component/s: None
    • Labels:
      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

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

              Dates

              Created:
              Updated:
              Resolved: