Skip to content

JSON_SEARCH returns incorrect result for some special value #59463

@YangKeao

Description

@YangKeao

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

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

mysql> SELECT JSON_SEARCH('{"h": "i"}', 'all', 'i', '\\', NULL);
+---------------------------------------------------+
| JSON_SEARCH('{"h": "i"}', 'all', 'i', '\\', NULL) |
+---------------------------------------------------+
| NULL                                              |
+---------------------------------------------------+
1 row in set (0.03 sec)

3. What did you see instead (Required)

mysql> SELECT JSON_SEARCH('{"h": "i"}', 'all', 'i', '\\', NULL);
+---------------------------------------------------+
| JSON_SEARCH('{"h": "i"}', 'all', 'i', '\\', NULL) |
+---------------------------------------------------+
| "$.h"                                             |
+---------------------------------------------------+
1 row in set (0.00 sec)

4. What is your TiDB version? (Required)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions