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

Built In SQL Functions not working with sql_mode=ORACLE

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • None
    • 5.6.1
    • None
    • None
    • 2021-3, 2021-4, 2021-5, 2021-6, 2021-7

    Description

      Some basic sql functions such as:

      TRIM
      CONCAT
      REPLACE
      ENCODE
      DECODE

      are not working in ColumnStore when the server is set to sql_mode=Oracle

      MariaDB [(none)]> create database tests;
      Query OK, 1 row affected (0.001 sec)
       
      MariaDB [(none)]> use tests;
      Database changed
       
      MariaDB [tests]> create table foo (id INT, myname varchar(30))engine = innodb;
      Query OK, 0 rows affected (0.012 sec)
       
      MariaDB [tests]> create table bar (id INT, myname varchar(30))engine = columnstore;
      Query OK, 0 rows affected (0.285 sec)
       
      MariaDB [tests]> INSERT INTO foo VALUES (1,'Monty Widenius');
      Query OK, 1 row affected (0.003 sec)
       
      MariaDB [tests]> INSERT INTO bar VALUES (1,'Monty Widenius');
      Query OK, 1 row affected (15.549 sec)
       
      MariaDB [tests]> SET SESSION sql_mode=ORACLE;
      Query OK, 0 rows affected (0.000 sec)
       
      MariaDB [tests]> SELECT CONCAT(id,myname) FROM foo;
      +-------------------+
      | CONCAT(id,myname) |
      +-------------------+
      | 1Monty Widenius     |
      +-------------------+
      1 row in set (0.001 sec)
       
      MariaDB [tests]> SELECT CONCAT(id,myname) FROM bar;
      +-------------------+
      | CONCAT(id,myname) |
      +-------------------+
      | 1                 |
      +-------------------+
      1 row in set (0.073 sec)
      

      Attachments

        Issue Links

          Activity

            toddstoffel Todd Stoffel (Inactive) created issue -
            toddstoffel Todd Stoffel (Inactive) made changes -
            Field Original Value New Value
            Description Some basic sql functions such as:

            TRIM
            CONCAT
            REPLACE
            DECODE

            are not working in ColumnStore when the server is set to sql_mode=Oracle


            {code:java}
            MariaDB [(none)]> create database tests
                -> ;
            Query OK, 1 row affected (0.001 sec)

            MariaDB [(none)]> use tests;
            Database changed
            MariaDB [tests]> create table foo (id INT, myname varchar(30))engine = innodb;
            Query OK, 0 rows affected (0.012 sec)

            MariaDB [tests]> create table bar (id INT, myname varchar(30))engine = columnstore;
            Query OK, 0 rows affected (0.285 sec)

            MariaDB [tests]> INSERT INTO foo VALUES (1,'Monty Widenius');
            Query OK, 1 row affected (0.003 sec)

            MariaDB [tests]> INSERT INTO bar VALUES (1,'Monty Widenius');
            Query OK, 1 row affected (15.549 sec)

            MariaDB [tests]> SET SESSION sql_mode=ORACLE;
            Query OK, 0 rows affected (0.000 sec)

            MariaDB [tests]> SELECT CONCAT(id,myname) FROM foo;
            +-------------------+
            | CONCAT(id,myname) |
            +-------------------+
            | 1Monty Widenius |
            +-------------------+
            1 row in set (0.001 sec)

            MariaDB [tests]> SELECT CONCAT(id,myname) FROM bar;
            +-------------------+
            | CONCAT(id,myname) |
            +-------------------+
            | 1 |
            +-------------------+
            1 row in set (0.073 sec)
            {code}
            Some basic sql functions such as:

            TRIM
            CONCAT
            REPLACE
            DECODE

            are not working in ColumnStore when the server is set to sql_mode=Oracle


            {code:java}
            MariaDB [(none)]> create database tests;
            Query OK, 1 row affected (0.001 sec)

            MariaDB [(none)]> use tests;
            Database changed
            MariaDB [tests]> create table foo (id INT, myname varchar(30))engine = innodb;
            Query OK, 0 rows affected (0.012 sec)

            MariaDB [tests]> create table bar (id INT, myname varchar(30))engine = columnstore;
            Query OK, 0 rows affected (0.285 sec)

            MariaDB [tests]> INSERT INTO foo VALUES (1,'Monty Widenius');
            Query OK, 1 row affected (0.003 sec)

            MariaDB [tests]> INSERT INTO bar VALUES (1,'Monty Widenius');
            Query OK, 1 row affected (15.549 sec)

            MariaDB [tests]> SET SESSION sql_mode=ORACLE;
            Query OK, 0 rows affected (0.000 sec)

            MariaDB [tests]> SELECT CONCAT(id,myname) FROM foo;
            +-------------------+
            | CONCAT(id,myname) |
            +-------------------+
            | 1Monty Widenius |
            +-------------------+
            1 row in set (0.001 sec)

            MariaDB [tests]> SELECT CONCAT(id,myname) FROM bar;
            +-------------------+
            | CONCAT(id,myname) |
            +-------------------+
            | 1 |
            +-------------------+
            1 row in set (0.073 sec)
            {code}
            toddstoffel Todd Stoffel (Inactive) made changes -
            toddstoffel Todd Stoffel (Inactive) made changes -
            Fix Version/s 1.5 [ 22800 ]
            toddstoffel Todd Stoffel (Inactive) made changes -
            Description Some basic sql functions such as:

            TRIM
            CONCAT
            REPLACE
            DECODE

            are not working in ColumnStore when the server is set to sql_mode=Oracle


            {code:java}
            MariaDB [(none)]> create database tests;
            Query OK, 1 row affected (0.001 sec)

            MariaDB [(none)]> use tests;
            Database changed
            MariaDB [tests]> create table foo (id INT, myname varchar(30))engine = innodb;
            Query OK, 0 rows affected (0.012 sec)

            MariaDB [tests]> create table bar (id INT, myname varchar(30))engine = columnstore;
            Query OK, 0 rows affected (0.285 sec)

            MariaDB [tests]> INSERT INTO foo VALUES (1,'Monty Widenius');
            Query OK, 1 row affected (0.003 sec)

            MariaDB [tests]> INSERT INTO bar VALUES (1,'Monty Widenius');
            Query OK, 1 row affected (15.549 sec)

            MariaDB [tests]> SET SESSION sql_mode=ORACLE;
            Query OK, 0 rows affected (0.000 sec)

            MariaDB [tests]> SELECT CONCAT(id,myname) FROM foo;
            +-------------------+
            | CONCAT(id,myname) |
            +-------------------+
            | 1Monty Widenius |
            +-------------------+
            1 row in set (0.001 sec)

            MariaDB [tests]> SELECT CONCAT(id,myname) FROM bar;
            +-------------------+
            | CONCAT(id,myname) |
            +-------------------+
            | 1 |
            +-------------------+
            1 row in set (0.073 sec)
            {code}
            Some basic sql functions such as:

            TRIM
            CONCAT
            REPLACE
            DECODE

            are not working in ColumnStore when the server is set to sql_mode=Oracle


            {code:java}
            MariaDB [(none)]> create database tests;
            Query OK, 1 row affected (0.001 sec)

            MariaDB [(none)]> use tests;
            Database changed

            MariaDB [tests]> create table foo (id INT, myname varchar(30))engine = innodb;
            Query OK, 0 rows affected (0.012 sec)

            MariaDB [tests]> create table bar (id INT, myname varchar(30))engine = columnstore;
            Query OK, 0 rows affected (0.285 sec)

            MariaDB [tests]> INSERT INTO foo VALUES (1,'Monty Widenius');
            Query OK, 1 row affected (0.003 sec)

            MariaDB [tests]> INSERT INTO bar VALUES (1,'Monty Widenius');
            Query OK, 1 row affected (15.549 sec)

            MariaDB [tests]> SET SESSION sql_mode=ORACLE;
            Query OK, 0 rows affected (0.000 sec)

            MariaDB [tests]> SELECT CONCAT(id,myname) FROM foo;
            +-------------------+
            | CONCAT(id,myname) |
            +-------------------+
            | 1Monty Widenius |
            +-------------------+
            1 row in set (0.001 sec)

            MariaDB [tests]> SELECT CONCAT(id,myname) FROM bar;
            +-------------------+
            | CONCAT(id,myname) |
            +-------------------+
            | 1 |
            +-------------------+
            1 row in set (0.073 sec)
            {code}
            toddstoffel Todd Stoffel (Inactive) made changes -
            Assignee Todd Stoffel [ toddstoffel ]
            toddstoffel Todd Stoffel (Inactive) made changes -
            Assignee Todd Stoffel [ toddstoffel ] David Hall [ david.hall ]
            toddstoffel Todd Stoffel (Inactive) made changes -
            Rank Ranked higher
            toddstoffel Todd Stoffel (Inactive) made changes -
            Status Open [ 1 ] Confirmed [ 10101 ]
            toddstoffel Todd Stoffel (Inactive) made changes -
            Fix Version/s 1.5.5 [ 24414 ]
            Fix Version/s 1.5 [ 22800 ]
            toddstoffel Todd Stoffel (Inactive) made changes -
            Priority Major [ 3 ] Critical [ 2 ]
            toddstoffel Todd Stoffel (Inactive) made changes -
            Fix Version/s 5.5.1 [ 25030 ]
            Fix Version/s 5.5.1 [ 25030 ]
            Fix Version/s 1.5.5 [ 24414 ]
            toddstoffel Todd Stoffel (Inactive) made changes -
            Rank Ranked higher
            David.Hall David Hall (Inactive) made changes -
            Description Some basic sql functions such as:

            TRIM
            CONCAT
            REPLACE
            DECODE

            are not working in ColumnStore when the server is set to sql_mode=Oracle


            {code:java}
            MariaDB [(none)]> create database tests;
            Query OK, 1 row affected (0.001 sec)

            MariaDB [(none)]> use tests;
            Database changed

            MariaDB [tests]> create table foo (id INT, myname varchar(30))engine = innodb;
            Query OK, 0 rows affected (0.012 sec)

            MariaDB [tests]> create table bar (id INT, myname varchar(30))engine = columnstore;
            Query OK, 0 rows affected (0.285 sec)

            MariaDB [tests]> INSERT INTO foo VALUES (1,'Monty Widenius');
            Query OK, 1 row affected (0.003 sec)

            MariaDB [tests]> INSERT INTO bar VALUES (1,'Monty Widenius');
            Query OK, 1 row affected (15.549 sec)

            MariaDB [tests]> SET SESSION sql_mode=ORACLE;
            Query OK, 0 rows affected (0.000 sec)

            MariaDB [tests]> SELECT CONCAT(id,myname) FROM foo;
            +-------------------+
            | CONCAT(id,myname) |
            +-------------------+
            | 1Monty Widenius |
            +-------------------+
            1 row in set (0.001 sec)

            MariaDB [tests]> SELECT CONCAT(id,myname) FROM bar;
            +-------------------+
            | CONCAT(id,myname) |
            +-------------------+
            | 1 |
            +-------------------+
            1 row in set (0.073 sec)
            {code}
            Some basic sql functions such as:

            TRIM
            CONCAT
            REPLACE
            ENCODE
            DECODE

            are not working in ColumnStore when the server is set to sql_mode=Oracle


            {code:java}
            MariaDB [(none)]> create database tests;
            Query OK, 1 row affected (0.001 sec)

            MariaDB [(none)]> use tests;
            Database changed

            MariaDB [tests]> create table foo (id INT, myname varchar(30))engine = innodb;
            Query OK, 0 rows affected (0.012 sec)

            MariaDB [tests]> create table bar (id INT, myname varchar(30))engine = columnstore;
            Query OK, 0 rows affected (0.285 sec)

            MariaDB [tests]> INSERT INTO foo VALUES (1,'Monty Widenius');
            Query OK, 1 row affected (0.003 sec)

            MariaDB [tests]> INSERT INTO bar VALUES (1,'Monty Widenius');
            Query OK, 1 row affected (15.549 sec)

            MariaDB [tests]> SET SESSION sql_mode=ORACLE;
            Query OK, 0 rows affected (0.000 sec)

            MariaDB [tests]> SELECT CONCAT(id,myname) FROM foo;
            +-------------------+
            | CONCAT(id,myname) |
            +-------------------+
            | 1Monty Widenius |
            +-------------------+
            1 row in set (0.001 sec)

            MariaDB [tests]> SELECT CONCAT(id,myname) FROM bar;
            +-------------------+
            | CONCAT(id,myname) |
            +-------------------+
            | 1 |
            +-------------------+
            1 row in set (0.073 sec)
            {code}
            David.Hall David Hall (Inactive) made changes -
            Assignee David Hall [ david.hall ] Ben Thompson [ ben.thompson ]
            David.Hall David Hall (Inactive) made changes -
            Priority Critical [ 2 ] Blocker [ 1 ]
            David.Hall David Hall (Inactive) made changes -
            Priority Blocker [ 1 ] Major [ 3 ]
            toddstoffel Todd Stoffel (Inactive) made changes -
            Rank Ranked higher
            toddstoffel Todd Stoffel (Inactive) made changes -
            Rank Ranked lower
            toddstoffel Todd Stoffel (Inactive) made changes -
            Rank Ranked higher
            David.Hall David Hall (Inactive) made changes -
            Fix Version/s 6.1 [ 25201 ]
            Fix Version/s 5.5.1 [ 25030 ]
            David.Hall David Hall (Inactive) made changes -
            Fix Version/s 5.6.1 [ 25031 ]
            toddstoffel Todd Stoffel (Inactive) made changes -
            Fix Version/s 6.1 [ 25201 ]
            toddstoffel Todd Stoffel (Inactive) made changes -
            Rank Ranked higher
            gdorman Gregory Dorman (Inactive) made changes -
            Sprint 2021-3 [ 498 ]
            gdorman Gregory Dorman (Inactive) made changes -
            Rank Ranked higher
            gdorman Gregory Dorman (Inactive) made changes -
            Sprint 2021-3 [ 498 ] 2021-3, 2021-4 [ 498, 499 ]
            toddstoffel Todd Stoffel (Inactive) made changes -
            Rank Ranked higher
            ben.thompson Ben Thompson (Inactive) made changes -
            Status Confirmed [ 10101 ] In Progress [ 3 ]
            bar Alexander Barkov made changes -
            gdorman Gregory Dorman (Inactive) made changes -
            Rank Ranked lower
            toddstoffel Todd Stoffel (Inactive) made changes -
            Rank Ranked higher
            gdorman Gregory Dorman (Inactive) made changes -
            Sprint 2021-3, 2021-4 [ 498, 499 ] 2021-3, 2021-4, 2021-5 [ 498, 499, 504 ]
            gdorman Gregory Dorman (Inactive) made changes -
            Sprint 2021-3, 2021-4, 2021-5 [ 498, 499, 504 ] 2021-3, 2021-4, 2021-5, 2021-6 [ 498, 499, 504, 509 ]
            toddstoffel Todd Stoffel (Inactive) made changes -
            Rank Ranked higher
            gdorman Gregory Dorman (Inactive) made changes -
            Sprint 2021-3, 2021-4, 2021-5, 2021-6 [ 498, 499, 504, 509 ] 2021-3, 2021-4, 2021-5, 2021-6, 2021-7 [ 498, 499, 504, 509, 514 ]
            ben.thompson Ben Thompson (Inactive) made changes -
            Assignee Ben Thompson [ ben.thompson ] David Hall [ david.hall ]
            Status In Progress [ 3 ] In Review [ 10002 ]
            gdorman Gregory Dorman (Inactive) made changes -
            Fix Version/s 6.1.1 [ 25600 ]
            Fix Version/s 5.6.1 [ 25031 ]
            David.Hall David Hall (Inactive) made changes -
            Status In Review [ 10002 ] In Testing [ 10301 ]
            gdorman Gregory Dorman (Inactive) made changes -
            Fix Version/s 5.6.1 [ 25031 ]
            Fix Version/s 6.1.1 [ 25600 ]
            David.Hall David Hall (Inactive) made changes -
            Assignee David Hall [ david.hall ] Daniel Lee [ dleeyh ]

            Build verified: 5.6.1 ( Drone #2325 )

            Verified all mentioned functions return same result as InnoDB.

            dleeyh Daniel Lee (Inactive) added a comment - Build verified: 5.6.1 ( Drone #2325 ) Verified all mentioned functions return same result as InnoDB.
            dleeyh Daniel Lee (Inactive) made changes -
            Resolution Fixed [ 1 ]
            Status In Testing [ 10301 ] Closed [ 6 ]
            mariadb-jira-automation Jira Automation (IT) made changes -
            Zendesk Related Tickets 122588 169063 116013

            People

              dleeyh Daniel Lee (Inactive)
              toddstoffel Todd Stoffel (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              6 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.