You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a hard limit of max depth(100) of json type in MySQL, while TiDB does not have such limits, so TiDB does not throw error.
I think it should be a moderate or minor bug.
The standard library of golang has a default max depth for 10000, (but as I know, it doesn't provide a way to specify the depth). We can verify this limitation through:
In TiDB:
MySQL [test]> select json_valid(concat(repeat('[', 1001), repeat(']', 10001)));
+-----------------------------------------------------------+
| json_valid(concat(repeat('[', 1001), repeat(']', 10001))) |
+-----------------------------------------------------------+
| 0 |
+-----------------------------------------------------------+
1 row in set (0.001 sec)
MySQL [test]> select json_valid(concat(repeat('[', 10001), repeat(']', 10001)));
+------------------------------------------------------------+
| json_valid(concat(repeat('[', 10001), repeat(']', 10001))) |
+------------------------------------------------------------+
| 0 |
+------------------------------------------------------------+
1 row in set (0.001 sec)
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
2. What did you expect to see? (Required)
3. What did you see instead (Required)
4. What is your TiDB version? (Required)
The text was updated successfully, but these errors were encountered: