Comment 1 for bug 778935

Revision history for this message
Michael Widenius (monty) wrote : Re: Different types accepted by CAST() and COLUMN_GET()

select cast(1 as double) works in 5.3-mwl tree; It was added as part of this worklog.
select column_get(column_create(1, 2), 1 as signed) worked for me. All the other versions should also work as the parsing code in sql_yacc.yy is identical for CAST and COLUMN_GET().
COLUMN_CREATE is still 'different' but is scheduled to be fixed.

I tested the following commands and they worked correctly in 5.3-mwl:

column_get(column_create(1, 2), 1 as signed)
select column_get(column_create(1, 2), 1 as unsigned)
select column_get(column_create(1, 2), 1 as CHAR(5))
select column_get(column_create(1, 2), 1 as BINARY(5));
select column_get(column_create(1, 2), 1 as BINARY)`

I have now updated the documentation about this.