[MCOL-1347] ALTER TABLE ADD COLUMN creates a column with incorrect width for a varchar columns. Created: 2018-04-18 Updated: 2019-03-06 Resolved: 2018-12-19 |
|
| Status: | Closed |
| Project: | MariaDB ColumnStore |
| Component/s: | PrimProc |
| Affects Version/s: | 1.1.6, 1.2.2 |
| Fix Version/s: | 1.1.7 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Roman | Assignee: | Daniel Lee (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Sprint: | 2018-21 | ||||||||
| Description |
|
There is a table used for ETL purposes, that is recreated on regular basis. Apr 12 10:12:12 dbusa ExeMgr[74153]: 12.510096 |1855|0|0| D 16 CAL0041: Start SQL statement: select * from dbusa.table limit 0, 1000; |dbusa| The problem presumably caused by a block saved by versioning but is absent in dbroot involved. |
| Comments |
| Comment by Roman [ 2018-12-06 ] | ||||||
|
To reproduce it first run the DDL statements: create table cs1(i bigint) engine=columnstore; After that one must insert > 8kk rows into the table. I have simple generator for the purpose so feel free to ask for it. There is a shortcut. Instead of populating the table with values just run: The width returned for the column must be 4 instead of 2 that is the correct value. | ||||||
| Comment by Roman [ 2018-12-06 ] | ||||||
|
Please review. | ||||||
| Comment by Andrew Hutchings (Inactive) [ 2018-12-10 ] | ||||||
|
The fix doesn't appear to work in all cases, more information in the PR | ||||||
| Comment by Andrew Hutchings (Inactive) [ 2018-12-10 ] | ||||||
|
Also can you please provide a test case in the regression suite? | ||||||
| Comment by Roman [ 2018-12-10 ] | ||||||
|
Please review the change. | ||||||
| Comment by Daniel Lee (Inactive) [ 2018-12-19 ] | ||||||
|
Build verified: 1.1.7-1 nightly MariaDB [mytest]> alter table cs1 add column v1 varchar(1); MariaDB [mytest]> select c.object_id,c.column_name,e.width from information_schema.columnstore_extents e, information_schema.columnstore_columns c where e.object_id = c.object_id and c.column_name = 'v1';
----------
---------- |