Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Not a Bug
-
11.2.2
-
Linux dev 4.19.0-21-amd64 #1 SMP Debian 4.19.249-2 (2022-06-30) x86_64 GNU/Linux
Description
The attached script shows that JSON_SEARCH fails to find an occurrence that does exist.
I also have examples where JSON_SEARCH 'one' finds something, but 'all' finds nothing at all.
Attachments
Issue Links
- relates to
-
MDEV-32854 Make JSON_DEPTH_LIMIT configurable
-
- In Testing
-
MariaDB returns a warning about json depth and it is probably a reason why it does not find anything:
MariaDB [test]> SELECT JSON_SEARCH(@json, 'one', '%needle%', null);
+---------------------------------------------+
| JSON_SEARCH(@json, 'one', '%needle%', null) |
+---------------------------------------------+
| NULL |
+---------------------------------------------+
1 row in set, 1 warning (0,003 sec)
Warning (Code 4040): Limit of 32 on JSON nested structures depth is reached in argument 1 to function 'json_search' at position 25847
MariaDB [test]> select JSON_VALID(@json);
+-------------------+
| JSON_VALID(@json) |
+-------------------+
| 0 |
+-------------------+
1 row in set (0,003 sec)