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

No warnings on inet6_field_pkey=varchar_field

    XMLWordPrintable

Details

    Description

      I run this script:

      DROP TABLE IF EXISTS t1,t2;
      CREATE TABLE t1 (i INET6 PRIMARY KEY) ENGINE=MyISAM;
      CREATE TABLE t2 (a VARCHAR(40)) ENGINE=MyISAM;
      INSERT INTO t1 VALUES ('::'),('ffff::ffff');
      INSERT INTO t2 VALUES ('garbage1'),('garbage2');
      SELECT * FROM t1 JOIN t2 ON (i = a);
      

      It correctly returns empty set, but without any warning.
      The expected behaviour would be to return warnings, like in this query:

      SELECT * FROM t1 WHERE i='garbage1';
      SHOW WARNINGS;
      

      +---------+------+-----------------------------------+
      | Level   | Code | Message                           |
      +---------+------+-----------------------------------+
      | Warning | 1292 | Incorrect inet6 value: 'garbage1' |
      | Warning | 1292 | Incorrect inet6 value: 'garbage1' |
      +---------+------+-----------------------------------+
      

      Attachments

        Activity

          People

            bar Alexander Barkov
            bar Alexander Barkov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.