[MCOL-4099] Function Insert not inserting. Created: 2020-06-24 Updated: 2020-09-21 Resolved: 2020-08-31 |
|
| Status: | Closed |
| Project: | MariaDB ColumnStore |
| Component/s: | PrimProc |
| Affects Version/s: | 1.5.2 |
| Fix Version/s: | 5.4.1 |
| Type: | Bug | Priority: | Major |
| Reporter: | David Hall (Inactive) | Assignee: | Daniel Lee (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Epic Link: | ColumnStore Compatibility Improvements | ||||||||
| Description |
|
the distributed Function Insert doesn't do anything if you ask to insert at position 1. It needs a simple switch of the lines that test for negative index and the one that converts the position from 1 based to 0 based. |
| Comments |
| Comment by Daniel Lee (Inactive) [ 2020-07-09 ] | ||||||||||||||||||||
|
Build verified: 1.5.3-1 (drone build #287) Reproduced the issue in 1.5.2-1 MariaDB [mytest]> create table t1 (c1 int, c2 char(20)) engine=columnstore; MariaDB [mytest]> insert into t1 values (50, 'Hawaii'); MariaDB [mytest]> select * from t1;
-----
----- MariaDB [mytest]> select c1, insert(c2,1,5,'aloha') from t1;
-----
----- Verified fix in 1.5.3-1 MariaDB [mytest]> create table t1 (c1 int, c2 char(20)) engine=columnstore; MariaDB [mytest]> insert into t1 values (50, 'Hawaii'); MariaDB [mytest]> select c1, insert(c2,1,5,'aloha') from t1;
-----
----- MariaDB [mytest]> select c1, insert(c2,1,3,'aloha') from t1;
-----
----- MariaDB [mytest]> select c1, insert(c2,2,3,'aloha') from t1;
-----
----- | ||||||||||||||||||||
| Comment by Daniel Lee (Inactive) [ 2020-07-10 ] | ||||||||||||||||||||
|
Restested in 1.5.3-1 (drone #280) It is also fixed in build #280 | ||||||||||||||||||||
| Comment by Gagan Goel (Inactive) [ 2020-08-28 ] | ||||||||||||||||||||
|
David.Hall Is there a test case that dleeyh can use for testing, that demonstrates the fix applied by the PR for this issue? | ||||||||||||||||||||
| Comment by Daniel Lee (Inactive) [ 2020-08-31 ] | ||||||||||||||||||||
|
Build verified: 1.5.4-1 (Drone #496) Additional tests: MariaDB [mytest]> select c1, insert(c2,-1,3,'aloha') from t1;
-----
----- MariaDB [mytest]> select c1, insert(c2,0,3,'aloha') from t1;
-----
----- MariaDB [mytest]> select c1, insert(c2,6,3,'aloha') from t1;
-----
----- MariaDB [mytest]> select c1, insert(c2,7,3,'aloha') from t1;
-----
----- | ||||||||||||||||||||
| Comment by David Hall (Inactive) [ 2020-08-31 ] | ||||||||||||||||||||
|
For 1.5.4, test for the last char in the field and last +1. select insert(c2,6,5,'aloha') from t1;
------------------------
------------------------ select insert(c2,7,5,'aloha') from t1;
------------------------
------------------------ |