[MDEV-6179] dynamic columns functions/cast()/convert() doesn't play nice with CREATE/ALTER TABLE Created: 2014-04-26 Updated: 2014-11-19 Resolved: 2014-11-19 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Dynamic Columns, Virtual Columns |
| Affects Version/s: | 5.2.14, 5.3.12, 5.5.40, 10.0.10, 10.1.1 |
| Fix Version/s: | 5.5.41, 10.0.15 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Kolbe Kegel (Inactive) | Assignee: | Sergei Golubchik |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
I thought it would be neat to combine dynamic columns and virtual columns, but it isn't going so well.
It seems that it ignores the char(32) that I specify and instead uses char(0), thus truncating everything it tries to enter into the column.
|
| Comments |
| Comment by Elena Stepanova [ 2014-04-26 ] | ||||||||||||
|
If it's really not supported, it would be safer to produce an error, and it should also be documented. I'm not sure whether it's a vcol issue or dyncol issue, assigned to Igor assuming it's the former. Please reassign as needed. | ||||||||||||
| Comment by Kolbe Kegel (Inactive) [ 2014-04-26 ] | ||||||||||||
|
I think it's quite important to support this operation. This is an important piece of the NoSQL puzzle in MariaDB, IMO. Note that this "works" if you use a column of type TEXT, instead. | ||||||||||||
| Comment by Oleksandr Byelkin [ 2014-06-14 ] | ||||||||||||
|
It looks like new alter table ignore that the field is virtual and trying to put real data in it. | ||||||||||||
| Comment by Kolbe Kegel (Inactive) [ 2014-10-02 ] | ||||||||||||
|
Is there any progress on this issue? | ||||||||||||
| Comment by Oleksandr Byelkin [ 2014-10-31 ] | ||||||||||||
|
The test suite for 5.5: create table assets ( select item_name, color from assets; drop table assets; | ||||||||||||
| Comment by Oleksandr Byelkin [ 2014-10-31 ] | ||||||||||||
|
The real problem is in the parser. CREATE TABLE and COLUMN_GET uses both the same global variables for parsing types (lex->length, lex->dec, lex->type) | ||||||||||||
| Comment by Oleksandr Byelkin [ 2014-11-02 ] | ||||||||||||
|
It was not COLUMN_GET but | ||||||||||||
| Comment by Oleksandr Byelkin [ 2014-11-02 ] | ||||||||||||
|
and cast type is from COLUMN_GET | ||||||||||||
| Comment by Oleksandr Byelkin [ 2014-11-02 ] | ||||||||||||
|
The problem is older then it seemd to be:
| ||||||||||||
| Comment by Oleksandr Byelkin [ 2014-11-02 ] | ||||||||||||
|
commited for review | ||||||||||||
| Comment by Oleksandr Byelkin [ 2014-11-02 ] | ||||||||||||
|
I think it is possible to reproduce the bug on earlier version if play with CONVERT/CAST recursive functions but I doubts in practical sens of it... | ||||||||||||
| Comment by Oleksandr Byelkin [ 2014-11-11 ] | ||||||||||||
|
Your patch will go to the tree so I assign it to you. |