[MDEV-27990] Incorrect behavior of JSON_OVERLAPS() on warning Created: 2022-03-03  Updated: 2023-11-27  Resolved: 2022-03-03

Status: Closed
Project: MariaDB Server
Component/s: JSON
Affects Version/s: 10.9
Fix Version/s: 10.9.0

Type: Bug Priority: Major
Reporter: Lena Startseva Assignee: Rucha Deodhar
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-27677 Implement JSON_OVERLAPS() Closed

 Description   

In test:

SELECT JSON_OVERLAPS('','');

Expected result:

SELECT JSON_OVERLAPS('','');
JSON_OVERLAPS('','')
0
Warnings:
Warning	4037	Unexpected end of JSON text in argument 1 to function 'json_overlaps'

Actual result:

SELECT JSON_OVERLAPS('','');
JSON_OVERLAPS('','')
1
Warnings:
Warning	4037	Unexpected end of JSON text in argument 1 to function 'json_overlaps'

The result is a warning and 1 (true),but I expect 0 or may be 'null', because we cannot compare this two objects



 Comments   
Comment by Rucha Deodhar [ 2022-03-03 ]

Patch: https://github.com/MariaDB/server/commit/b1f19f6ccc68d1cf097c46e6dec5d25e538221c2

Comment by Alexey Botchkov [ 2022-03-03 ]

ok to push.

Comment by Rucha Deodhar [ 2022-03-03 ]

pushed to bb-10.9-MDEV-27677 and preview-10.9-MDEV-27677

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