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

Temporal literals do not accept nanoseconds

Details

    • Bug
    • Status: Closed (View Workflow)
    • Blocker
    • Resolution: Fixed
    • None
    • 10.0.4
    • None
    • None

    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.

      Attachments

        Activity

          bar Alexander Barkov created issue -
          bar Alexander Barkov made changes -
          Field Original Value New Value
          Description {code}
          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'
          {code}

          The expected result to return a value with 6 fractional digits without errors.
          {code}
          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'
          {code}

          The expected result to return a value with 6 fractional digits without errors.
          A "truncated" warning should be fine.

          bar Alexander Barkov made changes -
          Priority Minor [ 4 ] Blocker [ 1 ]
          bar Alexander Barkov made changes -
          Description {code}
          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'
          {code}

          The expected result to return a value with 6 fractional digits without errors.
          A "truncated" warning should be fine.

          {code}
          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'
          {code}

          The expected result to return a value with 6 fractional digits without errors.
          A "truncated" warning should be fine.

          This is a bug in MDEV-3838, should be fixed before the release.
          serg Sergei Golubchik made changes -
          Fix Version/s 10.0.4 [ 13101 ]
          bar Alexander Barkov made changes -
          Description {code}
          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'
          {code}

          The expected result to return a value with 6 fractional digits without errors.
          A "truncated" warning should be fine.

          This is a bug in MDEV-3838, should be fixed before the release.
          {code}
          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'
          {code}

          The expected result to return a value with 6 fractional digits without errors.
          A "truncated" warning should be fine.

          The problem is repeatable even when 0 nanoseconds present:
          {code}
          MariaDB [test]> SELECT TIME'10:10:10.1234560';
          ERROR 1525 (HY000): Incorrect TIME value: '10:10:10.1234560'
          {code}


          This is a bug in MDEV-3838, should be fixed before the release.
          bar Alexander Barkov made changes -
          Description {code}
          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'
          {code}

          The expected result to return a value with 6 fractional digits without errors.
          A "truncated" warning should be fine.

          The problem is repeatable even when 0 nanoseconds present:
          {code}
          MariaDB [test]> SELECT TIME'10:10:10.1234560';
          ERROR 1525 (HY000): Incorrect TIME value: '10:10:10.1234560'
          {code}


          This is a bug in MDEV-3838, should be fixed before the release.
          {code}
          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'
          {code}

          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:
          {code}
          MariaDB [test]> SELECT TIME'10:10:10.1234560';
          ERROR 1525 (HY000): Incorrect TIME value: '10:10:10.1234560'
          {code}


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

          Fixed in 10.0.4

          bar Alexander Barkov added a comment - Fixed in 10.0.4
          bar Alexander Barkov made changes -
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Closed [ 6 ]
          serg Sergei Golubchik made changes -
          Workflow defaullt [ 28360 ] MariaDB v2 [ 44410 ]
          ratzpo Rasmus Johansson (Inactive) made changes -
          Workflow MariaDB v2 [ 44410 ] MariaDB v3 [ 63754 ]
          serg Sergei Golubchik made changes -
          Workflow MariaDB v3 [ 63754 ] MariaDB v4 [ 146926 ]

          People

            bar Alexander Barkov
            bar Alexander Barkov
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.