[MDEV-8879] ENUM: Inconsistent results for IS TRUE test Created: 2015-10-02  Updated: 2023-04-27

Status: Open
Project: MariaDB Server
Component/s: Data types
Affects Version/s: 10.0, 10.1, 10.2, 10.3, 10.4, 10.5, 10.6, 10.7, 10.8, 10.9, 10.10
Fix Version/s: 10.4

Type: Bug Priority: Major
Reporter: Alexander Barkov Assignee: Alexander Barkov
Resolution: Unresolved Votes: 0
Labels: upstream


 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.



 Comments   
Comment by Alexander Barkov [ 2015-10-02 ]

Repeatable in MySQL-5.7.8

Generated at Thu Feb 08 07:30:28 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.