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

Query empty when in subquery field has null

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Not a Bug
    • 10.3.8
    • N/A
    • Server
    • None
    • Ubuntu 18.04

    Description

      SET NAMES utf8;
      SET time_zone = '+00:00';
      SET foreign_key_checks = 0;
      SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
       
      DROP TABLE IF EXISTS `a1`;
      CREATE TABLE `a1` (
        `year` smallint(5) unsigned DEFAULT NULL
      ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
       
      INSERT INTO `a1` (`year`) VALUES
      (2014), (2015), (2016), (2017), (NULL);
       
      DROP TABLE IF EXISTS `a2`;
      CREATE TABLE `a2` (
        `year` smallint(5) unsigned NOT NULL
      ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
       
      INSERT INTO `a2` (`year`) VALUES
      (2014), (2015), (2016), (2017), (2018);
       
      SELECT * FROM `a2`
      WHERE year NOT IN (SELECT year FROM a1);
      
      

      Result is empty. Waiting "2018".

      Attachments

        Activity

          People

            Unassigned Unassigned
            alekseymvt Aleksey M.
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.