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

JSON_TABLE: Status variable Feature_json is not incremented

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: N/A
    • Fix Version/s: 10.6.0
    • Component/s: JSON, Variables
    • Labels:
      None

      Description

      bb-10.6-mdev17399-psergey2 8b533cc1d5

      MariaDB [test]> show status like '%json%';
      +---------------+-------+
      | Variable_name | Value |
      +---------------+-------+
      | Feature_json  | 0     |
      +---------------+-------+
      1 row in set (0.001 sec)
       
      MariaDB [test]> select * from json_table('{}', '$' columns (o for ordinality)) t;
      +------+
      | o    |
      +------+
      |    1 |
      +------+
      1 row in set (0.000 sec)
       
      MariaDB [test]> show status like '%json%';
      +---------------+-------+
      | Variable_name | Value |
      +---------------+-------+
      | Feature_json  | 0     |
      +---------------+-------+
      1 row in set (0.001 sec)
      

      The status variable is not dead, it's updated when JSON functions are used:

      MariaDB [test]> select json_valid(1);
      +---------------+
      | json_valid(1) |
      +---------------+
      |             1 |
      +---------------+
      1 row in set (0.000 sec)
       
      MariaDB [test]> show status like '%json%';
      +---------------+-------+
      | Variable_name | Value |
      +---------------+-------+
      | Feature_json  | 1     |
      +---------------+-------+
      1 row in set (0.001 sec)
      

      The variable is defined in the documentation as

      Number of times JSON functionality has been used, such as one of the JSON functions

      JSON_TABLE definitely counts as "JSON functionality".

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              holyfoot Alexey Botchkov
              Reporter:
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: