tidb icon indicating copy to clipboard operation
tidb copied to clipboard

extra double quotes for result of json_search

Open guo-shaoge opened this issue 3 years ago • 0 comments

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

select json_search('{"one potato": "food"}', "all", "food");

2. What did you expect to see? (Required)

mysql> select json_search('{"one potato": "food"}', "all", "food");
+------------------------------------------------------+
| json_search('{"one potato": "food"}', "all", "food") |
+------------------------------------------------------+
| "$.\"one potato\""                                   |
+------------------------------------------------------+
1 row in set (0.00 sec)

3. What did you see instead (Required)

mysql> select json_search('{"one potato": "food"}', "all", "food");
+------------------------------------------------------+
| json_search('{"one potato": "food"}', "all", "food") |
+------------------------------------------------------+
| "$.one potato"                                       |
+------------------------------------------------------+
1 row in set (0.00 sec)

4. What is your TiDB version? (Required)

master

guo-shaoge avatar Jun 19 '21 14:06 guo-shaoge