[MDEV-24541] Wrong function name in ER_JSON_PATH_NO_WILDCARD error message for JSON_REPLACE Created: 2021-01-07  Updated: 2023-12-18  Resolved: 2023-12-18

Status: Closed
Project: MariaDB Server
Component/s: JSON
Affects Version/s: 10.2, 10.3, 10.4, 10.5
Fix Version/s: 10.4.33, 10.5.24, 10.6.17, 10.11.7, 11.0.5, 11.1.4, 11.2.3

Type: Bug Priority: Minor
Reporter: Elena Stepanova Assignee: Rucha Deodhar
Resolution: Fixed Votes: 0
Labels: None


 Description   

10.5 1b12e251

MariaDB [test]> SELECT JSON_REPLACE('{"a":"b"}','$.*','c');
+-------------------------------------+
| JSON_REPLACE('{"a":"b"}','$.*','c') |
+-------------------------------------+
| NULL                                |
+-------------------------------------+
1 row in set, 1 warning (0.000 sec)
 
MariaDB [test]> SHOW WARNINGS;
+---------+------+----------------------------------------------------------------------------+
| Level   | Code | Message                                                                    |
+---------+------+----------------------------------------------------------------------------+
| Warning | 4044 | Wildcards in JSON path not allowed in argument 2 to function 'json_update' |
+---------+------+----------------------------------------------------------------------------+
1 row in set (0.000 sec)

There is no function json_update.



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

holyfoot FYI, the patch for MDEV-24523 (MariaDB/server/pull/1841) also fixes the present issue, but the patch only applied to 10.3 or later.

MariaDB [(none)]> SELECT JSON_REPLACE('{"a":"b"}','$.*','c');
+-------------------------------------+
| JSON_REPLACE('{"a":"b"}','$.*','c') |
+-------------------------------------+
| NULL                                |
+-------------------------------------+
1 row in set, 1 warning (0.001 sec)
 
MariaDB [(none)]> show warnings;
+---------+------+-----------------------------------------------------------------------------+
| Level   | Code | Message                                                                     |
+---------+------+-----------------------------------------------------------------------------+
| Warning | 4044 | Wildcards in JSON path not allowed in argument 2 to function 'json_replace' |
+---------+------+-----------------------------------------------------------------------------+
1 row in set (0.000 sec)

Comment by Rucha Deodhar [ 2023-12-18 ]

Already fixed.

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