Different types accepted by CAST() and COLUMN_CREATE()
Bug #778935 reported by
Philip Stoev
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MariaDB |
Confirmed
|
Low
|
Michael Widenius |
Bug Description
The dynamic columns documentation at
http://
provides a list of data types GET_COLUMN() accepts, as well as the note "Type here can be one of the same ones that you would use in CAST or CONVERT:". However, in practice, the allowed types for CAST and for GET_COLUMN are different and are different from what is specified in the dynamic columns manual.
GET_COLUMN() accepts DOUBLE while CAST does not
GET_COLUMN() does not accept SIGNED, UNSIGNED, BINARY and CHAR(N)
Changed in maria: | |
milestone: | none → 5.3 |
assignee: | nobody → Michael Widenius (monty) |
Changed in maria: | |
milestone: | 5.3 → 5.5 |
tags: | added: dyncol |
To post a comment you must log in.
select cast(1 as double) works in 5.3-mwl tree; It was added as part of this worklog. 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().
select column_
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) get(column_ create( 1, 2), 1 as unsigned) get(column_ create( 1, 2), 1 as CHAR(5)) get(column_ create( 1, 2), 1 as BINARY(5)); get(column_ create( 1, 2), 1 as BINARY)`
select column_
select column_
select column_
select column_
I have now updated the documentation about this.