Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-39742

11.4 JSON functions not interuptable

    XMLWordPrintable

Details

    • Can result in unexpected behaviour
    • Hide
      JSON functions added in 11.4 are now interruptible with a KILL QUERY or exceeding the max_statement_time. JSON_ARRAY_INTERSECT, JSON_OBJECT_TO_ARRAY, JSON_SCHEMA_VALID. JSON_KEY_VALUE as a quick function added isn't applicable. All the functions now produce warnings on invalid JSON passed to them.
      Show
      JSON functions added in 11.4 are now interruptible with a KILL QUERY or exceeding the max_statement_time. JSON_ARRAY_INTERSECT, JSON_OBJECT_TO_ARRAY, JSON_SCHEMA_VALID. JSON_KEY_VALUE as a quick function added isn't applicable. All the functions now produce warnings on invalid JSON passed to them.

    Description

      11.4 json functions need to be killable/timeout.

      Functions added in 11.4:

      • JSON_ARRAY_INTERSECT
      • JSON_OBJECT_FILTER_KEYS
      • JSON_OBJECT_TO_ARRAY
      • JSON_SCHEMA_VALID

      Like MDEV-28404 they need:

      • je.killed_ptr assignment after json_scan_start where the is a function to json_scan_next used within the Item
      • Remove check_killed() if present - handled by report_json_error.
      • JSON_DO_PAUSE_EXECUTION(thd, 0.0002); in Item_function::val*
      • json library functions to end up in report_json_error(js, &je, 0); immediately after error, and return null.
      • add to func_json_notembedded.test - ensure result file is the timeout error.

      Attachments

        Issue Links

          Activity

            People

              danblack Daniel Black
              danblack Daniel Black
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 0d
                  0d
                  Remaining:
                  Remaining Estimate - 0d
                  0d
                  Logged:
                  Time Spent - 5h
                  5h

                  Git Integration

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