[MCOL-1390] SUBSTRING_INDEX returns NULL when the number parameter is negative Created: 2018-05-04  Updated: 2018-05-22  Resolved: 2018-05-22

Status: Closed
Project: MariaDB ColumnStore
Component/s: ExeMgr
Affects Version/s: 1.1.4
Fix Version/s: 1.1.5

Type: Bug Priority: Major
Reporter: Daniel Lee (Inactive) Assignee: Daniel Lee (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Epic Link: ColumnStore Compatibility Improvements
Sprint: 2018-10, 2018-11

 Description   

Build tested: 1.1.4-1

Reference:

select cidx, CCHAR1, SUBSTRING_INDEX(CCHAR1,'a',-3) from datatypetestm order by cidx

cidx CCHAR1 SUBSTRING_INDEX(CCHAR1,'a',-3)
1 a a

ColumnStore

select cidx, CCHAR1, SUBSTRING_INDEX(CCHAR1,'a',-3) from datatypetestm order by cidx
cidx CCHAR1 SUBSTRING_INDEX(CCHAR1,'a',-3)
1 a NULL



 Comments   
Comment by Andrew Hutchings (Inactive) [ 2018-05-10 ]

Pull request for engine and regression suite (to fix the SUBSTRING_INDEX test results)

Comment by Daniel Lee (Inactive) [ 2018-05-22 ]

Build verified: 1.1.5-1 source

[root@localhost ~]# cat mariadb-columnstore-1.1.5-1-centos7.x86_64.bin.tar.gz.txt
/root/columnstore/mariadb-columnstore-server
commit 0c983bff02172849a174dde46b62d76aa66485f8
Merge: 6b8a674 d5e6d89
Author: benthompson15 <ben.thompson@mariadb.com>
Date: Thu Apr 26 16:16:51 2018 -0500

Merge pull request #112 from mariadb-corporation/davidhilldallas-patch-3

update to 1.1.5

/root/columnstore/mariadb-columnstore-server/mariadb-columnstore-engine
commit 1ea5198e0e9ecc2a8d13e6b44bf6c632f8561199
Merge: 4533116 59858aa
Author: Andrew Hutchings <andrew@linuxjedi.co.uk>
Date: Fri May 18 12:37:47 2018 +0100

Merge pull request #475 from drrtuy/MCOL-1415

MCOL-1415

Reproduced issue in 1.1.4-1 and verified fix.

MariaDB [mytest]> create table t1 (idx int, cchar1 char(1)) engine=columnstore;
Query OK, 0 rows affected (0.12 sec)

MariaDB [mytest]> insert into t1 values (1,'a');
Query OK, 1 row affected (0.14 sec)

MariaDB [mytest]> select idx, cchar1, substring_index(cchar1, 'a', -3) from t1;
--------------------------------------------

idx cchar1 substring_index(cchar1, 'a', -3)

--------------------------------------------

1 a a

--------------------------------------------
1 row in set (0.04 sec)

Generated at Thu Feb 08 02:28:23 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.