[MDEV-24523] Execution of JSON_REPLACE failed on Spider Created: 2021-01-05  Updated: 2021-08-05  Resolved: 2021-08-05

Status: Closed
Project: MariaDB Server
Component/s: JSON, Storage Engine - Spider
Affects Version/s: 10.3.27, 10.4.17, 10.5.8, 10.6
Fix Version/s: 10.3.31, 10.4.21, 10.5.12, 10.6.4

Type: Bug Priority: Major
Reporter: Yongxin Xu Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: not-10.2
Environment:

ALL



 Description   

How to repeat

On Spider:

spd.sql

CREATE TABLE tbl_a (
  i INT,
  j JSON,
  PRIMARY KEY(i)
) ENGINE=SPIDER, PARTITION BY ...
 
INSERT INTO tbl_a VALUES (1, '{ "a": 1, "b": [2, 3]}');
UPDATE tbl_a SET j = JSON_REPLACE(j, '$.a', 10, '$.c', '[1, 2]');

When the update statement is executed, it fails with

query 'UPDATE tbl_a SET j = JSON_REPLACE(j, '$.a', 10, '$.c', '[1, 2]')' failed: 1305: FUNCTION auto_test_remote.json_update does not exist

More critically, it will make the server crash on Windows on debug mode.

Suggest fix

https://github.com/MariaDB/server/pull/1735



 Comments   
Comment by Nayuta Yanagisawa (Inactive) [ 2021-07-28 ]

JSON functions were introduced by 10.2.3. So, we should check 10.2 also. https://mariadb.com/kb/en/json_replace/

Comment by Nayuta Yanagisawa (Inactive) [ 2021-07-30 ]

Please review https://github.com/MariaDB/server/pull/1841

Comment by Nayuta Yanagisawa (Inactive) [ 2021-08-05 ]

ralf.gebhardt@mariadb.com This does not affect 10.2, because the Spider bundled with 10.2 does not pushdown functions to data nodes. I added not-10.2 label to the issue.

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