MariaDB Development
  1. MariaDB Development
  2. MDEV-4871

Temporal literals do not accept nanoseconds

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 10.0.4
    • Labels:
      None
    • Global Rank:
      3436

      Description

      MariaDB [test]> SELECT TIME'10:10:10.1234567';
      ERROR 1525 (HY000): Incorrect TIME value: '10:10:10.1234567'
      MariaDB [test]> SELECT TIMESTAMP'2001-01-01 10:10:10.1234567';
      ERROR 1525 (HY000): Incorrect DATETIME value: '2001-01-01 10:10:10.1234567'
      

      The expected result is to return a value with 6 fractional digits without errors.
      A "truncated" warning (or a note) is probably not necessary,
      because decimal numbers do not produce warnings/notes when precision is too high.

      The problem is repeatable even when 0 nanoseconds present:

      MariaDB [test]> SELECT TIME'10:10:10.1234560';
      ERROR 1525 (HY000): Incorrect TIME value: '10:10:10.1234560'
      

      This is a bug in MDEV-3838, should be fixed before the release.

        Activity

        Hide
        Alexander Barkov added a comment -

        Fixed in 10.0.4

        Show
        Alexander Barkov added a comment - Fixed in 10.0.4

          People

          • Assignee:
            Alexander Barkov
            Reporter:
            Alexander Barkov
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: