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

Wrong result for TIME('+100:20:30')

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.0, 10.1, 10.2, 10.3, 10.4
    • 10.4.0
    • Temporal Types
    • None

    Description

      SELECT TIME('+100:20:30');
      

      +--------------------+
      | TIME('+100:20:30') |
      +--------------------+
      | 00:00:00           |
      +--------------------+
      1 row in set, 1 warning (0.00 sec)
      

      Looks wrong. The expected result is '100:20:30'.

      The literal plays a role of an interval string here:

      <interval string>    ::=   <quote> <unquoted interval string> <quote>
      <unquoted interval string>    ::=   [ <sign> ] { <year-month literal> | <day-time literal> } 
      <sign>    ::=   <plus sign> | <minus sign>
      

      So it should understand both - and +

      Attachments

        Issue Links

          Activity

            People

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