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

JSON functions are broken

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: In Testing (View Workflow)
    • Priority: Critical
    • Resolution: Unresolved
    • Affects Version/s: 1.5.2, 1.4.4
    • Fix Version/s: 5.5.1
    • Component/s: ExeMgr
    • Labels:
      None

      Description

      Build tested: 1.4.4-1, 1.5.2-1 (community edition, b33685)

      The following json functions return a "got bad column" error.

      JSON_ARRAY_APPEND.sql
      JSON_ARRAY_INSERT.sql
      JSON_COMPACT.sql
      JSON_CONTAINS_PATH.sql
      JSON_CONTAINS.sql
      JSON_DEPTH.sql
      JSON_DETAILED.sql
      JSON_EXISTS.sql
      JSON_EXTRACT.sql
      JSON_INSERT.sql
      JSON_KEYS.sql
      JSON_LENGTH.sql
      JSON_LOOSE.sql
      JSON_MERGE.sql
      JSON_QUERY.sql
      JSON_QUOTE.sql
      JSON_REMOVE.sql
      JSON_REPLACE.sql
      JSON_SEARCH.sql
      JSON_SET.sql
      JSON_TYPE.sql
      JSON_UNQUOTE.sql
      JSON_VALID.sql
      JSON_VALUE.sql

      For example:

      [centos7:root~]# cat -n /data/qa/autopilot/features/json/sql/JSON_EXISTS.sql
      1 # ---------------------------------------------------------------------- #
      2 # The string is already a JSON string so we can insert it into the table
      3 # ---------------------------------------------------------------------- #
      4 TRUNCATE TABLE jsontest;
      5 SET @json = '

      {"key1":"xxxx", "key2":[1, 2, 3]}

      ';
      6 SELECT @json;
      7 INSERT INTO jsontest VALUES (1, @json, @json);
      8 #
      9 SELECT JSON_EXISTS(@json, "$.key2");
      10 SELECT JSON_EXISTS(@json, "$.key3");
      11 SELECT JSON_EXISTS(@json, "$.key2[1]");
      12 SELECT JSON_EXISTS(@json, "$.key2[10]");
      13 #
      14 SELECT * FROM jsontest;
      15 SELECT cVarchar, JSON_EXISTS(cVarchar, "$.key2"), cText, JSON_EXISTS(cText, "$.key2") from jsontest;
      16 SELECT cVarchar, JSON_EXISTS(cVarchar, "$.key3"), cText, JSON_EXISTS(cText, "$.key3") from jsontest;
      17 SELECT cVarchar, JSON_EXISTS(cVarchar, "$.key2[1]"), cText, JSON_EXISTS(cText, "$.key2[1]") from jsontest;
      18 SELECT cVarchar, JSON_EXISTS(cVarchar, "$.key2[10]"), cText, JSON_EXISTS(cText, "$.key2[10]") from jsontest;
      19 #
      20 TRUNCATE TABLE jsontest;

      [centos7:root~]# cat JSON_EXISTS.sql.tst.log
      ERROR 1815 (HY000) at line 15: Internal error: Error while fetching from ExeMgr: Row::isNullValue(): got bad column type (738197656). Width=738398448

      ERROR 1815 (HY000) at line 16: Internal error: Unknown error
      ERROR 1815 (HY000) at line 17: Internal error: Error while fetching from ExeMgr: Row::isNullValue(): got bad column type (738393232). Width=738409744

      ERROR 1815 (HY000) at line 18: Internal error: Unknown error
      --------------

        Attachments

          Activity

            People

            Assignee:
            dleeyh Daniel Lee
            Reporter:
            dleeyh Daniel Lee
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated: