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

LP:731276 - NULLs returned from SUBTIME() are not properly handled in IN() context

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      Description

      Not repeatable in mysql-5.1. The following query:

      SELECT * FROM t1 WHERE f1 NOT IN ('00:08:08', SUBTIME( '0000-00-00 00:00:00' , '00:00:00' ));

      returns rows even though SUBTIME() returns NULL, which should make the entire NOT IN predicate NULL .

      Test case:

      CREATE TABLE t1 (f1 TIME);
      INSERT INTO t1 VALUES ('01:01:01');

      SELECT * FROM t1 WHERE f1 NOT IN ('00:08:08', SUBTIME( '0000-00-00 00:00:00' , '00:00:00' ));

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            serg Sergei Golubchik added a comment -

            Re: NULLs returned from SUBTIME() are not properly handled in IN() context
            it is MySQL bug http://bugs.mysql.com/bug.php?id=60400

            Show
            serg Sergei Golubchik added a comment - Re: NULLs returned from SUBTIME() are not properly handled in IN() context it is MySQL bug http://bugs.mysql.com/bug.php?id=60400
            Hide
            serg Sergei Golubchik added a comment -

            Re: NULLs returned from SUBTIME() are not properly handled in IN() context
            fixed upstream as http://bugs.mysql.com/bug.php?id=59270

            Show
            serg Sergei Golubchik added a comment - Re: NULLs returned from SUBTIME() are not properly handled in IN() context fixed upstream as http://bugs.mysql.com/bug.php?id=59270
            Hide
            ratzpo Rasmus Johansson added a comment -

            Launchpad bug id: 731276

            Show
            ratzpo Rasmus Johansson added a comment - Launchpad bug id: 731276

              People

              • Assignee:
                serg Sergei Golubchik
                Reporter:
                philipstoev Philip Stoev
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: