Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Not a Bug
-
10.1.10
-
None
Description
Description:
Output:
===
mysql> drop table t1; create table t1(a year(4)); |
Query OK, 0 rows affected (0.00 sec) |
|
|
Query OK, 0 rows affected (0.01 sec) |
|
|
mysql> insert into t1 values (1930); |
Query OK, 1 row affected (0.00 sec) |
|
|
mysql> select a, a < 10 from t1; |
+------+--------+
|
| a | a < 10 | |
+------+--------+
|
| 1930 | 1 | |
+------+--------+
|
1 row in set (0.00 sec) |
|
|
mysql> select version();
|
+---------------------+
|
| version() |
|
+---------------------+
|
| 10.1.10-MariaDB-log | |
+---------------------+
|
1 row in set (0.00 sec) |
Problem:
===
"a < 10" is not reasonable.
It is expected to compare like ' a < 1910 '.
How to repeat:
drop table t1; create table t1(a year(4)); |
insert into t1 values (1930); |
select a, a < 10 from t1; |
Suggested fix:
"a < 10" returns 0.