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

ENUM: Inconsistent results for IS TRUE test

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 10.1, 10.0
    • Fix Version/s: 10.1
    • Component/s: None
    • Labels:

      Description

      DROP TABLE IF EXISTS t1;
      CREATE TABLE t1 (a ENUM('0x'));
      INSERT INTO t1 VALUES ('0x');
      SELECT a IS TRUE AS a0, COALESCE(a) IS TRUE AS a1, LEAST(a,a) IS TRUE AS a2, (SELECT a FROM t1) IS TRUE AS a3 FROM t1;
      

      returns:

      +----+----+----+----+
      | a0 | a1 | a2 | a3 |
      +----+----+----+----+
      |  1 |  0 |  1 |  0 |
      +----+----+----+----+
      

      Expect to get the same result for all columns.

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            bar Alexander Barkov added a comment -

            Repeatable in MySQL-5.7.8

            Show
            bar Alexander Barkov added a comment - Repeatable in MySQL-5.7.8

              People

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

                Dates

                • Created:
                  Updated: