Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • 1.4.4, 1.5.2
    • 5.5.1
    • ExeMgr
    • 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

          Build tests: 1.5.3-1 gamma

          Some JSON functions, such as JSON_CONTAIN caused server to crash on ColumnStore tables. InnoDB tables work fine.

          dleeyh Daniel Lee (Inactive) added a comment - Build tests: 1.5.3-1 gamma Some JSON functions, such as JSON_CONTAIN caused server to crash on ColumnStore tables. InnoDB tables work fine.

          I created a patch to fix the error message to NOT IMPLEMENTED until we add these functions.

          David.Hall David Hall (Inactive) added a comment - I created a patch to fix the error message to NOT IMPLEMENTED until we add these functions.
          drrtuy Roman added a comment -

          4QA as of now there will be an explicit error about unsupported functions instead of vague "got bad column" message.
          JSON functions won't work in MCS b/c they were never implemented as native functions so the implementation will be another project.

          drrtuy Roman added a comment - 4QA as of now there will be an explicit error about unsupported functions instead of vague "got bad column" message. JSON functions won't work in MCS b/c they were never implemented as native functions so the implementation will be another project.

          Build tested: 5.5.1-1 (hasty BB, build #35830)

          These json functions now return messages like the following

          > ERROR 1178 (42000) at line 15: The storage engine for the table doesn't support IDB-1001: Function 'json_array_append' isn't supported.
          > ERROR 1178 (42000) at line 16: The storage engine for the table doesn't support IDB-1001: Function 'json_array_append' isn't supported.
          > ERROR 1178 (42000) at line 17: The storage engine for the table doesn't support IDB-1001: Function 'json_array_append' isn't supported.
          > ERROR 1178 (42000) at line 18: The storage engine for the table doesn't support IDB-1001: Function 'json_array_append' isn't supported.
          > ERROR 1178 (42000) at line 27: The storage engine for the table doesn't support IDB-1001: Function 'json_array_append' isn't supported.

          dleeyh Daniel Lee (Inactive) added a comment - Build tested: 5.5.1-1 (hasty BB, build #35830) These json functions now return messages like the following > ERROR 1178 (42000) at line 15: The storage engine for the table doesn't support IDB-1001: Function 'json_array_append' isn't supported. > ERROR 1178 (42000) at line 16: The storage engine for the table doesn't support IDB-1001: Function 'json_array_append' isn't supported. > ERROR 1178 (42000) at line 17: The storage engine for the table doesn't support IDB-1001: Function 'json_array_append' isn't supported. > ERROR 1178 (42000) at line 18: The storage engine for the table doesn't support IDB-1001: Function 'json_array_append' isn't supported. > ERROR 1178 (42000) at line 27: The storage engine for the table doesn't support IDB-1001: Function 'json_array_append' isn't supported.

          People

            dleeyh Daniel Lee (Inactive)
            dleeyh Daniel Lee (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.