Different types accepted by CAST() and COLUMN_CREATE()

Bug #778935 reported by Philip Stoev on 2011-05-07
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MariaDB
Confirmed
Low
Michael Widenius

Bug Description

The dynamic columns documentation at

http://kb.askmonty.org/v/dynamic-columns

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)
Michael Widenius (monty) wrote :

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.

Changed in maria:
status: New → Invalid
importance: Undecided → Low
Philip Stoev (pstoev-askmonty) wrote :

If there is a part that is "scheduled to be fixed", then this bug remains on the table.

summary: - Different types accepted by CAST() and COLUMN_GET()
+ Different types accepted by CAST() and COLUMN_CREATE()
Changed in maria:
status: Invalid → Confirmed
Michael Widenius (monty) on 2012-03-21
Changed in maria:
milestone: 5.3 → 5.5
Elena Stepanova (elenst) wrote :

Also filed in JIRA as MDEV-196

Elena Stepanova (elenst) on 2012-03-29
tags: added: dyncol
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers