Uploaded image for project: 'MariaDB ColumnStore'
  1. MariaDB ColumnStore
  2. MCOL-1390

SUBSTRING_INDEX returns NULL when the number parameter is negative

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 1.1.4
    • 1.1.5
    • ExeMgr
    • None

    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

      Attachments

        Activity

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

          LinuxJedi Andrew Hutchings (Inactive) added a comment - Pull request for engine and regression suite (to fix the SUBSTRING_INDEX test results)

          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)

          dleeyh Daniel Lee (Inactive) added a comment - 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)

          People

            dleeyh Daniel Lee (Inactive)
            dleeyh Daniel Lee (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.