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

Wrong result of: WHERE inet6_column IN ('','::1')

    XMLWordPrintable

Details

    Description

      This script erroneously treats '' as a correct INET6 value of '::' and returns one row:

      CREATE OR REPLACE TABLE t1 (a INET6);
      INSERT INTO t1 VALUES ('::');
      SELECT * FROM t1 WHERE a IN ('','::1');
      

      +------+
      | a    |
      +------+
      | ::   |
      +------+
      1 row in set, 1 warning (0.000 sec)
      

      The comparison operator works as expected on the contrary:

      SELECT * FROM t1 WHERE a='';
      

      Empty set, 2 warnings (0.001 sec)
      

      Attachments

        Issue Links

          Activity

            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.