[MDEV-25155] JSON_TABLE: Status variable Feature_json is not incremented Created: 2021-03-15  Updated: 2021-04-21  Resolved: 2021-03-26

Status: Closed
Project: MariaDB Server
Component/s: JSON, Variables
Affects Version/s: N/A
Fix Version/s: 10.6.0

Type: Bug Priority: Minor
Reporter: Elena Stepanova Assignee: Alexey Botchkov
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-17399 Add support for JSON_TABLE Closed

 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".


Generated at Thu Feb 08 09:35:34 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.