[MCOL-895] INSERT after ALTER TABLE can corrupt HWM Created: 2017-08-29 Updated: 2020-08-25 Resolved: 2017-10-25 |
|
| Status: | Closed |
| Project: | MariaDB ColumnStore |
| Component/s: | None |
| Affects Version/s: | 1.0.10, 1.1.0 |
| Fix Version/s: | 1.0.12, 1.1.1 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Andrew Hutchings (Inactive) | Assignee: | Daniel Lee (Inactive) |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | relnote | ||
| Sprint: | 2017-18, 2017-19, 2017-20, 2017-21 |
| Description |
|
This is the test case:
The last insert will error because the previous insert (which is in a transaction to use DMLProc instead of cpimport) has corrupted the HWMs. This is the resulting HWMs (the 4 byte HWMs should match):
|
| Comments |
| Comment by Andrew Hutchings (Inactive) [ 2017-09-19 ] |
|
Problem is the columnRIDs call for the system catalog is returning columns in the wrong order. Whereas WriteEngine assumes it has got them in the position order which means it adds the HWM additions to the wrong columns. |
| Comment by Andrew Hutchings (Inactive) [ 2017-09-20 ] |
|
Pull requests for 1.0, 1.1 and 1.2 develop trees For QA: see the description for a test case. Without the bug fix after the "commit" you will see scrambled HWMs in information_schema.columnstore_extents and information_schema.columnstore_columns has the columns out of position sequence. All will work as normal after the bug fix. |
| Comment by Daniel Lee (Inactive) [ 2017-10-24 ] |
|
Build verified: Github source for 1.1.1-1 /root/columnstore/mariadb-columnstore-server Merge pull request #72 from mariadb-corporation/ /root/columnstore/mariadb-columnstore-server/mariadb-columnstore-engine removed duplicaue entries Verified the test case in the ticket description. Additional notes for the ticket: original table schema is: create table c1 (a int, b bigint, c tinyint, d int) engine=columnstore; After the alter table, dropping c and adding c again with bigint data type, the table schema is as the following: a int, b bigint, d int, c bigint HWM wise, a and d should be the same, b and c should also be the same. In the ticket description, HWM in row 3 should be the same as in row 1, which is 67. Instead, it has the value of 119. After the fix, HWMs match now. |
| Comment by Daniel Lee (Inactive) [ 2017-10-25 ] |
|
Build verified: Github source for 1.0.12-1 /root/columnstore/mariadb-columnstore-server Merge pull request #69 from mariadb-corporation/ /root/columnstore/mariadb-columnstore-server/mariadb-columnstore-engine Merge pull request #300 from mariadb-corporation/ Verified with same tests |