Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.5(EOL)
-
None
Description
I'm not sure if this is expected, but it seems at least counterintuitive to me:
Reproduce
create table t (c1 bit, c2 long as (c1) virtual); |
insert into t values (1, default); |
select cast(c1 as unsigned) c1, c2 from t; |
select cast(c1 as unsigned) c1, 0 + c2 from t; |
drop table t; |
Result
create table t (c1 bit, c2 long as (c1) virtual); |
insert into t values (1, default); |
select cast(c1 as unsigned) c1, c2 from t; |
c1 c2
|
1
|
select cast(c1 as unsigned) c1, 0 + c2 from t; |
c1 0 + c2
|
1 0
|
Warnings:
|
Warning 1292 Truncated incorrect DOUBLE value: '\0001' |
drop table t; |
Expected
select cast(c1 as unsigned) c1, c2 from t; |
c1 c2
|
1 1
|
select cast(c1 as unsigned) c1, 0 + c2 from t; |
c1 0 + c2
|
1 1
|