Description:
Output:
=======
mysql> drop table t1; create table t1(a year, b char(10));
Query OK, 0 rows affected (0.01 sec)
Query OK, 0 rows affected (0.02 sec)
mysql> insert into t1(a) values (0);
selQuery OK, 1 row affected (0.00 sec)
mysql> update t1 set b = a;
ect *, cast(a as char) from t1;
Query OK, 1 row affected (0.01 sec)
Rows matched: 1 Changed: 1 Warnings: 0
mysql> select *, cast(a as char) from t1;
+------+------+-----------------+
| a | b | cast(a as char) |
+------+------+-----------------+
| 0000 | 0 | 0000 |
+------+------+-----------------+
1 row in set (0.00 sec)
mysql> select version();
+-----------+
| version() |
+-----------+
| 5.7.8-rc |
+-----------+
1 row in set (0.00 sec)
Problem:
========
After "update t1 set b = a", column b and cast(a as char) are expected to return the same string.
How to repeat:
drop table t1; create table t1(a year, b char(10));
insert into t1(a) values (0);
update t1 set b = a;
select *, cast(a as char) from t1;
Suggested fix:
After "update t1 set b = a", column b and cast(a as char) are expected to return the same string.