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

Selecting a time using a datetime fails

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 5.5.47, 10.0.23, 10.1.9, 5.3.13
    • Fix Version/s: 10.0, 10.1, 10.2
    • Component/s: Temporal Types
    • Labels:
    • Environment:
      Ver 15.1 Distrib 10.1.9-MariaDB, for osx10.11

      Description

      MariaDB seems to behave differently from other databases when selecting a time with a datetime. Maria requires truncating the date first, otherwise it returns the empty set. MySQL, Postgres, Sqlite, and SQL Server ignore the date and return rows matching the time portion.

      Here are the examples:

      https://gist.github.com/bronson/0a49e7d3fe7242cb5cd3 (thanks to litheum for this table)

      Monty says: what looks wrong at my end is that we are converting the string to this time: "838:49:59.99999" and then trying to compare that. This is stored in a Item_time_literal.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                bar Alexander Barkov
                Reporter:
                bronson Scott Bronson
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated: